Hi fellow Batik developers, I'm using Batik to convert SVG to TIFF. The problem I have is that I want the generated TIFF to be RGB (no alpha channel). With the TIFFTranscoder, the default TIFF is ARGB. So I first generate the ARGB TIFF and then I try to convert it to RGB using TIFFImageDecoder and TIFFImageEncoder. With the following code:
TIFFImageDecoder decoder = new TIFFImageDecoder (inputStream, new TIFFDecodeParam()); TIFFImageEncoder encoder = new TIFFImageEncoder (outputStream, new TIFFEncodeParam()); RenderedImage renderIn = (RenderedImage)decoder.decodeAsRenderedImage(0); BufferedImage bufImage = new BufferedImage(renderIn.getWidth(), renderIn.getHeight(), BufferedImage.TYPE_INT_RGB); FormatRed renderOut = new FormatRed(GraphicsUtil.wrap(renderIn), bufImage.getColorModel()); encoder.encode(renderOut); I have a mismatch of type because the SampleModel of bufImage has INT data type and the raster of renderIn has BYTE data type. I thought that FormatRed deals with this conversion. What do you think it's the cause? How could I do it in other way? Thanks a lot for your advice, Felicia --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]