Photo App and lossless rotation

Moderators: cday, XnTriq, helmut, xnview, Dreamer

Plotino
Posts: 19
Joined: Mon Oct 10, 2011 11:16 am

Photo App and lossless rotation

Postby Plotino » Tue Jun 06, 2017 7:59 pm

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

User avatar
XnTriq
Moderator & Librarian
Posts: 5006
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Photo App and lossless rotation

Postby XnTriq » Tue Jun 06, 2017 10:30 pm

Plotino wrote:Photo App modifies Exif orientation.

Please activate Change EXIF orientation ONLY (if possible) in ToolsSettings...BrowserMisc..

Plotino
Posts: 19
Joined: Mon Oct 10, 2011 11:16 am

Re: Photo App and lossless rotation

Postby Plotino » Wed Jun 07, 2017 12:14 am

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
Attachments
lav (04)_1377164681_675x0.jpg

User avatar
xnview
Author of XnView
Posts: 27670
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Photo App and lossless rotation

Postby xnview » Wed Jun 07, 2017 7:55 am

Strange, i have tested with 'Change EXIF orientation' checked, and 'Use lossless rotation' not checked, and this is the result

Copy of lav (04)_1377164681_675x0.jpg


There is no EXIF, so XnViewMP can't change the EXIF orientation field, so picture is re-saved (without cropping)
Pierre.

Plotino
Posts: 19
Joined: Mon Oct 10, 2011 11:16 am

Re: Photo App and lossless rotation

Postby Plotino » Wed Jun 07, 2017 8:35 am

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

Plotino
Posts: 19
Joined: Mon Oct 10, 2011 11:16 am

Re: Photo App and lossless rotation

Postby Plotino » Wed Jun 07, 2017 2:08 pm

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

User avatar
XnTriq
Moderator & Librarian
Posts: 5006
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Photo App and lossless rotation

Postby XnTriq » Wed Jun 07, 2017 4:30 pm

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 :-|

How-To Geek (Why Your Photos Don’t Always Appear Correctly Rotated) wrote:For example, on Windows 7, Windows Photo Viewer and Windows Explorer ignore the Exif Orientation tag. Windows 8 added support for the Exif Orientation tag, which continued into Windows 10. Images may appear correct on a Windows 10 or 8 PC, but rotated differently on a Windows 7 PC.

[…]

Modern smartphones and digital cameras have faster hardware, so it should be possible for them to save photos in an already-rotated state instead of just applying the Exif Orientation tag. Unfortunately, the industry seems to have settled in Exif Orientation tags as the standard solution, even if they aren’t ideal.

Plotino
Posts: 19
Joined: Mon Oct 10, 2011 11:16 am

Re: Photo App and lossless rotation

Postby Plotino » Wed Jun 07, 2017 4:43 pm

Maybe Photo App adds Exif information?
Try the same step I did
Photo App lossless rotation is a fact, it isn't my opinion :)

User avatar
XnTriq
Moderator & Librarian
Posts: 5006
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Photo App and lossless rotation

Postby XnTriq » Wed Jun 07, 2017 5:00 pm

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?

Plotino
Posts: 19
Joined: Mon Oct 10, 2011 11:16 am

Re: Photo App and lossless rotation

Postby Plotino » Wed Jun 07, 2017 5:30 pm

Thanks for your patience
Attachments
images.zip
(244.02 KiB) Downloaded 6 times

User avatar
xnview
Author of XnView
Posts: 27670
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Photo App and lossless rotation

Postby xnview » Sat Jun 17, 2017 6:31 pm

O.k., thank you, I can also reproduce the problem. Issue 1204 is fixed in next version.
Pierre.

Plotino
Posts: 19
Joined: Mon Oct 10, 2011 11:16 am

Re: Photo App and lossless rotation

Postby Plotino » Sun Jun 18, 2017 3:26 pm

Please, add this type of rotation to View and Slideshow mode as well

User avatar
xnview
Author of XnView
Posts: 27670
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Photo App and lossless rotation

Postby xnview » Sat Jul 08, 2017 12:44 pm

This problem is supposed to be fixed in XnView MP 0.87. Please check and confirm the bug fix here.
Pierre.

Plotino
Posts: 19
Joined: Mon Oct 10, 2011 11:16 am

Re: Photo App and lossless rotation

Postby Plotino » Sat Jul 08, 2017 11:44 pm

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


Return to “0.87 Testing – Fixed/Resolved”

Who is online

Users browsing this forum: No registered users and 0 guests