cl-jpeg

API Reference

cl-jpeg

A self-contained baseline JPEG codec implementation

JPEG

  • Condition JPEG-ERROR  (ERROR)
  • Condition JPEG-ENCODER-ERROR  (JPEG-ERROR)
  • Condition JPEG-DECODER-ERROR  (JPEG-ERROR)
  • Condition UNSUPPORTED-JPEG-FORMAT  (JPEG-DECODER-ERROR)
  • Condition UNRECOGNIZED-FILE-FORMAT  (JPEG-DECODER-ERROR)
  • Function LLM-DCT (data)
  • Function ENCODE-IMAGE (filename image ncomp h w &rest args)
  • Function DESCRIPTOR-BYTE-READER (instance)
  • Function (setf DESCRIPTOR-BYTE-READER) (value instance)
  • Function DESCRIPTOR-SOURCE-CACHE (instance)
  • Function (setf DESCRIPTOR-SOURCE-CACHE) (value instance)
  • Function MAKE-DESCRIPTOR (&key ((restart-interval restart-interval) 0) ((width width) 0) ((height height) 0) ((buffer buffer) nil) ((qtables qtables) (make-array 4 :initial-contents (loop for j fixnum from 0 to 3 collecting (make-array 8 :initial-contents (loop for i fixnum from 0 to 7 collecting (make-array 8 :element-type 'uint8)))))) ((huff-ac huff-ac) (make-array 2 :initial-contents (list (make-huffstruct) (make-huffstruct)))) ((huff-dc huff-dc) (make-array 2 :initial-contents (list (make-huffstruct) (make-huffstruct)))) ((cid cid) (make-array 4)) ((scans scans) (make-array 4 :initial-contents (loop for i fixnum from 0 to 3 collecting (make-scan)))) ((h h) (make-array 4)) ((v v) (make-array 4)) ((ih ih) (make-array 4)) ((iv iv) (make-array 4)) ((qdest qdest) (make-array 4)) ((zz zz) (make-array 64 :element-type 'sint16)) ((ncomp ncomp) 0) ((ws ws) (2d-sint16-array '(0 0 0 0 0 0 0 0) '(0 0 0 0 0 0 0 0) '(0 0 0 0 0 0 0 0) '(0 0 0 0 0 0 0 0) '(0 0 0 0 0 0 0 0) '(0 0 0 0 0 0 0 0) '(0 0 0 0 0 0 0 0) '(0 0 0 0 0 0 0 0))) ((byte-reader byte-reader) #'(lambda () (error 'jpeg-decoder-error))) ((source-cache source-cache) nil) ((adobe-app14-transform adobe-app14-transform) nil))
  • Function READ-DHT (image)
    Loads huffman tables on specified destinations
  • Function INVERSE-LLM-DCT (block q-table ws)
    Performs Inverse LMM DCT and dequantization
  • Function CONVERT-CMYK-TO-RGB (buffer h w &key rgb-buffer)
  • Function ALLOCATE-BUFFER (height width ncomp)
  • Function DECODE-STREAM (stream &key buffer (colorspace-conversion t) descriptor cached-source-p)
    Return image array, height, width, number of components and APP14 Adobe transform. Does not support progressive DCT-based JPEGs.
  • Function DECODE-IMAGE (filename &key buffer (colorspace-conversion t) cached-source-p)
  • Function JPEG-FILE-DIMENSIONS (filename)
    Return image height, width and number of components, plus the type of Adobe colorpsace transform
  • Function JPEG-TO-BMP (&key infile outfile)