[gs-devel] Is there a way to write DCT encoded images with pdfwrite?

David Kastrup dak at gnu.org
Wed Jan 24 23:43:12 PST 2007


Note aside: after 6 attempts of posting to the list in different ways
and from different computers which got silently dropped without any
feedback, I mailed the moderators who told me about the magic
keyphrase you have to put into the headers in order to get postings
delivered to the list.  I want to point out that this procedure is
neither mentioned on the list page at
<URL:http://www.ghostscript.com/mailman/listinfo/gs-devel> (which is
where Google will lead you when asking about the list), nor is it
mentioned in the "welcome" mail you get when subscribing.  I consider
this an extremely annoying way of turning away contributors.  The
least one could expect is that the subscription message and the list
info page would mention that all contributions are going to get
scrapped silently unless specifically treated.  At _no_ point in the
whole subscription process was _anything_ proferred which would have
enabled me to guess something like that.

After getting this off my chest:

Hi,

I have the problem here that ps2pdf reencodes JPEG images, leading
either to additional quality loss or large file sizes (actually, it
would be somewhat interesting finding out why this would be so: after
all, the lossy quantization has already occured and reencoding the
image at full quality should rearrive at the original).

So the idea was to patch up the `filter' function and make it track
DCTDecode operations in order to have the corresponding DCTEncode step
bystep the reencoding and instead inject the original data stream.

This can be done in PostScript.  However, the principal way of writing
graphics to the pdfwrite device would be using the "image" operator
and I don't see how I could persuade this operator to refrain from
reencoding a DCT encoded image source.

Is there any operation that would allow one to generate an image in
the course of using a ps2pdf session that took its DCTEncoded data
straight from the horse's mouth instead of encoding it itself?

-- 
David Kastrup



More information about the gs-devel mailing list