A popular format for storing geographic information onto a raster image is the TIF format which allows the raster image to be tagged with the boundaries it represents.

This makes the file able to reference and modify coordinate systems/transform.  However from time to time a raster image will be produced without being tagged for the spatial coordinates it represents and then it can be difficult to work with with trying to apply spatial operations on it.  For example the raster image is a png or a bmp.

In this case assuming you know the spatial boundaries of the file you can run this gdal command to create a georeferenced TIF.

gdal_translate -a_ullr -135 12 -49 60 source.png dest.tif

From the documentation it does this

-a_ullr ulx uly lrx lry:
Assign/override the georeferenced bounds of the output file. This assigns georeferenced bounds to the output file, ignoring what would have been derived from the source file. So this does not cause reprojection to the specified SRS.