Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the jpeg-turbo Reference Manual, version 1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 04:52:53 2022 GMT+0.
Next: Systems, Previous: The jpeg-turbo Reference Manual, Up: The jpeg-turbo Reference Manual [Contents][Index]
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).
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))
Visit the project page. If
you want a local copy, run
(codex:document :jpeg-turbo :skip-undocumented t)
.
Add transformation API
Next: Files, Previous: Introduction, Up: The jpeg-turbo Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
libjpeg-turbo wrapper for Common Lisp
Vasily Postnicov <shamaz.mazum@gmail.com>
Vasily Postnicov <shamaz.mazum@gmail.com>
2-clause BSD
1.0
cffi-grovel (system).
cffi (system).
Next: Packages, Previous: Systems, Up: The jpeg-turbo Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: jpeg-turbo/src/package.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
jpeg-turbo (system).
Next: jpeg-turbo/src/grovel.lisp, Previous: jpeg-turbo/jpeg-turbo.asd, Up: Lisp [Contents][Index]
jpeg-turbo (system).
Next: jpeg-turbo/src/jpeg-turbo.lisp, Previous: jpeg-turbo/src/package.lisp, Up: Lisp [Contents][Index]
src/package.lisp (file).
jpeg-turbo (system).
Previous: jpeg-turbo/src/grovel.lisp, Up: Lisp [Contents][Index]
src/grovel.lisp (file).
jpeg-turbo (system).
Next: Definitions, Previous: Files, Up: The jpeg-turbo Reference Manual [Contents][Index]
Packages are listed by definition order.
Next: Indexes, Previous: Packages, Up: The jpeg-turbo Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Public Interface, Up: Public Interface [Contents][Index]
Execute the macro’s body in the lexical scope of created compressor handle @c(handle). The handle is safely freed after use.
Execute the macro’s body in the lexical scope of created decompressor handle @c(handle). The handle is safely freed after use.
Next: Conditions, Previous: Macros, Up: Public Interface [Contents][Index]
Compress an image to jpeg format and write it to file with the name @c(filename). See @c(compress-to-octets) for more info.
Compress an image to jpeg format. @c(handle) is a compressor handle
created with @c(with-compressor). @c(array) is a simple array of
@c((unsigned-byte 8)) values containing pixel data. Values of
@c(pixel-format) described in section @ref[id=pf](pixel
formats). @c(quality) is an integer from 1 to 100. Higher values mean
better quality. @c(subsamp) is described in
@ref[id=subsamp](subsampling) section and @c(flags) in
@ref[id=flags](flags) section.
Decompress an image directly from file with the name @c(filename). See @c(decompress-from-octets) for more info
Decompress a jpeg image. @c(handle) is a decompressor handle created with @c(with-decompressor). @c(array) is a simple array of @c((unsigned-byte 8)) values containing a compressed image. If @c(pixel-format) is specified, @c(libjpeg-turbo) converts output pixel format to a specified value. For the values of @c(pixel-format) see the section @ref[id=pf](pixel formats). For more information about @c(flags) see the section @ref[id=flags](flags). If @c(scaling-factor) is specified @c(librurbo-jpeg) will scale the output image to this scaling factor. Possible values are returned by @c(scaling-factors).
Return a decompressed image as a simple-array of @c((unsigned-byte 8)) value in the same manner as @c(cl-jpeg) does.
This is function is like @c(decompress-header-from-octets) but reads compressed image directly from file with the name @c(filename).
Decompress header of an image. @c(handle) must be a handle to
decompressor created with @c(with-decompressor). @c(array) must be a
simple array of @c((unsigned-byte 8)) values containing compressed
jpeg image. Function returns four values:
@begin(enum)
@item(Width of an image.)
@item(Height of an image.)
@item(Chroma subsampling. See @ref[id=subsamp](subsampling) section.)
@item(Colorspace. See @ref[id=cs](colorspaces) section.)
@end(enum)
Return scaling factors supported by @c(libjpeg-turbo)
Previous: Ordinary functions, Up: Public Interface [Contents][Index]
Errors returned by libjpeg-turbo
error.
:error-string
This slot is read-only.
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Internals, Up: Internals [Contents][Index]
Size of a pixel in bytes for each pixel format
Next: Generic functions, Previous: Special variables, Up: Internals [Contents][Index]
Initialize jpeg compressor returning a handle to it. The handle must be freed with @c(destroy-handle%) after use. Use @c(with-compressor) macro instead of this function.
Initialize decompressor handle or signal an error. The handle must be destroyed after use with @c(destroy-handle%). It’s preferred to use @c(with-decompressor) macro which safely destroys the handle in the case of an error instead of this function.
Next: Classes, Previous: Ordinary functions, Up: Internals [Contents][Index]
Previous: Generic functions, Up: Internals [Contents][Index]
Previous: Definitions, Up: The jpeg-turbo Reference Manual [Contents][Index]
Jump to: | B C D F G I J L M P S W |
---|
Jump to: | B C D F G I J L M P S W |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | *
E S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*pixel-sizes* : | Private special variables | ||
| |||
E | |||
error-string : | Public conditions | ||
| |||
S | |||
Slot, error-string : | Public conditions | ||
Special Variable, *pixel-sizes* : | Private special variables | ||
|
Jump to: | *
E S |
---|
Jump to: | C F J P S |
---|
Jump to: | C F J P S |
---|