ImageMagick chokes on strange TIFF fields
Posted: 2008-07-02T08:27:28-07:00
Hi.
I'm trying to use ImageMagick (Magick++, actually) to process a load of TIFF files, but they all have an unknown field with tag 34680 (0x8778). It doesn't seem to affect their usage in other programs, as both OpenOffice and the GIMP (among others) can display them, with the GIMP giving a warning about the very same tag being unknown.
The problem arises when I try to open one of the files - both the newest (Windows) version from your website (6.4.2-1-Q16) and the older version which my development (Linux) system has packages installed for (6.3.5.10-2) exhibit this problem. The command-line utilities from both Windows and Linux load the image, but complain about this field and exit looking very unhappy and worded like they didn't actually do any conversion (they do convert it, however).
The program which I'm writing to do the processing just dies upon reading it, exiting back to the command line with an exception: "Caught exception: ImageMagick: L2BF0002.TIF: unknown field with tag 34680 (0x8778) encountered. 'TIFFReadDirectory'". I pretty much copied the image reading code from your Magick++ documentation: wrapping it in a try-catch pair like in the first example here, and that is what's causing the program to exit. My knowledge of C++ is extremely limited, so I don't know how to identify or deal with this special case.
I've got hundreds of image files like this, here's one of them.
Would someone please be able to tell me how to get around this little problem (other than removing the exception code)?
Thanks in advance.
I'm trying to use ImageMagick (Magick++, actually) to process a load of TIFF files, but they all have an unknown field with tag 34680 (0x8778). It doesn't seem to affect their usage in other programs, as both OpenOffice and the GIMP (among others) can display them, with the GIMP giving a warning about the very same tag being unknown.
The problem arises when I try to open one of the files - both the newest (Windows) version from your website (6.4.2-1-Q16) and the older version which my development (Linux) system has packages installed for (6.3.5.10-2) exhibit this problem. The command-line utilities from both Windows and Linux load the image, but complain about this field and exit looking very unhappy and worded like they didn't actually do any conversion (they do convert it, however).
The program which I'm writing to do the processing just dies upon reading it, exiting back to the command line with an exception: "Caught exception: ImageMagick: L2BF0002.TIF: unknown field with tag 34680 (0x8778) encountered. 'TIFFReadDirectory'". I pretty much copied the image reading code from your Magick++ documentation: wrapping it in a try-catch pair like in the first example here, and that is what's causing the program to exit. My knowledge of C++ is extremely limited, so I don't know how to identify or deal with this special case.
I've got hundreds of image files like this, here's one of them.
Would someone please be able to tell me how to get around this little problem (other than removing the exception code)?
Thanks in advance.