EXIF lossless rotation

Ideas for improvements and requests for new features in XnView Classic

Moderators: XnTriq, xnview

ben.che
Posts: 2
Joined: Mon Sep 10, 2007 2:03 pm

EXIF lossless rotation

Post by ben.che » Mon Sep 10, 2007 2:14 pm

Hello,

I did not find this rotation function in XnView.
I think the best way to rotate a JPG picture, is to not rotate the picture (!) but change the orientation EXIF value of the picture.

To change the orientation of the picture taken with my digital camera (which has no orientation sensor), I use EXIF Editor ( http://www.photo-freeware.net/quick-exif-editor.php). Thanks to this page (http://jpegclub.org/exif_orientation.html), I change or add the "orientation" EXIF value to 6 or 8. This way, the picture is not changed (really better for printing), and the picture is correctly displayed in the good renderer like XnView.

It would be great if XnView had this function built-in ("Define picture Orientation" with the "F" pictures in http://jpegclub.org/exif_orientation.html) or a "Rotate with EXIF" that from left to right, change or add the EXIF orientation (6 -> 1 -> 8 -> 3 -> 6 ...).

What do you think of this?

(I looked for this function in XnView and in the suggestion forum and did not find it).

--
Ben

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

Re: EXIF lossless rotation

Post by xnview » Mon Sep 10, 2007 3:39 pm

ben.che wrote:Hello,

I did not find this rotation function in XnView.
I think the best way to rotate a JPG picture, is to not rotate the picture (!) but change the orientation EXIF value of the picture.

To change the orientation of the picture taken with my digital camera (which has no orientation sensor), I use EXIF Editor ( http://www.photo-freeware.net/quick-exif-editor.php). Thanks to this page (http://jpegclub.org/exif_orientation.html), I change or add the "orientation" EXIF value to 6 or 8. This way, the picture is not changed (really better for printing), and the picture is correctly displayed in the good renderer like XnView.

It would be great if XnView had this function built-in ("Define picture Orientation" with the "F" pictures in http://jpegclub.org/exif_orientation.html) or a "Rotate with EXIF" that from left to right, change or add the EXIF orientation (6 -> 1 -> 8 -> 3 -> 6 ...).

What do you think of this?

(I looked for this function in XnView and in the suggestion forum and did not find it).
Ok, i'll add that
Pierre.

User avatar
Anika
Posts: 85
Joined: Wed Jul 28, 2004 12:18 pm

Post by Anika » Tue Sep 11, 2007 9:12 am

ben.che: I used to change the orientation with stereo photo maker. I don't know your program, but I don't want to test it because I need to install .net framework.
I suggested this feature here:
http://newsgroup.xnview.com/viewtopic.p ... rientation
The other parameters (010e Image description, 8298 Copyright, 9286 Exif user comment) would also be good to be writable.

I'm happy that Pierre now wants to add this.
XnView 2.04, 2.13 Windows 2000 SP4 and Windows XP SP3 and Windows 7 64bit

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

Post by xnview » Tue Sep 11, 2007 9:22 am

Anika wrote:ben.che: I used to change the orientation with stereo photo maker. I don't know your program, but I don't want to test it because I need to install .net framework.
I suggested this feature here:
http://newsgroup.xnview.com/viewtopic.p ... rientation
The other parameters (010e Image description, 8298 Copyright, 9286 Exif user comment) would also be good to be writable.

I'm happy that Pierre now wants to add this.
There is a problem with variable length field like copyright or user comment. If i rewrite EXIF, makernotes are deleted. But perhaps not a problem for most users???
Pierre.

ilgaspa
Posts: 29
Joined: Fri Mar 23, 2007 8:39 am

Post by ilgaspa » Tue Sep 11, 2007 1:05 pm

Please do not remove the makernotes! The great thing about xnview is that it doesn't alter them: these maker fields contains sometimes fundamental informations for photo workflow ^_^ So please, if you choose to do so, at least make it user selectable or give a big, big big warning popup :)

User avatar
Anika
Posts: 85
Joined: Wed Jul 28, 2004 12:18 pm

Post by Anika » Tue Sep 11, 2007 1:21 pm

Why should the markernotes be affected? With Exifer it works fine to change these tags without any data loss. So there must be a way. I hope you find it.
Anika
XnView 2.04, 2.13 Windows 2000 SP4 and Windows XP SP3 and Windows 7 64bit

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

Post by xnview » Tue Sep 11, 2007 1:52 pm

Anika wrote:Why should the markernotes be affected? With Exifer it works fine to change these tags without any data loss. So there must be a way. I hope you find it.
Perhaps for some makernotes, but not all, i'll test. It's very difficult to keep Makernotes (no specs)
Pierre.

scw2wi
Posts: 26
Joined: Fri Jul 06, 2007 10:41 am
Contact:

Wrong rotation display in most viewers

Post by scw2wi » Mon Oct 08, 2007 4:43 pm

In most Viewers (including Vista Explorer) the orientation of portrait JPEGs is wrong,
only XnView and some other viewers are showing the correct rotation according to the orientation flag.

If I rotate a picture in the new Nikon ViewNX, only the orientation flag is changed (in NEF and also in JPEGs).
This rotated picture is show correct in XnView.
If I recreate the EXIF-Thumbnail in XnView, the orientation is not correct any more (maybe a bug).

I'm not happy with the orientation flag at the moment and would still prefer to rotate the whole picture.

Walter
Walter

User avatar
Karl02
Posts: 134
Joined: Mon Sep 03, 2007 1:00 pm
Location: Germany

Post by Karl02 » Sun Jan 06, 2008 12:53 am

I support this feature. However, the displayed value of the Exif orientation flag should always be that which is saved in the file. See also: Once more: EXIF Orientation.

Gnome gThumb has this Exif rotation feature. When selecting the lossless rotation, there is an option "Apply physical transform". If this is not selected, only the Exif orientation tag will be changed.
-- Karl

scw2wi
Posts: 26
Joined: Fri Jul 06, 2007 10:41 am
Contact:

Post by scw2wi » Sun Jan 06, 2008 8:19 am

I think there are 3 different cases:

1) Temporary rotate an image for display according to the orientation flag should not change the orientation flag.

2) Permanent rotation of an image with lossless JPEG rotation should reset the orientation flag, so that this image is not again rotated by any viewer.

3) Permanent lossless rotation by just changing the rotation flag, like Nikon ViewNX is doing. Rotating an image like this will not change the JPEG data itself.

I'm not sure, how to correctly handle the embedded thumbnails, and if there is any extra thumbnail rotation flag in EXIF data.
I know many pictures with rotated images but not rotated thumbnails. XnView can recreate the thumbnail so that this error caused by other software is corrected.
But if I recreate in XnView the thumbnail of a picture that is rotated by ViewNX, the orientation of the thumbnail picture is not correct any more.
Walter

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

Post by xnview » Sun Jan 06, 2008 5:25 pm

Karl02 wrote:I support this feature. However, the displayed value of the Exif orientation flag should always be that which is saved in the file. See also: Once more: EXIF Orientation.

Gnome gThumb has this Exif rotation feature. When selecting the lossless rotation, there is an option "Apply physical transform". If this is not selected, only the Exif orientation tag will be changed.
Ok, so an option will be good to make a JPEG lossless rotation (like now) or to change only the orientation flag in EXIF
Pierre.

jollyb
Posts: 1
Joined: Sat Jan 26, 2008 5:48 pm

Post by jollyb » Sat Jan 26, 2008 6:23 pm

i have a problem with the picture orientation in thumbnails. i've put an screenshot:
Image

i have also removed in options to automatically rotate the picture, but it is always the same.
this is probably the problem that is been discussed in this topic. will that be fixed?

p.s. simple as can be: thanks for the excellent program! :)

