[Cl-jpeg-devel] some cl-jpeg issues

Cyrus Harmon ch-lisp at bobobeach.com
Mon Mar 14 21:58:24 UTC 2011


Howdy folks,

First of all, I just committed a change to the CVS repo that renames all of the *foo* constants (those defined with defconstant anyway (and define-constant)) to be +foo+ instead of *foo* (or in some cases just foo).

But there are a couple of other things I wanted to mention:

1. writing grayscale jpeg images

If I want to write a grayscale image, I have to call encode-image-stream with the &key args :q-tabs (vector jpeg::*q-luminance*) . This isn't a horrible inconvenience, but it would be nice if this just worked out of the box. if not, we should at least export *q-luminance*.

2. image quality

it appears to me that even at the highest quality settings the jpeg images I write out aren't as good as those encoded with other jpeg encoders (more visual artifacts, smaller file size).

I'm trying to get high quality images with the following:

(jpeg::encode-image-stream stream jpeg-array +ncomp-rgb+ height width
                                    :sampling '((1 1)(1 1)(1 1))
                                    :q-tabs (vector jpeg::*q-luminance-hi*
                                                      jpeg::*q-chrominance-hi*))

which brings me to point 3:

3. We should probably export encode-image-stream. Any objections?

Thanks,

Cyrus





More information about the cl-jpeg-devel mailing list