[Gnome-print] Encoding in postscript output



I've been playing with getting a 48MB PS file (a 300dpi, 8.5x11,
24-bit color bitmapped image) down to a reasonable size.  I've found
that for my particular image, I can reduce it to 29MB by using ASCII85
encoding, and further reduce it to <1MB by using RunLength encoding
and ASCII85 encoding.  At this size, it prints about 10 times faster
(1 minute instead of 10)

Barring objections, I'm going to start work on integrating these
encodings into gnome-print for images.  The encoding code seems to be
there already for PDF files, and I have a working implementation of
encoders/decoders in Perl to work with.

My plan is to fix up the PDF encoders so they can work with blocks at
a time, instead of requiring the whole string to be read in, as
discussed near the top of gnome-print-pdf.c.

I'll then create a compile-time option to encode images with
RLE+ASCII85 instead of ASCIIHex.

My current implementation will add about 700 bytes of overhead to
every postscript output file, to define a wrapper for showimage that
makes decoding straightforward.  Is there any way around this for
documents that don't use images at all?

I'll probably rewrite the current hex conversion stuff to use a hex
encoder in the same style as the RLE and ASCII85 encoders, for
consistency's sake.

Anybody have any thoughts/advice/objections?

-----ScottG.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]