Page 1 of 2

EXIF lossless rotation

Posted: Mon Sep 10, 2007 2:14 pm
by ben.che
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

Re: EXIF lossless rotation

Posted: Mon Sep 10, 2007 3:39 pm
by xnview
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

Posted: Tue Sep 11, 2007 9:12 am
by Anika
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.

Posted: Tue Sep 11, 2007 9:22 am
by xnview
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???

Posted: Tue Sep 11, 2007 1:05 pm
by ilgaspa
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 :)

Posted: Tue Sep 11, 2007 1:21 pm
by Anika
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

Posted: Tue Sep 11, 2007 1:52 pm
by xnview
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)

Wrong rotation display in most viewers

Posted: Mon Oct 08, 2007 4:43 pm
by scw2wi
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

Posted: Sun Jan 06, 2008 12:53 am
by Karl02
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.

Posted: Sun Jan 06, 2008 8:19 am
by scw2wi
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.

Posted: Sun Jan 06, 2008 5:25 pm
by xnview
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

Posted: Sat Jan 26, 2008 6:23 pm
by jollyb
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! :)

Posted: Sat Jan 26, 2008 8:31 pm
by scw2wi
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.

Posted: Sun Jan 27, 2008 7:42 pm
by xnview
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?

Posted: Mon Jan 28, 2008 9:41 am
by helmut
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'.