| From | Sent On | Attachments |
|---|---|---|
| Fabrizio Giudici | Jun 14, 2007 4:48 am | |
| mja...@union06.de | Jun 14, 2007 5:08 am | |
| Fabrizio Giudici | Jun 14, 2007 5:20 am | |
| robert engels | Jun 14, 2007 6:41 am | |
| Fabrizio Giudici | Jun 14, 2007 1:55 pm | |
| robert engels | Jun 14, 2007 2:25 pm | |
| Fabrizio Giudici | Jun 14, 2007 4:07 pm | |
| jai-...@javadesktop.org | Jun 14, 2007 6:14 pm | |
| robert engels | Jun 14, 2007 6:26 pm | |
| Brian Burkhalter | Jun 14, 2007 6:28 pm | |
| robert engels | Jun 14, 2007 6:30 pm | |
| Brian Burkhalter | Jun 14, 2007 6:31 pm | |
| mja...@union06.de | Jun 15, 2007 12:09 am |
| Subject: | Strange problem with TIFF reading on Mac OS X | |
|---|---|---|
| From: | Fabrizio Giudici (Fabr...@tidalwave.it) | |
| Date: | Jun 14, 2007 4:48:20 am | |
| List: | net.java.dev.jai-imageio.interest | |
Hello.
I use the following code to find out the ImageReader to deal with a certain file:
private static ImageReader createImageReader (final ImageInputStream imageInputStream, final String suffix) throws IOException { try { for (Iterator<ImageReader> iterator = ImageIO.getImageReadersBySuffix(suffix); iterator.hasNext();) { ImageReader reader = iterator.next(); String pluginClassName = reader.getOriginatingProvider().getPluginClassName();
logger.finer(">>>> testing reader: " + reader + ", pluginClassName: " + pluginClassName);
if ((reader != null) && !unwantedPlugins.contains (pluginClassName) && reader.getOriginatingProvider().canDecodeInput (imageInputStream)) { reader.setInput(imageInputStream); logger.finer(">>>> returning reader: " + reader + ", pluginClassName: " + pluginClassName); return reader; } }
throw new IOException("No ImageReader for the suffix: " + suffix); }
Of course JAI-IMAGEIO is in the classpath. In facts in the log I see:
13:24:02.810 [AWT-EventQueue-1 ] FINE ReadOp - getImageReader(/Users/fritz/Business/Tidalwave/Projects/blueMarine/ Test/Pleiades Small Set/w1.tif) 13:24:02.810 [AWT-EventQueue-1 ] FINER ReadOp - >>>> suffix is tif 13:24:02.812 [AWT-EventQueue-1 ] FINER ReadOp - >>>> testing reader: com.sun.imageio.plugins.tiff.TIFFImageReader@5b8c7f, pluginClassName: com.sun.imageio.plugins.tiff.TIFFImageReader
Nevertheless, the "canDecodeInput()" returns false and the method fail. This happens only on Mac OS X; the same application works fine with Linux and Windows. What's the problem?
PS Maybe I've read in the past months about a possible problem with TIFFs and Mac OS X but I can't recall.
-- Fabrizio Giudici, Ph.D. - Java Architect, Project Manager Tidalwave s.a.s. - "We make Java work. Everywhere." weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog Fabr...@tidalwave.it - mobile: +39 348.150.6941





