Page 1 of 2

0.81 MacOS: Embedded aspect ratio issues

Posted: Sat Sep 10, 2016 11:48 pm
by sd_snatcher
When aspect ratio information is present inside PNG, TIF, JPG, BMP etc image files, XnViewMP will show both the thumbnail and the preview with incorrect proportions. Only after you open the image that it will be shown with its correct aspect.

Note: For GIF files, the image will still be shown with incorrect aspect ratio even when you open the files.

Use the following images to test the problem. They can be converted
http://frs.badcoffee.info/images/Zarth-PC88.png
http://frs.badcoffee.info/images/gifsui ... tratio.zip

Tested with XnViewMP 0.81 on Mac OS-X 10.10.5.

Re: 0.81 Mac: Embedded aspect ratio issues

Posted: Wed Mar 01, 2017 12:50 pm
by xnview
O.k., thank you, I can also reproduce the problem. Issue 950 is fixed in next version.

Re: 0.81 Mac: Embedded aspect ratio issues

Posted: Thu Mar 16, 2017 8:48 am
by xnview
This problem is supposed to be fixed in XnView MP 0.85 beta 1. Please check and confirm the bug fix here.

Re: XnView MP 0.85 beta 1

Posted: Mon Apr 03, 2017 9:49 pm
by sd_snatcher
As requested, I tested the embedded aspect ratio bug with 0.85beta2 (Mac) and it's still present.

The files to test the problem can be found in the links bellow:

http://frs.badcoffee.info/images/Zarth-PC88.png
http://frs.badcoffee.info/images/gifsui ... tratio.zip

Re: XnView MP 0.85 beta 1

Posted: Thu Jun 08, 2017 7:58 pm
by xnview
Preview is always incorrect?? or only the thumbnail?

Re: 0.81 MacOS: Embedded aspect ratio issues

Posted: Sun Dec 31, 2017 12:05 pm
by sd_snatcher
I just tested with XnView-MP v0.88 on Mac OS-X. These are the results:

1) Preview

The aspect ratio is shown correctly for JPG and PNG files. It is still incorrect for GIF files.

But there's a catch: ideally, the image should only be expanded to adjust the aspect ratio, so no pixel information is lost. But XnView is expanding them for changes in the vertical axis, and reducing them for changes in the horizontal axis.


2) Thumbnails in the file browser

The aspect ratio is incorrect for JPG, PNG and GIF files.


To help with the tests, I attached here three files with the same image saved in JPG, PNG and GIF formats. They all have the Pixel Aspect Ratio field set up inside them. In all cases, a black square should be rendered and all images should render the square with the same size.

- If a rectangle is seen, then the aspect ratio info isn't being respected.
- If the size of the rendered rectangle differs between all the rendered versions, then the Aspect Ratio scaler isn't scaling the axes by the same factor.

Re: 0.81 MacOS: Embedded aspect ratio issues

Posted: Sun Dec 31, 2017 12:33 pm
by sd_snatcher
The formula for the GIF pixel aspect ratio can be seen at this link. It goes like this:

In a nutshell, it goes like this:

1) The Gif Aspect Ratio field is present at the offset +12 of the file.

2) The formula for the Pixel Aspect Ratio is this

- If HeaderAspectRatio = 0, then no Pixel Aspect Ratio is defined
- When HeaderAspectRatio > 0, PixelAspectRatio = (HeaderAspectRatio + 15) / 64

Re: 0.81 MacOS: Embedded aspect ratio issues

Posted: Wed Jan 17, 2018 8:49 am
by xnview
:bugconfirmed: Thanks to your detailed description I can reproduce the problem.

Re: 0.81 MacOS: Embedded aspect ratio issues

Posted: Sun Feb 04, 2018 8:46 pm
by sd_snatcher
It seems that some Pixel Aspect Ratios are still not shown correctly by XnView. Like the one in this attached image.

Re: 0.81 MacOS: Embedded aspect ratio issues

Posted: Tue Apr 17, 2018 12:15 pm
by xnview
See issue for current status and some details.

Re: 0.81 MacOS: Embedded aspect ratio issues

Posted: Thu Jun 07, 2018 9:45 am
by xnview
This problem is supposed to be fixed in XnView MP 0.91. Please check and confirm the bug fix here.

Re: 0.81 MacOS: Embedded aspect ratio issues

Posted: Sat Aug 04, 2018 3:18 am
by sd_snatcher
I just tested with XnView-MP v0.91-Beta4 on Mac OS-X. These are the results:

1) Preview

The aspect ratio is shown correctly for JPG, PNG and GIF files now.

But this problem still happens: "ideally, the image should only be expanded to adjust the aspect ratio, so no pixel information is lost. But XnView is expanding them for changes in the vertical axis, and reducing them for changes in the horizontal axis."

I attached a screenshot showing that 2:1 is being rendered much smaller than 1:1 and 1:2 on image view. But they should all be rendered at the same size.

2) Thumbnails in the file browser

The aspect ratio is still incorrect for JPG, PNG and GIF files, as show the attached screenshot.


To help with the tests, I made this page with a set of images. In all cases, all images of the same set (Lennas or squares) should be rendered with the same size.

Re: 0.81 MacOS: Embedded aspect ratio issues

Posted: Sat Aug 04, 2018 9:03 am
by xnview
sd_snatcher wrote: Sat Aug 04, 2018 3:18 am To help with the tests, I made this page with a set of images. In all cases, all images of the same set (Lennas or squares) should be rendered with the same size.
where is the download link for images set?

Re: 0.81 MacOS: Embedded aspect ratio issues

Posted: Sat Aug 04, 2018 8:25 pm
by sd_snatcher
The images can be downloaded directly from this page, with right-click:
http://frs.badcoffee.info/PAR_AcidTest

To make things easier, I also attached it here.

Re: 0.81 MacOS: Embedded aspect ratio issues

Posted: Sun Aug 05, 2018 8:05 am
by xnview
Are you sure that you have 'rebuild thumbnails'?

for preview, 512x256 & 256x512 should be expanded as 512x512 or 256x256?