Page 1 of 1

1.7.1 - viewer - save - sometimes image XY DPI is not saved

Posted: Sun Apr 14, 2024 3:03 pm
by user0
XnViewMP 1.7.1 64bit
Windows11 (23H2), display resolution 3840x2160, win scaling 150%


Viewer - save
sometimes image XY DPI is not saved

To reproduce:
0. clean unziped app version
☑ Use EXIF DPI (if exists)
☑ Adjust image if X/Y DPI re different


1. open any image in Viewer, eg test one
test_img_XY_DPI.zip
(51.7 KiB) Downloaded 13 times
2. open Image > Set DPI...
☑ Change EXIF DPI if exists
- change XY, eg to 2x72
- press OK
image shrinks/stretches according to the entered values
3. press CTRL+S to save image
4. reopen app and image
image has no XY DPI

however, 10x72 saves without issues

Re: 1.7.1 - viewer - save - sometimes image XY DPI is not saved

Posted: Mon Apr 15, 2024 8:10 am
by xnview
the JPEG library seems to check that dpi value has a minimum value

Re: 1.7.1 - viewer - save - sometimes image XY DPI is not saved

Posted: Mon Apr 15, 2024 9:22 am
by user0
same issue with other formats, eg bmp, gif, png

Re: 1.7.1 - viewer - save - sometimes image XY DPI is not saved

Posted: Mon Apr 15, 2024 12:11 pm
by xnview
right, at loading, if dpi is <= 2, it's not a good value for me

Re: 1.7.1 - viewer - save - sometimes image XY DPI is not saved

Posted: Tue Apr 16, 2024 6:29 pm
by user0
hm, why not.. if there is weird XY DPI - just render them as is, it's user problem to fix their image
especially if related setting is checked in Settings

also, not sure why there is no DPI field (in Properties>Image) for the file with <=2 dpi (test_img_XY_DPI_result_2x72).
If it exists inside file - it should be displayed, if does not exist - why it has not been saved?
image_properties.png