ImageMagick COM Object Not Hiding Errors With TIFF Files
Posted: 2007-09-26T08:24:00-07:00
I'm using v6.3.5 of Imagemagick:
Here's a snippet of the code:
The program tries to identify the image and the exception returns:
Any ideas? I apologize beforehand if I missed anything in the forum that might have solved this problem or if there's something documenting a way to work around/with this.
Here's the sample image I'm working with:
http://public.strahd98.fastmail.fm/work/0000002A.TIF
I'm writing an application in VB.NET (VS2005) that redacts specific fields on specific pages in a multi-page TIFF file. I can run the convert command from the command prompt and when I use the "-quiet" option, it hides the errors:identify -version
Version: ImageMagick 6.3.5 09/18/07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2007 ImageMagick Studio LLC
However, when I run it from the program, an exception happens and I can't proceed further. This happens when I use the identify command as well.identify 0000002A.TIF
0000002A.TIF TIFF 2544x3298 2544x3298+0+0 DirectClass 1-bit 78.6523kb 0.156u 0:01
identify: 0000002A.TIF: unknown field with tag 33000 (0x80e8) encountered. `TIFFReadDirectory'.
identify -quiet 0000002A.TIF
0000002A.TIF TIFF 2544x3298 2544x3298+0+0 DirectClass 1-bit 78.6523kb 0.172u 0:01
Here's a snippet of the code:
Code: Select all
Dim paramsList As ArrayList
paramsList = New ArrayList()
paramsList.Add("-quiet")
paramsList.Add(docObj.Path)
Try
Dim params1 As Object() = paramsList.ToArray(Type.GetType("System.Object"))
magickObj.Identify(params1)
' retrieve page count here....
Catch ex As Exception
Exit Sub
End Try
I don't have an option of changing the TIFF file to get rid of the warnings, but it appears the "-quiet" option is not working correctly.? ex.Message
"identity: 350: C:\Release\Images\0000002A.TIF: unknown field with tag 33000 (0x80e8) encountered. `TIFFReadDirectory':
"
Any ideas? I apologize beforehand if I missed anything in the forum that might have solved this problem or if there's something documenting a way to work around/with this.
Here's the sample image I'm working with:
http://public.strahd98.fastmail.fm/work/0000002A.TIF