Page 1 of 1
Photo App and lossless rotation
Posted: Tue Jun 06, 2017 7:59 pm
by Plotino
Hi,
Photo App of Windows 8.1 and 10 is able to apply lossless rotation of images whose dimensions are not multiple of 8 and the images are not cropped. Photo App modifies Exif orientation. I opened the images in PowerDirector and they are rotated
Please add this feature to XnViewMP too
Re: Photo App and lossless rotation
Posted: Tue Jun 06, 2017 10:30 pm
by XnTriq
Plotino wrote:Photo App modifies Exif orientation.
Please activate
Change EXIF orientation ONLY (if possible) in
Tools →
Settings... →
Browser →
Misc..
Re: Photo App and lossless rotation
Posted: Wed Jun 07, 2017 12:14 am
by Plotino
Yes I did, but it doesn't work. Rotation is always lossy. If I check even "Use lossless rotation (if possible)" XnViewMP crops the image, and I don't want this.
Photo App does a lossless rotation of the image I attached, XnViewMP doesn't
Re: Photo App and lossless rotation
Posted: Wed Jun 07, 2017 7:55 am
by xnview
Strange, i have tested with 'Change EXIF orientation' checked, and 'Use lossless rotation' not checked, and this is the result
There is no EXIF, so XnViewMP can't change the EXIF orientation field, so picture is re-saved (without cropping)
Re: Photo App and lossless rotation
Posted: Wed Jun 07, 2017 8:35 am
by Plotino
No problem to rotate without crop, as you said, simply leave 'Use lossless rotation' not checked
Rotation isn't lossless
I don't know how it does, but Photo App applies lossless rotation.
You can test with Paint.NET
open the copied, rotated file.
Edit...Select All
Edit...Copy
File...Open (..then specify the original file)
Edit...Paste into New layer
Layers...Layer Properties...Difference
Image...Flatten
Adjustments...Auto-Level
if the result is a black image the rotation is lossless
Please, investigate Photo App behavior. Imho it's important
Re: Photo App and lossless rotation
Posted: Wed Jun 07, 2017 2:08 pm
by Plotino
I used Exiftool to obtain information from the picture before and after Photo App rotation.
Before
Code: Select all
ExifTool Version Number : 9.03
File Name : lav (04)_1377164681_675x0.jpg
Directory : F:/Documenti/Download/Y - Video - Audio Editing/MkvToMp4_0.224/Tools/ExifTool
File Size : 114 kB
File Modification Date/Time : 2017:06:03 17:26:11+02:00
File Access Date/Time : 2017:06:03 17:26:06+02:00
File Permissions : rw-rw-rw-
File Type : JPEG
MIME Type : image/jpeg
JFIF Version : 1.01
Resolution Unit : None
X Resolution : 1
Y Resolution : 1
Comment : CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 95.
Image Width : 675
Image Height : 450
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Image Size : 675x450
After
Code: Select all
ExifTool Version Number : 9.03
File Name : lav (04)_1377164681_675x0.jpg
Directory : F:/Documenti/Download/Y - Video - Audio Editing/MkvToMp4_0.224/Tools/ExifTool
File Size : 130 kB
File Modification Date/Time : 2017:06:07 15:24:07+02:00
File Access Date/Time : 2017:06:07 15:24:07+02:00
File Permissions : rw-rw-rw-
File Type : JPEG
MIME Type : image/jpeg
JFIF Version : 1.01
Resolution Unit : inches
X Resolution : 96
Y Resolution : 96
Exif Byte Order : Big-endian (Motorola, MM)
Processing Software : Windows Photo Editor 6.3.9600.17418
Orientation : Rotate 270 CW
Software : Windows Photo Editor 6.3.9600.17418
Modify Date : 2017:06:07 15:24:03
Padding : (Binary data 2060 bytes, use -b option to extract)
Comment : CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 95.
About : uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b
Creator Tool : Windows Photo Editor 6.3.9600.17418
Image Width : 675
Image Height : 450
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Image Size : 675x450
As you can see, there is this new value "
Orientation: Rotate 270 CW"
So Photo App write info in Exif.
After that the image is rotated with Photo App I can perform rotation with XnViewMP as you did, but only now the rotation is lossless
Re: Photo App and lossless rotation
Posted: Wed Jun 07, 2017 4:30 pm
by XnTriq
xnview wrote:There is no EXIF, so XnViewMP can't change the EXIF orientation field, so picture is re-saved (without cropping)
I can confirm that
lav (04)_1377164681_675x0.jpg doesn't contain any EXIF info
Re: Photo App and lossless rotation
Posted: Wed Jun 07, 2017 4:43 pm
by Plotino
Maybe Photo App adds Exif information?
Try the same step I did
Photo App lossless rotation is a fact, it isn't my opinion

Re: Photo App and lossless rotation
Posted: Wed Jun 07, 2017 5:00 pm
by XnTriq
Plotino wrote:Photo App lossless rotation is a fact, it isn't my opinion

I'm sure you're right, Plotino! Thing is that I don't have access to Windows 8/8.1 or 10.
Could you please upload the original and processed files so Pierre (and the rest of us) can have a look at the EXIF injected by Windows Photo Editor?
Re: Photo App and lossless rotation
Posted: Wed Jun 07, 2017 5:30 pm
by Plotino
Thanks for your patience
Re: Photo App and lossless rotation
Posted: Sat Jun 17, 2017 6:31 pm
by xnview
O.k., thank you, I can also reproduce the problem.
Issue 1204 is fixed in next version.
Re: Photo App and lossless rotation
Posted: Sun Jun 18, 2017 3:26 pm
by Plotino
Please, add this type of rotation to View and Slideshow mode as well
Re: Photo App and lossless rotation
Posted: Sat Jul 08, 2017 12:44 pm
by xnview
This problem is supposed to be fixed in
XnView MP 0.87. Please check and confirm the bug fix here.
Re: Photo App and lossless rotation
Posted: Sat Jul 08, 2017 11:44 pm
by Plotino
Yes, pictures are now rotated altering the Exif orientation.
This is very good for images whose dimensions are not multiple of 8, however pictures whose dimensions are multiple of 8, IMHO, should be rotated in the standard lossless rotation way. I mean according to jpegtran rules