Page 1 of 1
"-orient" doesn't seem to work
Posted: 2010-08-05T23:57:35-07:00
by Drarakel
"-orient" should update the EXIF orientation tag - right? If yes, then that option doesn't work at the moment.
Take that logo image, for example:
http://i.imagehost.org/0889/logo1.jpg
Code: Select all
convert logo1.jpg -orient BottomRight logo2.jpg
identify -format "%[EXIF:Orientation]" logo2.jpg
0
Should be '3' in that example. But whatever orientation is specified - the value is always reset to 0 (Undefined).
That wrong result can even be seen in the example in the documentation:
http://www.imagemagick.org/Usage/photos/#orient
Using IM v6.6.3-2 Q16, Windows XP.
Re: "-orient" doesn't seem to work
Posted: 2010-08-06T09:38:54-07:00
by fmw42
I confirm this on IM 6.6.3.2 Q16 Mac OSX Tiger:
convert logo: logo.png
identify -verbose logo.png
...
Orientation: Undefined
convert logo.png -orient bottomleft logo2.png
identify -verbose logo2.png
...
Orientation: Undefined
Re: "-orient" doesn't seem to work
Posted: 2010-08-07T12:52:31-07:00
by fmw42
Not sure you have had time to address this, but it still exists in IM 6.6.3.3 Q16 Mac OSX tiger.
Re: "-orient" doesn't seem to work
Posted: 2010-08-07T17:32:10-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick-6.6.3-4 Beta available by sometime tomorrow. Thanks.
Re: "-orient" doesn't seem to work
Posted: 2010-08-08T21:51:09-07:00
by fmw42
this still does not appear to work in IM 6.6.3.4 Q16 Mac OSX tiger
convert logo.png -orient bottomleft logo2.png
identify -verbose logo2.png
...
Orientation: Undefined
Am I missing something?
Re: "-orient" doesn't seem to work
Posted: 2010-08-09T02:46:30-07:00
by Drarakel
For me, it works now. Thanks!
fmw42 wrote:convert logo.png -orient bottomleft logo2.png
identify -verbose logo2.png
...
Orientation: Undefined
Am I missing something?
I think, "-orient" only
updates the orientation tag. So, this works only if there is already an EXIF orientation tag in the input file.
Not sure if someone would notice it - but the documentation could be updated, too:
http://www.imagemagick.org/Usage/photos/#orient
The example "convert pagoda_sm.jpg -orient bottom-right -format '%[exif:orientation]' info:" should result in the value '
3' now, not '0' (
http://www.imagemagick.org/Usage/photos ... etting.txt).
Re: "-orient" doesn't seem to work
Posted: 2010-08-09T09:14:55-07:00
by fmw42
I
think, "-orient" only updates the orientation tag. So, this works only if there is already an EXIF orientation tag in the input file.
This produces no result:
convert logo.png -orient bottomleft logo2.png
convert logo2.png -format '%[exif:orientation]' info:
Is this because of the reason stated above? Do I have to create a new exif tag for orientation before it will write the right value?
Re: "-orient" doesn't seem to work
Posted: 2010-08-09T16:26:16-07:00
by Drarakel
fmw42 wrote:Do I have to create a new exif tag for orientation before it will write the right value?
It seems so, yes.
You could test the commands with the file from the first post ('logo1.jpg'), for example. Before v6.6.3-4, the usage of "-orient" always resulted in value 0 (Undefined) when there was an orientation tag in the file. Now, the usage of this option works for these cases.
Re: "-orient" doesn't seem to work
Posted: 2010-08-09T16:47:32-07:00
by fmw42
Drarakel wrote:fmw42 wrote:Do I have to create a new exif tag for orientation before it will write the right value?
It seems so, yes.
You could test the commands with the file from the first post ('logo1.jpg'), for example. Before v6.6.3-4, the usage of "-orient" always resulted in value 0 (Undefined) when there was an orientation tag in the file. Now, the usage of this option works for these cases.
Is it reasonable to assume/believe/desire that if one issued the command -orient, that if there was no orientation tag already, it would then create one, if needed? Is there any reason one might not want this behavior?
Re: "-orient" doesn't seem to work
Posted: 2010-08-09T17:38:22-07:00
by anthony
fmw42 wrote:Is it reasonable to assume/believe/desire that if one issued the command -orient, that if there was no orientation tag already, it would then create one, if needed? Is there any reason one might not want this behavior?
That seems reasonable. But it would have to be clear in the documentation that this is what is happening.
This can be especially important to note when you give arguments like..
-strip -orient bottom-left Which I would then assume any old profile would be first junked, then a minimal new and mostly blank profile added.
However some other EXIF settings could conceivably bleed though into the new EXIF profile. For example labels, captions and comments, which are the three free-form plain text meta-data entries. Also density (resolution) Not certain which of these are also part of the EXIF profile, and which are stripped by -strip.
As such some careful though about EXACTLY what should happen is needed. Exactly What 'creates' a new profile?
Re: "-orient" doesn't seem to work
Posted: 2010-08-09T17:51:47-07:00
by fmw42
I understand. I was just raising this for discussion. If one wants to leave it alone, then it should be made clear that -orient won't be set unless there is a profile at least an exif tag set for it already.
I was hoping to hear back from people who make use of this more as I have not used it, yet, in my work.
Re: "-orient" doesn't seem to work
Posted: 2010-08-09T19:02:52-07:00
by Drarakel
fmw42 wrote:Is it reasonable to assume/believe/desire that if one issued the command -orient, that if there was no orientation tag already, it would then create one, if needed?
Sure - that would be preferable for me, too.