Data loss during JPEG lossless transformations

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

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
Petibite
Posts: 2
Joined: Thu Feb 22, 2024 8:52 pm

Data loss during JPEG lossless transformations

Post by Petibite »

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 MetadataJPEG lossless transformationRotate 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. :bug:

Expected behaviour: XnView should keep JPEG files dimensions during lossless transformations.
Attachments
0. Original picture
0. Original picture
1. After lossless rotation of 0_pic 90° clockwise
1. After lossless rotation of 0_pic 90° clockwise
2. After lossless rotation of 1_pic 90° counter clockwise
2. After lossless rotation of 1_pic 90° counter clockwise
Diff sample of 0_pic vs. 2_pic
Diff sample of 0_pic vs. 2_pic
diff_sample.png (4.01 KiB) Viewed 902 times
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Data loss during JPEG lossless transformations

Post by XnTriq »

Welcome to the forum, Petibite :-)
Please refer to topic "Lossless flip/rotate
" for an explanation.
Petibite
Posts: 2
Joined: Thu Feb 22, 2024 8:52 pm

Re: Data loss during JPEG lossless transformations

Post by Petibite »

XnTriq wrote: Fri Feb 23, 2024 8:15 am Welcome to the forum, Petibite :-)
Please refer to topic "Lossless flip/rotate
" for an explanation.
Thank you, I got that! :)
Post Reply