[JAVA2D] Unable to convert 32bpp TIFFs to PNG.
I have a small image processing servlet, that does;
m_Format = "png" in this case.
private void write( BufferedImage image )
throws ProcessingException, IOException
ImageTypeSpecifier its = ImageTypeSpecifier.createFromRenderedImage(
Iterator writers = ImageIO.getImageWriters( its, m_Format );
ImageWriter writer = null;
if( writers.hasNext() )
writer = (ImageWriter) writers.next();
if( writer == null )
throw new ProcessingException( "Unable to find a ImageWriter: " +
/// And so on....
The effectsStack is basically a set of ImageOp's, mostly used is the Scale.
Now, if I take a 32bpp TIFF and feed it to the routine above, Image I/O won't
find a writer for it, but a 24bpp TIFF is no problem.
(I don't think it matters; prior to the write operation, the TIFF has been
rescaled using java.awt.image raster operations, but the ColorModel from the
incoming BufferedImage is used for the new rescaled image.)
Anyone have a clue why this seems to be the case?
To unsubscribe, send email to email@example.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
firstname.lastname@example.org and include in the body of the message "help".