Hi All,
I'm struggling with a behavioral difference between ImageMagick on my Windows 7 workstation, and my cPanel (CENTOS 5.8 x86_64 standard) webserver. I think the issue may be related to libtiff, but I'm not sure, and I would greatly appreciate some input and direction from those more knowledgeable than I! Below is my best shot at describing all the relevant info:
We have a library of 15,000+ TIFF images. Every one of them had metadata added via Adobe Photoshop (versions of Photoshop used vary, as the library was built over a period of decades).
On my Windows 7 workstation, I found that for every image I tested, identify -verbose {tiffimage} would produce all the info on the image, including the keywords, description, copyright, and author, under a block labeled Profile-iptc.
So, this was great. In order to extract all the image metadata and put it in a database, I could write a script that ran through the all images, parsed the identify output, and wrote it into a database in a searchable, normalized format.
However, what I discovered was that when I ran identify on the webserver, it was missing the entire Profile-iptc section. I also noted that it would output these warning message at the end of its output:
identify: AGST-31239.tif: wrong data type 7 for "XMLPacket"; tag ignored. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/707.
identify: AGST-31239.tif: wrong data type 7 for "RichTIFFIPTC"; tag ignored. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/707.
identify: AGST-31239.tif: wrong data type 7 for "Photoshop"; tag ignored. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/707.
First I thought that it was because I have a more recent version of ImageMagick (v6.7.6-0) on my Windows 7 computer, and the webserver has ImageMagick v6.7.1-7. So, I downloaded the latest version of ImageMagick, v6.7.6-2, and put it on the webserver in the folder, ran ./configure and make in the folder where I downloaded it, and this generated the ImageMagick executables in the utilities subfolder. But the identify I had just compiled was still unable to read all the metadata. No Profile-iptc section was present in the output.
So, I don't think it's an ImageMagick version difference.
Then I thought, perhaps it's a difference in libtiff. I have libtiff 3.8.2 on the webserver. But try as I might, I couldn't find what version of libtiff was bundled with the Windows download of ImageMagick. What is it? I downloaded the ImageMagick-6.7.6-0-Q16-windows-dll.exe version, which is described as "Win32 dynamic at 16 bits-per-pixel".
On the webserver shell, I tried yum update libtiff, but apparently I've got the latest version of libtiff in our repository, so I'll have to go through the process of manually trying to update libtiff--or is there a better way? Is there some way to use "delegates" as a drop-in replacement for libtiff? Am I barking up the wrong tree by investigating libtiff?
So, I'm interested in any thoughts or pointers on how I can get this working on our CentOS webserver. I'm venturing outside my realm of experience here trying to get this working, so I'd appreciate any specifics you can provide. I may be missing something completely obvious... ?
-Josh
On my Windows 7 box, identify reads the IPTC data. On my cP
Re: On my Windows 7 box, identify reads the IPTC data. On m
One other thing: I have been opening the various TIFF images in Notepad++, and so far every image that has had the keywords not displayed by the identify utility, has also had to <x:xmpmeta> blocks, one at the beginning of the TIFF image, and one at the end.
All the files that identify on the server showed the keywords for, had only one <x:xmpmeta> block.
And, as you're probably guessing, the keywords are showing up in the second <x:xmpmeta> block, for the images that have more than one <x:xmpmeta> block.
-Josh
All the files that identify on the server showed the keywords for, had only one <x:xmpmeta> block.
And, as you're probably guessing, the keywords are showing up in the second <x:xmpmeta> block, for the images that have more than one <x:xmpmeta> block.
-Josh
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: On my Windows 7 box, identify reads the IPTC data. On m
Have you checked the versions of libtif? Have you put the most current version of IM on both your platforms?
Also you might try using tiffinfo <yourimage> and see what info it shows.
If you have a tiff image that you do not think works right in IM, if you can post a link to it, others can test of various platforms. I can test on my Mac OSX and others can test on various Linux systems. Post the verbose info that you get as well from your windows and from your unix boxes identifying the missing section(s).
Also you might try using tiffinfo <yourimage> and see what info it shows.
If you have a tiff image that you do not think works right in IM, if you can post a link to it, others can test of various platforms. I can test on my Mac OSX and others can test on various Linux systems. Post the verbose info that you get as well from your windows and from your unix boxes identifying the missing section(s).