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

*** Please report new bugs here! ***

Moderators: xnview, Dreamer

User avatar
user0
XnThusiast
Posts: 2842
Joined: Sat May 09, 2015 9:37 am

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

Post 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
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
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 47518
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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

Post by xnview »

the JPEG library seems to check that dpi value has a minimum value
Pierre.
User avatar
user0
XnThusiast
Posts: 2842
Joined: Sat May 09, 2015 9:37 am

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

Post by user0 »

same issue with other formats, eg bmp, gif, png
User avatar
xnview
Author of XnView
Posts: 47518
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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

Post by xnview »

right, at loading, if dpi is <= 2, it's not a good value for me
Pierre.
User avatar
user0
XnThusiast
Posts: 2842
Joined: Sat May 09, 2015 9:37 am

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

Post 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
You do not have the required permissions to view the files attached to this post.