This is the cl-netpbm Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:11:59 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-netpbm
Common Lisp support for reading/writing the netpbm image formats (PPM, PGM, and PBM).
Steve Losh <steve@stevelosh.com>
MIT/X11
1.0.0
vendor
(module).
package.lisp
(file).
src
(module).
Modules are listed depth-first from the system components tree.
cl-netpbm/vendor
cl-netpbm
(system).
quickutils-package.lisp
(file).
quickutils.lisp
(file).
cl-netpbm/src
package.lisp
(file).
cl-netpbm
(system).
main.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-netpbm/cl-netpbm.asd
cl-netpbm/vendor/quickutils-package.lisp
cl-netpbm/vendor/quickutils.lisp
cl-netpbm/package.lisp
cl-netpbm/src/main.lisp
cl-netpbm/vendor/quickutils-package.lisp
vendor
(module).
*utilities*
(special variable).
cl-netpbm/vendor/quickutils.lisp
quickutils-package.lisp
(file).
vendor
(module).
curry
(compiler macro).
curry
(function).
symb
(function).
transpose
(function).
with-gensyms
(macro).
with-unique-names
(macro).
ensure-function
(function).
make-gensym-list
(function).
mkstr
(function).
string-designator
(type).
cl-netpbm/package.lisp
cl-netpbm/src/main.lisp
src
(module).
read-from-file
(function).
read-from-stream
(function).
read-texture-from-file
(function).
read-texture-from-stream
(function).
write-to-file
(function).
write-to-stream
(function).
+carriage-return+
(constant).
+comment-char+
(constant).
+form-feed+
(constant).
+line-feed+
(constant).
+space+
(constant).
+tab+
(constant).
+vertical-tab+
(constant).
bits
(function).
byte-to-digit
(function).
check-number
(macro).
copy-peekable-stream
(function).
error-junk
(function).
file-format
(function).
format-to-stream
(function).
line-terminator-p
(function).
magic-byte
(function).
make-color
(function).
make-peekable-stream
(function).
p
(reader).
(setf p)
(writer).
peek-byte
(function).
peekable-stream
(structure).
peekable-stream-p
(function).
pixel-type
(function).
read-bitmap-ascii
(function).
read-bitmap-binary
(function).
read-byte
(function).
read-graymap
(function).
read-header-number
(function).
read-magic-byte
(function).
read-netpbm
(function).
read-pixmap
(function).
read-raster-number
(function).
read-texture
(function).
s
(reader).
(setf s)
(writer).
skip-comment-body
(function).
skip-whitespace
(function).
unread-byte
(function).
white-space-p
(function).
write-bitmap-ascii
(function).
write-bitmap-binary
(function).
write-graymap
(function).
write-line-feed
(function).
write-netpbm
(function).
write-number-ascii
(function).
write-number-binary
(function).
write-pixmap
(function).
write-string-as-bytes
(function).
Packages are listed by definition order.
netpbm
common-lisp
.
netpbm.quickutils
.
read-from-file
(function).
read-from-stream
(function).
read-texture-from-file
(function).
read-texture-from-stream
(function).
write-to-file
(function).
write-to-stream
(function).
+carriage-return+
(constant).
+comment-char+
(constant).
+form-feed+
(constant).
+line-feed+
(constant).
+space+
(constant).
+tab+
(constant).
+vertical-tab+
(constant).
bits
(function).
byte-to-digit
(function).
check-number
(macro).
copy-peekable-stream
(function).
error-junk
(function).
file-format
(function).
format-to-stream
(function).
line-terminator-p
(function).
magic-byte
(function).
make-color
(function).
make-peekable-stream
(function).
p
(reader).
(setf p)
(writer).
peek-byte
(function).
peekable-stream
(structure).
peekable-stream-p
(function).
pixel-type
(function).
read-bitmap-ascii
(function).
read-bitmap-binary
(function).
read-byte
(function).
read-graymap
(function).
read-header-number
(function).
read-magic-byte
(function).
read-netpbm
(function).
read-pixmap
(function).
read-raster-number
(function).
read-texture
(function).
s
(reader).
(setf s)
(writer).
skip-comment-body
(function).
skip-whitespace
(function).
unread-byte
(function).
white-space-p
(function).
write-bitmap-ascii
(function).
write-bitmap-binary
(function).
write-graymap
(function).
write-line-feed
(function).
write-netpbm
(function).
write-number-ascii
(function).
write-number-binary
(function).
write-pixmap
(function).
write-string-as-bytes
(function).
netpbm.quickutils
Package that contains Quickutil utility functions.
common-lisp
.
curry
(compiler macro).
curry
(function).
symb
(function).
transpose
(function).
with-gensyms
(macro).
with-unique-names
(macro).
*utilities*
(special variable).
ensure-function
(function).
make-gensym-list
(function).
mkstr
(function).
string-designator
(type).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Binds each variable named by a symbol in ‘names‘ to a unique symbol around
‘forms‘. Each of ‘names‘ must either be either a symbol, or of the form:
(symbol string-designator)
Bare symbols appearing in ‘names‘ are equivalent to:
(symbol symbol)
The string-designator is used as the argument to ‘gensym‘ when constructing the unique symbol the named variable will be bound to.
Binds each variable named by a symbol in ‘names‘ to a unique symbol around
‘forms‘. Each of ‘names‘ must either be either a symbol, or of the form:
(symbol string-designator)
Bare symbols appearing in ‘names‘ are equivalent to:
(symbol symbol)
The string-designator is used as the argument to ‘gensym‘ when constructing the unique symbol the named variable will be bound to.
Returns a function that applies ‘arguments‘ and the arguments it is called with to ‘function‘.
Read a PPM image file from ‘path‘, returning an array of pixels and more.
The primary return value will be a 2D array with dimensions ‘(width height)‘.
Each element of the array will be a single pixel whose type depends on the
image file format:
* PBM: ‘bit‘
* PGM: ‘(integer 0 maximum-value)‘
* PPM: ‘(simple-array (integer 0 maximum-value) (3))‘
Two other values are returned:
* The format of the image that was read (one of ‘:pbm‘, ‘:pgm‘, ‘:ppm‘).
* The bit depth of the image.
Read a PPM image file from ‘stream‘, returning an array of pixels and more.
‘stream‘ must be a binary input stream, specifically of ‘(unsigned-byte 8)‘s
unless you *really* know what you’re doing.
The primary return value will be a 2D array with dimensions ‘(width height)‘.
Each element of the array will be a single pixel whose type depends on the
image file format:
* PBM: ‘bit‘
* PGM: ‘(integer 0 maximum-value)‘
* PPM: ‘(simple-array (integer 0 maximum-value) (3))‘
Two other values are returned:
* The format of the image that was read (one of ‘:pbm‘, ‘:pgm‘, ‘:ppm‘).
* The bit depth of the image.
Read a PPM image file from ‘path‘, returning an OpenGL-style array and more.
The primary return value will be an OpenGL-style array of type:
(simple-array (single-float 0.0 1.0) (* width height 3))
The vertical axis of the image will be flipped, which is what OpenGL expects.
Three values are returned: the array, the width, and the height.
Read a PPM image file from ‘stream‘, returning an OpenGL-style array and more.
‘stream‘ must be a binary input stream, specifically of ‘(unsigned-byte 8)‘s
unless you *really* know what you’re doing. The stream must contain a PPM
formatted image — PBM and PGM images are not supported.
The primary return value will be an OpenGL-style array of type:
(simple-array (single-float 0.0 1.0) (* width height 3))
The vertical axis of the image will be flipped, which is what OpenGL expects.
Three values are returned: the array, the width, and the height.
Receives any number of objects, concatenates all into one string with ‘#’mkstr‘ and converts them to symbol.
Extracted from _On Lisp_, chapter 4.
See also: ‘symbolicate‘
Analog to matrix transpose for a list of lists given by ‘lists‘.
Write a PPM image array ‘data‘ to a file at ‘path‘.
Nothing is returned.
‘format‘ must be one of ‘:pbm‘, ‘:pgm‘, ‘:ppm‘.
‘encoding‘ must be one of ‘:binary‘, ‘:ascii‘.
‘maximum-value‘ must be the desired bit depth of the image (the maximum value
any particular pixel can have). For PBM images it must be ‘1‘.
For PBM and PGM images, ‘data‘ must be a two dimensional array of integers
between ‘0‘ and ‘maximum-value‘ inclusive.
For PPM images, ‘data‘ must be a two dimensional array of pixels, each of
which must be a 3 element vector of integers between ‘0‘ and ‘maximum-value‘
inclusive.
Write a PPM image array ‘data‘ to ‘stream‘.
Nothing is returned.
‘stream‘ must be a binary output stream, specifically of ‘(unsigned-byte 8)‘s
unless you *really* know what you’re doing.
‘format‘ must be one of ‘:pbm‘, ‘:pgm‘, ‘:ppm‘.
‘encoding‘ must be one of ‘:binary‘, ‘:ascii‘.
‘maximum-value‘ must be the desired bit depth of the image (the maximum value
any particular pixel can have). For PBM images it must be ‘1‘.
For PBM and PGM images, ‘data‘ must be a two dimensional array of integers
between ‘0‘ and ‘maximum-value‘ inclusive.
For PPM images, ‘data‘ must be a two dimensional array of pixels, each of
which must be a 3 element vector of integers between ‘0‘ and ‘maximum-value‘
inclusive.
Returns the function designated by ‘function-designator‘:
if ‘function-designator‘ is a function, it is returned, otherwise
it must be a function name and its ‘fdefinition‘ is returned.
Return ‘(values format binary?)‘ for the given magic byte character.
Return the magic byte character to use for the given format/encoding combination.
Returns a list of ‘length‘ gensyms, each generated as if with a call to ‘make-gensym‘, using the second (optional, defaulting to ‘"G"‘) argument.
Receives any number of objects (string, symbol, keyword, char, number), extracts all printed representations, and concatenates them all into one string.
Extracted from _On Lisp_, chapter 4.
Return the type specifier for a pixel of an image with the given ‘format‘ and ‘bit-depth‘.
Read the next ASCII-encoded number from ‘stream‘ (allows comments).
Read the initial ‘P#‘ from ‘stream‘, returning the magic ‘#‘ character.
Read the next ASCII-encoded number from ‘stream‘ (does not allow comments).
Write ‘value‘ to stream as an ASCII-encoded number, with sanity check.
Write ‘value‘ to ‘stream‘ as a binary value, with sanity check.
A string designator type. A string designator is either a string, a symbol, or a character.
Jump to: | (
B C E F L M P R S T U W |
---|
Jump to: | (
B C E F L M P R S T U W |
---|
Jump to: | *
+
C P S |
---|
Jump to: | *
+
C P S |
---|
Jump to: | C F M N P Q S T V |
---|
Jump to: | C F M N P Q S T V |
---|