Home

Awesome

Build Status

CL-JPEG

Baseline JPEG codec written in Common Lisp. Up-to-date source is hosted on GitHub.

Written by Eugene Zaikonnikov, 1999-2017. Valuable contributors, in no particular order: Henry Harrington, Kenan Bölükbaşı, Manuel Giraud, Cyrus Harmon and William Halliburton.

Image Format

Decoding

(DECODE-IMAGE FILENAME &KEY BUFFER (COLORSPACE-CONVERSION T) CACHED-SOURCE-P)

Returns (multiple-valued) decoded IMAGE array in the same format as encoder source image, image HEIGHT and image WIDTH.

(DECODE-STREAM STREAM &KEY BUFFER (COLORSPACE-CONVERSION T) DESCRIPTOR CACHED-SOURCE-P)

Returns (multiple-valued) decoded IMAGE array in the same format as encoder source image, image HEIGHT and image WIDTH.

(ALLOCATE-BUFFER HEIGHT WIDTH NCOMP)

Allocates and retruns a buffer suitable for storage of the output image in the specified geometry.

(JPEG-FILE-DIMENSIONS FILENAME)

Returns image height, width, number of components, and the type of Adobe colorpsace transform encoded in the image (:YCBCR-RGB, :YCCK-CMYK).

(CONVERT-CMYK-TO-RGB BUFFER H W &key RGB-BUFFER)

Returns an RGB conversion of the supplied CMYK image.

###(JPEG-TO-BMP &key INFILE OUTFILE)

Converts JPEG file to BMP file.

Encoding

(ENCODE-IMAGE FILENAME IMAGE NCOMP H W &key SAMPLING Q-TABS Q-FACTOR)

Encodes the supplied image using the sampling specifier, quantization tables and quantization factor.

(ENCODING-WRAPPER FILENAME IMAGE NCOMP H W &key (QUALITY 4))

TODO