The task is not as trivial as it seems. It all depends on what projections are made card.

\r

For example, there is the Mercator projection (an example of its use is Google Maps). There are latitude and longitude depending on the number of pixel linearly, and it is enough to compute the coordinates of the four corners, and then easy to calculate.

\r

But if map projection is WGS84 (it is, for example, uses Google Earth), the above method is not suitable. There are the basic coordinates that depend on the pixel number linearly, and to move them into the latitude and longitude is necessary to use appropriate non-linear formulas.

\r

You need to know exactly what projection uses your file. There are quite a few different map projections and each has its own dependence of the coordinate of the pixel latitude and longitude. In the manufacture of the card, the choice of projection depends on the objectives pursued. The Mercator projection preserves angles but not distances, and for remote from the equator of territories gives a larger distortion.

\r

There are formats that allow for the projection of maps (geotiff, sid, img), and software that allows these data files to read. For example, geotiff is a simple command-line utility listgeo, which provides information about the type of projection and coordinates of the corners. Try to find a map that has projection information.