Handle embedded TIFFs gracefully

10 views
Skip to first unread message

Cafebabe

unread,
May 25, 2009, 11:24:39 AM5/25/09
to jOpenDocument
With tiff images the library throws an exception:

java.lang.IllegalStateException: Unable to load:'Pictures/
1000000000000B1D00000273DF35B153.tif'
at org.jopendocument.model.OpenDocument.getImage(Unknown Source)
at org.jopendocument.model.OpenDocument.preloadImage(Unknown Source)
at org.jopendocument.io.SaxContentUnmarshaller.startElement(Unknown
Source)
...

Maybe its better to a) just ignore tiffs or b) delegate to an optional
tiff-library like Java Advanced Imaging (JAI) if this is found in the
classpath.

jOpenDocument, Guillaume

unread,
May 25, 2009, 11:37:01 AM5/25/09
to jopend...@googlegroups.com
Hi,

Sure, it's a problem... the image is loaded by the java.awt.MediaTracker
which is not very happy with tiffs...
I will add your b) solution on the todolist for the next version.

Thanks for your report.

Regards,
Guillaume

Reply all
Reply to author
Forward
0 new messages