ossama-othman / MaRC

MaRC - Map Reprojections and Conversions
GNU Lesser General Public License v2.1
1 stars 0 forks source link

Warn user if map data type is smaller than photo data type #72

Open ossama-othman opened 6 years ago

ossama-othman commented 6 years ago

MaRC blindly accepts the map data type specified by the user without checking to see if it is large enough to hold photo image data without loss of precision (e.g. photo data is a 4 byte integer, but the map data type is a 2 byte integer). At the very least, MaRC should warn the user about the potential loss of precision.

See #62 for a related issue.

ossama-othman commented 6 years ago

A more sophisticated check would involve checking the photo image data to determine if it would fit into a map with a smaller data type. This can be achieved by either of the following, or a combination of them: