Skip to content

shamazmazum/jpeg-turbo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jpeg-turbo

Build Status CI

jpeg-turbo is a Common Lisp wrapper for libjpeg-turbo library which provides TurboJPEG API for compressing and decompressing JPEG images. To build this wrapper make sure that both libjpeg-turbo library and headers are installed (on FreeBSD this is done by installing graphics/libjpeg-turbo port).

Examples

Read header of an image (get width, height, subsampling mode and colorspace):

(with-decompressor (handle)
    (decompress-header handle "example.jpg"))

Decode a whole image, converting it to grayscale:

(with-decompressor (handle)
    (decompress handle "example.jpg"
                :pixel-format :gray))

Encode an image contained in array. Each pixel is encoded in three elements of the array. These elements must be red, green and blue components of the pixel.

(with-compressor (handle)
    (compress handle "example.jpg" array
              width height :rgb))

Documentation

Visit the project page. If you want a local copy, run (codex:document :jpeg-turbo :skip-undocumented t).

TODO

Add transformation API

About

Common Lisp wrapper for libjpeg-turbo

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published