private byte[] toZLIB(RenderedImage image,Color bkg,String colorModel) throws IOException {
  return ImageGraphics2D.toByteArray(image,ImageConstants.RAW,ImageConstants.ENCODING_FLATE_ASCII85,ImageGraphics2D.getRAWProperties(bkg,colorModel));
}

private byte [ ] toZLIB ( RenderedImage image , Color bkg , String colorModel ) throws IOException { return ImageGraphics2D . toByteArray ( image , ImageConstants . RAW , ImageConstants . ENCODING_FLATE_ASCII85 , ImageGraphics2D . getRAWProperties ( bkg , colorModel ) ) ; }
creates the zlib bytes for pdf images
