Dear all
Why don't I get the exact resolution of the a pic which I have scanned?
E.g.
Set resolution to 50
ScanningPrinting.scanningScanPreview():
byte[76430]{0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0x32, 0x00, 0x32, 0x00, 0x00, ...}
sizePixels=416,585
sizeInches=8.48979591836735,11.9387755102041
DPI=(49, 49)
--> the image resolution is 49
--------------------------------------
Set resolution to 75:
ScanningPrinting.scanningScanPreview():
byte[148288]{0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0x4b, 0x00, 0x4b, 0x00, 0x00, ...}
sizePixels=640,876
sizeInches=8.64864864864865,11.8378378378378
DPI=(74, 74)
--> the image resolution is 74
--------------------------------------
Set resolution to 100:
ScanningPrinting.scanningScanPreview():
byte[230357]{0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, ...}
sizePixels=832,1169
sizeInches=8.32,11.69
DPI=(100, 100)
--> the image resolution is 100 (correct)
--------------------------------------
Set the resolution to 150
ScanningPrinting.scanningScanPreview():
byte[430889]{0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0x96, 0x00, 0x96, 0x00, 0x00, ...}
sizePixels=1248,1753
sizeInches=8.3758389261745,11.7651006711409
DPI=(149, 149)
--> the image resolution is 149
--------------------------------------
Set the resolution to 200
ScanningPrinting.scanningScanPreview():
byte[658736]{0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0xc8, 0x00, 0xc8, 0x00, 0x00, ...}
sizePixels=1664,2338
sizeInches=8.32,11.69
DPI=(200, 200)
--> the image resolution is 200 (correct)
--------------------------------------
I think it is a rounding issue. Can this be solved?
As you also can see if the scan resolution is small it also affect to the sizeInches of the image.
Could you please check?
Thank you, ctn
