ImageIO encode split page with original params?
Hey all,
I'm working with TIFF's and the ImageIO library. I split out a single page from a TIFF and then re-encode it, but I can not figure out how to re-encode with the exact same configuration of the original TIFF (i.e. compression, resolution, white/black, etc.).
Is there some way to do this please? Attached is my working code if this helps!
-D
/******
Iterator writers = javax.imageio.ImageIO.getImageWritersByFormatName("tiff");
javax.imageio.ImageWriter writer = (javax.imageio.ImageWriter)writers.next();
ByteArrayOutputStream out = new ByteArrayOutputStream();
javax.imageio.stream.ImageOutputStream ios = javax.imageio.ImageIO.createImageOutputStream(out);
ImageReadParam rparam = imageReader.getDefaultReadParam();
TIFFImageWriteParam writeParam = (TIFFImageWriteParam)writer.getDefaultWriteParam();
writer.setOutput(ios);
writer.write(iiometadata,iioimage,writeParam);
ios.flush();
return out.toByteArray();
*****/

