Hi, I'm attempting to use iText to create a PDF containing a bitmap image. The bitmap image is large, but a simple monochrome image with one bit per-pixel. When creating a PDF containing an image like this, the image stream is always encoded as a CCITT stream. This gives fairly poor compression, and I would like to compress using Deflate as that compresses this particular image very well.
But, I can't figure out how to get this to work. I've modelled my code on the compression levels image example, found here: http://1t3xt.info/examples/browse/?page=example&id=404 The only major change I've made to that code is to load the bitmap from a file using a FileInputStream, and then use the Image.getInstance() overload that produces an ImgRaw from a width, height, components, bits per component and a byte array. And all of the different levels compress the image identically, in fact the final PDF files are indistinguishable. How do I get monochrome raw images to be compressed using deflate? Thanks, Giles ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
