Andrew,
The pixel width and height of the image is only called 'resolution' in certain contexts, such as when talking about a device's capabilities (e.g. high resolution phone screen).
When it comes to imaging and OCR, the word 'resolution' means (pixels per unit length), such as dots per inch or dots per centimeter.
The pixel width and height are better called (image size), not (resolution).
In LEADTOOLS every image must have DPI resolution values. If the values are stored in the file, whether correct or not, LEADTOOLS will read these values.
If no DPI values are stored in the file, 2 things will happen automatically:
1. The flag value FILEINFO_NO_RESOLUTION will be turned on in the FILEINFO structure's Flags member. (Or something similar in programming interfaces other than C/C++).
2. An 'artificial' default value of 150 Dots Per Inch will be filled for both the X and Y resolution values.
This means deleting the DPI values is not a 'magical' solution. It is merely equivalent to setting them to 150 yourself, which is a special case of the solution I already suggested (check the values and correct them if they're wrong).
However, I would not recommend simply setting the DPI to 150 for ALL images, because for some images, a correct DPI value could increase the accuracy of OCR results.
Keep in mind that the check I'm suggesting is very quick and should take a very small fraction of the time needed to perform OCR.
You will NOT need to modify the tags in physical files. It will be a simple modification to your existing code that looks something like this:
... The code that loads the image ...
////////////// Add the following check
if (Bitmap.XResolution < MinValue) OR (Bitmap.XResolution > MaxValue) then Bitmap.XResolution = SomeReasonableValue
if (Bitmap.YResolution < MinValue) OR (Bitmap.YResolution > MaxValue) then Bitmap.YResolution = SomeReasonableValue
////////////// End of added check
... The code that passes the image to the OCR engine...