scw2wi
Posts: 26
Joined: Fri Jul 06, 2007 10:41 am
Contact:

Post by scw2wi » Sat Jan 26, 2008 8:31 pm

How did you create this picture?
Is it a picture out of the camera,
or did you made any rotations with any software.

There is a lot of software that cannot handle the orientation tag correct.
XnView can handle the tag, but there is a small bug by recreating the thumbnail of a rotated picture.

There are so many different cases to handle, it's amazing.
When you take a picture in portrait format, some cameras can save this in EXIF, some do not.
When you rotate a picture, some software is rotating the JPEG but forgetting to reset the tag,
some software is just changing the tag, some software is forgetting to rotate the thumbnail.

So it's very easy to get inconsistency between the picture and it's thumbnail.
Walter

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

Post by xnview » Sun Jan 27, 2008 7:42 pm

jollyb wrote: i have also removed in options to automatically rotate the picture, but it is always the same.
this is probably the problem that is been discussed in this topic. will that be fixed?
Could you send me the file?
Pierre.

User avatar
helmut
Posts: 8153
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut » Mon Jan 28, 2008 9:41 am

scw2wi wrote:... So it's very easy to get inconsistency between the picture and it's thumbnail.
Yes, this can happen depending on the process and software used. Background info and some trouble shooting is provided in FAQ 'How to rotate images automatically'.

Post Reply