Page 1 of 1

identify does not correctly detect exif encoding

Posted: 2010-04-26T04:51:24-07:00
by suweller
I have the following version of identify:

Code: Select all

$ identify --version
Version: ImageMagick 6.5.1-0 2009-08-27 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
when I execute:

Code: Select all

$ identify -format "%[IPTC:2:25]" ~/Desktop/large_2010_4_430069-full.jpeg
Blume;Bl�te;Fr�hling;Sommer;Bl�tter
Just in case it will correctly display this in IE or windows browsers, special characters are replaced with a black "<?>" character

If someone wants to reproduce this, just download my avatar and run the identify command as mentioned above on it.

Re: identify does not correctly detect exif encoding

Posted: 2010-04-26T06:07:29-07:00
by magick
Post a URL to your image. We tried your avatar but it has an EXIF profile but does not include an IPTC profile.

Re: identify does not correctly detect exif encoding

Posted: 2010-04-26T06:27:15-07:00
by suweller
You are quite correct. I have uploaded the original image here.

Also, I should have named this topic 'identify does not correctly detect IPTC character encoding'

Thanks for the quick response.

Re: identify does not correctly detect exif encoding

Posted: 2010-04-26T09:44:12-07:00
by magick
Can you be specific on when it is failing to display properly? We tried your command on on Linux box and the accent characters displayed properly.

Re: identify does not correctly detect exif encoding

Posted: 2010-04-26T13:45:14-07:00
by suweller
That is strange... I ran the command on linux too...
I opened a gnome terminal on ubuntu 9.10, ran the command and it failed to display special characters.

What kind of linux box did you run it on?

Re: identify does not correctly detect exif encoding

Posted: 2010-04-26T15:37:41-07:00
by magick
We're running CentOS 5.4.

Re: identify does not correctly detect exif encoding

Posted: 2010-04-26T19:31:17-07:00
by snibgo
IM is emitting the strings as character set ISO-8859-1. They appear to be in the file as both ISO-8859-1 and Unicode. (I don't know where IM gets the data from.)

When I set a Ubuntu 9.04 terminal as character set ISO-8859-1, I get characters with umlauts.

Re: identify does not correctly detect exif encoding

Posted: 2010-05-06T02:22:35-07:00
by suweller
Hi,

Thank you for your help. It does seem to be terminal/system settings.

ImageMagick returns IPTC data as latin-1 but my system is set to utf8.
The code below displays the image IPTC data correctly.

Code: Select all

identify -format "%[IPTC:2:25]" ~/Desktop/large_2010_4_430069-full.jpeg | iconv -f latin1 -t utf8 -
Is this a problem of my system which should have a setting somewhere stating which encoding it uses or does ImageMagick simply ignore my terminal character encoding?