On my Windows 7 box, identify reads the IPTC data. On my cP
Posted: 2012-03-28T13:48:32-07:00
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
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