Hello,
I use the JPEG Lossless Transformation - Rotate based on Exif orientation field.
I select all the photos in one folder, and apply this transformation on every ones.
What I don't understand is:
- why there is a change of the size of the files that are rotated change whereas the height and the width are multiple of 8 pixels.
- why there is a change of the size of the files that are not rotated.
If there is a change of the file size, it means that their is a loss of data.
Thank you in advance !
Best
NicoPL
Lossless Rotation based on Exif / Size change
Moderators: XnTriq, helmut, xnview, Dreamer
Re: Lossless Rotation based on Exif / Size change
There is an optimization of huffman table so little change in size without loss
Pierre.
Re: Lossless Rotation based on Exif / Size change
Thanks for the answer.
When you say little, what's little?
The file size drops by more than 1Mo. For instance from 8.8 to 7.6 or 7.5 to 6.2Mo
When you say little, what's little?
The file size drops by more than 1Mo. For instance from 8.8 to 7.6 or 7.5 to 6.2Mo
Re: Lossless Rotation based on Exif / Size change
I did a new test. Two photos, one with the EXIF saying that it needs to be rotated, one already horizontal by nature.
The only changes in Exiftool are the following:
Photo that needed to be rotated
# Original
- File Size : 8.6 MB
- Orientation : Rotate 90 CW
- Y Cb Cr Sub Sampling : YCbCr4:2:2 (2 1)
# New file - Rotated
- File Size : 7.3 MB
- Orientation : Horizontal (normal)
- Y Cb Cr Sub Sampling : YCbCr4:4:0 (1 2)
Photo that didn't need to be rotated
# Original
- File Size : 7.7 MB
# New file - Not rotated
- File Size : 6.7 MB
I still can't understand why there is such a drop in file size.
Thanks in advance for your help. I really have to make sure that computing this operation doesn't alter the quality of my pictures.
Best
The only changes in Exiftool are the following:
Photo that needed to be rotated
# Original
- File Size : 8.6 MB
- Orientation : Rotate 90 CW
- Y Cb Cr Sub Sampling : YCbCr4:2:2 (2 1)
# New file - Rotated
- File Size : 7.3 MB
- Orientation : Horizontal (normal)
- Y Cb Cr Sub Sampling : YCbCr4:4:0 (1 2)
Photo that didn't need to be rotated
# Original
- File Size : 7.7 MB
# New file - Not rotated
- File Size : 6.7 MB
I still can't understand why there is such a drop in file size.
Thanks in advance for your help. I really have to make sure that computing this operation doesn't alter the quality of my pictures.
Best
Re: Lossless Rotation based on Exif / Size change
The compressed data of JPEG data are not changed, only huffman tableNicoPL wrote: I still can't understand why there is such a drop in file size.
Thanks in advance for your help. I really have to make sure that computing this operation doesn't alter the quality of my pictures.
Pierre.
Re: Lossless Rotation based on Exif / Size change
Thank you for your answer.
To summarize:
When asking xnview to perform a batch rotation based on the exif field, it rotates the photo if needed, and whatever the rotation it changes the Huffman's table. This update of the Huffman's table results in a 15% drop of the file size. Is that correct?
My camera is brand new. I assumed that Panasonic knew how to implement optimized codes in their chipsets and therefore am still surprised of such a drop... 15% is a lot.
To summarize:
When asking xnview to perform a batch rotation based on the exif field, it rotates the photo if needed, and whatever the rotation it changes the Huffman's table. This update of the Huffman's table results in a 15% drop of the file size. Is that correct?
My camera is brand new. I assumed that Panasonic knew how to implement optimized codes in their chipsets and therefore am still surprised of such a drop... 15% is a lot.