1.5.5: Photos displaying with incorrect aspect ratios

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

Moderators: XnTriq, helmut, xnview, Dreamer

Ocsid
Posts: 4
Joined: Mon Sep 11, 2023 3:16 pm

1.5.5: Photos displaying with incorrect aspect ratios

Post by Ocsid »

XnView: MP 1.5.5 - 64-bit
OS: Windows 10 - 64-bit

Some of the photos I have taken are not displaying at their original aspect ratio (4:3 or 3:4) in Preview and View interface. Instead, they are being displayed as squares (1:1 aspect ratio). However, these photos are displayed correctly in thumbnails.

Effect: Affected photos are displayed with an incorrect 1:1 aspect ratio.

To reproduce:
1. Browse the folder containing the affected photos.
2. Open one of the affected photos.
Actual behavior (bug): Effected photos are displayed with an incorrect 1:1 aspect ratio.

Expected behavior: Photos are displayed at their correct aspect ratio.

Image Image
Ocsid
Posts: 4
Joined: Mon Sep 11, 2023 3:16 pm

Re: 1.5.5: Photos displaying with incorrect aspect ratios

Post by Ocsid »

For your information, these are some of my affected photos: https://drive.google.com/file/d/1DZccYg ... drive_link
User avatar
xnview
Author of XnView
Posts: 44804
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: 1.5.5: Photos displaying with incorrect aspect ratios

Post by xnview »

i have no access to files
Pierre.
cday
XnThusiast
Posts: 4172
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: 1.5.5: Photos displaying with incorrect aspect ratios

Post by cday »

@Ocsid: You need to use the Goggle Drivel option to make the file available to anyone, and then post the download link provided.
Ocsid
Posts: 4
Joined: Mon Sep 11, 2023 3:16 pm

Re: 1.5.5: Photos displaying with incorrect aspect ratios

Post by Ocsid »

xnview wrote: Tue Sep 12, 2023 2:11 pm i have no access to files
Sorry, I forgot to make the file available to everyone. Now you should be able to download it.
cday
XnThusiast
Posts: 4172
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: 1.5.5: Photos displaying with incorrect aspect ratios

Post by cday »

Looking at the file properties of the first file, the horizontal and vertical DPIs are different, which I presume is the source of the problem.

I'm not immediately sure whether there is an option that can be enabled to display the images with the aspect ration that you expect. But if you use Image > Set DPI... to set X and Y DPI values to be the same the image will display with the aspect ration you expect, although only after resaving as for some reason the change is not immediately visible on the screen.

First file with equal X and Y DPIs, saved to JPEG format to reduce the filesize to enable attachment:


P175717a.jpg
You do not have the required permissions to view the files attached to this post.
Ocsid
Posts: 4
Joined: Mon Sep 11, 2023 3:16 pm

Re: 1.5.5: Photos displaying with incorrect aspect ratios

Post by Ocsid »

cday wrote: Wed Sep 13, 2023 10:12 am Looking at the file properties of the first file, the horizontal and vertical DPIs are different, which I presume is the source of the problem.

I'm not immediately sure whether there is an option that can be enabled to display the images with the aspect ration that you expect. But if you use Image > Set DPI... to set X and Y DPI values to be the same the image will display with the aspect ration you expect, although only after resaving as for some reason the change is not immediately visible on the screen.

First file with equal X and Y DPIs, saved to JPEG format to reduce the filesize to enable attachment:



P175717a.jpg
Thank you for your careful answer. After my confirmation, the horizontal and vertical DPIs of these affected photos are indeed different. After modifying them to the same value, they can be displayed correctly in XnView.

I know very little about image information. After Google, I learned that the horizontal and vertical DPIs of most images are the same value. Only some cameras with special image sensors can produce photos with different horizontal and vertical DPIs.

I don't know if my camera has a special image sensor or if it outputs images with incorrect JFIF and EXIF information. However, after testing, these images can be displayed correctly with some commonly used software (e.g. Microsoft Photos, Windows Photo Viewer and Adobe Photoshop), but not XnView. Does it indicate that this is still a software bug?