Data loss during JPEG lossless transformations
Posted: Thu Feb 22, 2024 9:13 pm
Subject: 1.6.4 64-bit (Windows): Data loss during JPEG lossless transformations
XnView MP • Version 1.6.4 64-bit (Windows) - Libformat 7.170
OS: Windows 10 Pro (64-bit), 22H2, 19045.4046
I noticed that when I rotate JPEG images with the "JPEG lossless transformations" function, after the first rotation the dimension of the images changes, they become smaller.
Effect: Data losses during JPEG lossless transformations
To reproduce:
1. Open a JPEG file in the Viewer.
2. Use the Metadata → JPEG lossless transformation → Rotate clockwise or Rotate counter clockwise option to rotate the image.
3. Check the original image's dimenions (width and height) and compare it to the rotated image's dimensions. One of them will be smaller. The image will be cropped or something like that. I attached example images. It looses 5 lines during the rotation. 1500×1125px will be 1120×1500px.
Actual behaviour (bug): XnView loose pixels from the JPEG.
Expected behaviour: XnView should keep JPEG files dimensions during lossless transformations.
XnView MP • Version 1.6.4 64-bit (Windows) - Libformat 7.170
OS: Windows 10 Pro (64-bit), 22H2, 19045.4046
I noticed that when I rotate JPEG images with the "JPEG lossless transformations" function, after the first rotation the dimension of the images changes, they become smaller.
Effect: Data losses during JPEG lossless transformations
To reproduce:
1. Open a JPEG file in the Viewer.
2. Use the Metadata → JPEG lossless transformation → Rotate clockwise or Rotate counter clockwise option to rotate the image.
3. Check the original image's dimenions (width and height) and compare it to the rotated image's dimensions. One of them will be smaller. The image will be cropped or something like that. I attached example images. It looses 5 lines during the rotation. 1500×1125px will be 1120×1500px.
Actual behaviour (bug): XnView loose pixels from the JPEG.

Expected behaviour: XnView should keep JPEG files dimensions during lossless transformations.