The png Reference Manual

This is the png Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:16:31 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 png

Read and write PNG (Portable Network Graphics) files.

Defsystem Dependency

cffi-grovel (system).

Dependency

cffi (system).

Source

png.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 png/png.asd

Source

png.asd.

Parent Component

png (system).

ASDF Systems

png.


3.1.2 png/png-package.lisp

Dependency

image.lisp (file).

Source

png.asd.

Parent Component

png (system).

Packages

png.


3.1.3 png/compat.lisp

Dependency

png-package.lisp (file).

Source

png.asd.

Parent Component

png (system).

Internals

3.1.4 png/libpng.lisp

Dependencies
Source

png.asd.

Parent Component

png (system).

Public Interface
Internals

3.1.5 png/grovel.lisp

Source

png.asd.

Parent Component

png (system).


3.1.6 png/wrappers.lisp

Source

png.asd.

Parent Component

png (system).


3.1.7 png/image.lisp

Source

png.asd.

Parent Component

png (system).

Packages

image.

Public Interface
Internals

3.1.8 png/bmp.lisp

Dependency

image.lisp (file).

Source

png.asd.

Parent Component

png (system).

Packages

bmp.

Public Interface
Internals

3.1.9 png/pnm.lisp

Dependency

image.lisp (file).

Source

png.asd.

Parent Component

png (system).

Packages

pnm.

Public Interface
Internals

3.1.10 png/ops.lisp

Dependency

image.lisp (file).

Source

png.asd.

Parent Component

png (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 image

Image representation and manipulation.

Source

image.lisp.

Use List

common-lisp.

Used By List
Public Interface
Internals

4.2 png

Read and write PNG (Portable Network Graphics) files.

Source

png-package.lisp.

Use List
  • cffi.
  • common-lisp.
  • image.
Public Interface
Internals

4.3 bmp

Source

bmp.lisp.

Use List
Public Interface
Internals

4.4 pnm

Source

pnm.lisp.

Use List
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Ordinary functions

Function: 16-bit-image (image)

If IMAGE is a 16-BIT-IMAGE, return it or a copy of it. If IMAGE is an 8-BIT-IMAGE, return a 16-BIT-IMAGE that has the same width, height, and number of channels as IMAGE, but where each element is the corresponding element in image multiplied by 257. The effect of this multiplication is to stretch the dynamic range of the image to utilize the increased bit depth.

Package

image.

Source

image.lisp.

Function: 8-bit-image (image)

If IMAGE is an 8-BIT-IMAGE, return it or a copy of it. If IMAGE is a 16-BIT-IMAGE, return an 8-BIT-IMAGE that has the same width, height, and number of channels as image, but where each element is the corresponding element in image divided by 257 and rounded to the nearest integer. The effect of this division is to compress the dynamic range of the image so as to fit within the smaller bit depth.

Package

image.

Source

image.lisp.

Function: add (im1 im2)

Adds image IM2 from image IM1 and returns the resulting image sum without modifying either IM1 or IM2. Both images must be the same type and size.

Clips to maximum intensity in each channel if exceeded.

Package

image.

Source

ops.lisp.

Function: add* (im1 im2)

Destructively adds image IM2 from image IM1, leaving the resulting image sum in im1. Both images must be the same type and size. Clips to maximum intensity in each channel if exceeded

Package

image.

Source

ops.lisp.

Function: binary-morphological-filter (image operation mask fill)

Returns a binary-valued GRAYSCALE-IMAGE the same dimensions as IMAGE whose corresponding elements have been calculated using a binary morphological filter. The filter kernel centers a MASK on each pixel in IMAGE and looks at all the pixels in IMAGE which line up with those set in the MASK. OPERATION=:or sets the filtered pixel if any of these is set; :and sets the filtered pixel only if all of these are set; and :maj sets the filtered pixel if a majority of them are set. A border region can’t be reached by the center of the mask while keeping the mask within IMAGE. New pixels in the border region are filled with FILL.

Package

image.

Source

ops.lisp.

Function: channel-max (im)

Finds the max values over all the pixel channels (separately) in the image.

Package

image.

Source

ops.lisp.

Function: channel-min (im)

Finds the min values over all the pixel channels (separately) in the image.

Package

image.

Source

ops.lisp.

Function: close-filter (image &key pattern mask fill)

Returns a binary GRAYSCALE-IMAGE produced by a cascade of a dilation filter followed by an erosion filter, both using the same mask. See those filters for descriptions of their properties.

The distinctive property of the cascade is size preservation of large scale features.

Package

image.

Source

ops.lisp.

Function: convolve (image kernel &key fill)

Returns a new image of type IMAGE produced by convolving KERNEL
with IMAGE. This is not a circular convolution and no values are computed in the border region where the kernel is not completely contained in IMAGE.

FILL controls the output image size: if set, it returns an image the same size as IMAGE, if NIL, it returns an image which is shrunk to exclude the uncomputed border region (the dimensions of KERNEL-1).

KERNEL must be a 2-d square mask with odd dimensions (e.g. 3x3), a simple-array of type FLOAT. IMAGE can be GRAYSCALE-IMAGE or an RGB-IMAGE - in the latter case the channels are convolved with the KERNEL seperately.

If FILL is set, it must consist of a list of values of the same type as the pixels of IMAGE. For example, an rgb-image with 8-bit pixels might have a fill of ’(#x7f #x7f #x7f), whereas a grayscale-image would have a fill of ’(#x7f). If FILL is not set the image will shrink.

Package

image.

Source

ops.lisp.

Function: copy-image (image)

Creates a copy of IMAGE. The elements of the new image are the same as the corresponding elements of IMAGE, and the new image has the same height, width, number of channels, and bit depth as IMAGE.

Package

image.

Source

image.lisp.

Function: decode (input &key swapbgr preserve-alpha)

Reads an image in PNG format from input and returns an array of type IMAGE. If the bit depth of the PNG file is less than or equal to 8, an 8-BIT-IMAGE will be returned; otherwise, a 16-BIT-IMAGE will be returned.

Applications that would like to receive images of consistent bit depth (rather than 8 or 16 depending on the PNG file) can apply the function 8-BIT-IMAGE or the function 16-BIT-IMAGE to the result of DECODE.

Bit depths less than 8 will be converted to 8 bits when read, and bit depths between 8 and 16 bits will be converted to 16 bits. As an example, 2-bit PNG files contain only the pixel values 0, 1, 2, and 3. These will be converted to 0, 85, 170, and 255, respectively, in order to fill the dynamic range of the 8-bit image that is returned.

Swaps blue and red if SWAPBGR set.

Strips alpha channel unless PRESERVE-ALPHA is set.

Signals an error if reading the image fails.

Package

png.

Source

libpng.lisp.

Function: decode (input &key bgr flip strip-alpha)

Reads an image in BMP format from input and returns an array of type IMAGE. The bit depth of the returned IMAGE will be either 8 or 16.

Setting FLIP will flip the image vertically.
Setting STRIP-ALPHA will strip an alpha channel, if present.

Setting BGR will leave the channels ordered as read from the BMP stream. That is, in BGR or BGRA order, rather than swapping them to RGB or RGBA order normal to IMAGE).

The current version will decode 24-bit RGB and 32-bit ARGB BMP streams. Compressed formats are not currently supported and will signal an error.

Signals an error if reading the image fails.

Package

bmp.

Source

bmp.lisp.

Function: decode (input)
Package

pnm.

Source

pnm.lisp.

Function: decode-file (pathname &key swapbgr)
Package

png.

Source

libpng.lisp.

Function: dilation-filter (image &key pattern mask fill)

Returns a binary GRAYSCALE-IMAGE produced by a morphological filter with an OR operation on the given mask kernel.

The mask may be either specified by PATTERN or provided by MASK, a 2-d array of (unsigned-byte 8) values set to 0 or 1.

The format of PATTERN is ’(:square 3) ’(:cross 4), where the 2*size+1 gives the total width and height of the mask.

Package

image.

Source

ops.lisp.

Function: dims (im)

The dimensions (height x width x channels) of an image as a list

Package

image.

Source

ops.lisp.

Function: encode (image output &key swapbgr)

Writes IMAGE in PNG format to OUTPUT. The current version always writes an 8-bit PNG file if image is an 8-BIT-IMAGE and a 16-bit PNG file if image is an 16-BIT-IMAGE. Future versions may write PNG files of lower bit depths than IMAGE when the least significant bits may be trimmed without loss of precision.

Signals an error if writing the image fails.

Package

png.

Source

libpng.lisp.

Function: encode (image output &key flip xppi yppi xppm yppm reserve strip-alpha bgr)

Writes IMAGE in BMP format to OUTPUT.

Flips image vertically if FLIP set. XPPI and YPPI specify pixels per inch Strips alpha channel if STRIP-ALPHA is set (and there is one) - in other words, encodes ARGB as RGB.

The current version only encodes RGB and ARGB BMP files (24 and 32 bit pixels, respectively). Paletted versions signal an error.

Signals an error if writing the image fails.

Package

bmp.

Source

bmp.lisp.

Function: encode (image stream)
Package

pnm.

Source

pnm.lisp.

Function: encode-file (image pathname &key swapbgr)
Package

png.

Source

libpng.lisp.

Function: erosion-filter (image &key pattern mask fill)

Returns a binary GRAYSCALE-IMAGE produced by a morphological filter with an AND operation on the mask kernel.

The mask may be either specified by PATTERN or provided by MASK, a 2-d array of (unsigned-byte 8) values set to 0 or 1.

The format of PATTERN is ’(:square 3) ’(:cross 4), where the 2*size+1 gives the total width and height of the mask.

Package

image.

Source

ops.lisp.

Function: fillv (im val)

Fills entire image with constant value. Value must be a list with the same number of elements as IM has channels.

Returns IM.

Package

image.

Source

ops.lisp.

Function: flip (old)

Returns a new image which is flipped vertically from the old image

Package

image.

Source

ops.lisp.

Function: grayscale-alpha-image (image)

If IMAGE is a GRAYSCALE-ALPHA-IMAGE, return it, otherwise return a GRAYSCALE-ALPHA-IMAGE of the same width and height whose corresponding elements are the average of the channel intensities of IMAGE.
Add an alpha channel if needed.

Package

image.

Source

image.lisp.

Function: grayscale-image (image)

If IMAGE is a GRAYSCALE-IMAGE, return it, otherwise return a GRAYSCALE-IMAGE of the same width and height whose corresponding elements are the average of the channel intensities of IMAGE. Strip out any alpha channel present.

Package

image.

Source

image.lisp.

Function: image-alpha (image)

Returns T if there is an alpha channel, NIL otherwise.

Package

image.

Source

image.lisp.

Function: image-bit-depth (image)

Returns the bit-depth of the image, i.e., the number of bits in the byte representing each sample. The bit depth is 8 or 16, depending on whether the image is an 8-bit-image or a 16-bit-image, respectively.

Package

image.

Source

image.lisp.

Function: image-channels (image)

The number of channels in IMAGE. Grayscale images have one channel, whereas RGB images have three.

Package

image.

Source

image.lisp.

Function: image-height (image)

The height of image, i.e., the number of rows.

Package

image.

Source

image.lisp.

Function: image-width (image)

The width of IMAGE, i.e., the number of columns.

Package

image.

Source

image.lisp.

Function: intensity-max (im)

Finds the max intensities over all the pixels (sum of all the channels) in the image.

Package

image.

Source

ops.lisp.

Function: majority-filter (image &key pattern mask fill)

Returns a binary GRAYSCALE-IMAGE produced by a morphological filter with an MAJ operation on the given mask kernel (majority).

The mask may be either specified by PATTERN or provided by MASK, a 2-d array of (unsigned-byte 8) values set to 0 or 1.

The format of PATTERN is ’(:square 3) ’(:cross 4), where the 2*size+1 gives the total width and height of the mask.

Package

image.

Source

ops.lisp.

Function: make-image (height width channels &optional bit-depth)

Make a new IMAGE of the specified height, width, and number of channels. The image will be an 8-bit-image or a 16-bit-image depending on the value of byte-size. Makes an 8-BIT-IMAGE if BIT-DEPTH is 8 or NIL and a 16-BIT-IMAGE if BIT-DEPTH is 16. The contents of the image are undefined.

Package

image.

Source

image.lisp.

Function: make-image-like (im)

Makes an image the same size and bit-depth as IM.

Package

image.

Source

ops.lisp.

Function: mirror (old)

Returns a new image which is mirrored horizontally from the old image

Package

image.

Source

ops.lisp.

Function: move-towards (im1 im2 step)

Moves the pixels values of binary GRAYSCALE-IMAGE IM1 towards IM2 by at most STEP. IM1 is altered, IM2 is not. Step can be 0-255 for 8-bit depths and 0-65535 for 16-bit depths.

Package

image.

Source

ops.lisp.

Function: norm2 (im)

Calculates the sum of the squared intensities of all the pixels in the image.

Package

image.

Source

ops.lisp.

Function: open-filter (image &key pattern mask fill)

Returns a binary GRAYSCALE-IMAGE produced by a cascade of an erosion filter followed by a dilation filter, both using the same mask. See those filters for descriptions of their properties.

The distinctive property of the cascade is size preservation of large scale features.

Package

image.

Source

ops.lisp.

Function: rgb-alpha-image (image)

If IMAGE is a RGB-ALPHA-IMAGE, return it, otherwise return a RGB-ALPHA-IMAGE of the same width and height whose corresponding elements are the rgb elements of the original if the original is an RGB-IMAGE and the repeated grayscale values if the original is a GRAYSCALE image. Add an alpha channel if needed.

Package

image.

Source

image.lisp.

Function: rgb-image (image)

If IMAGE is an RGB-IMAGE, return it, otherwise return an RGB-IMAGE of the same width and height whose corresponding elements are the grayscale value repeated as needed. Strip out any alpha channels.

Package

image.

Source

image.lisp.

Function: rotate (old)

Returns a new image which is rotated counter-clockwise 90-degrees from the old image

Package

image.

Source

ops.lisp.

Function: size (im)

The (height x width) of an image as an alist

Package

image.

Source

ops.lisp.

Function: subtract (im1 im2)

Subtracts image IM2 from image IM1 and returns the resulting image difference without modifying either IM1 or IM2. Both images must be the same type and size.

Clips pixel intensity to 0 when necessary.

Package

image.

Source

ops.lisp.

Function: subtract* (im1 im2)

Destructively subtracts image IM2 from image IM1, leaving the resulting image difference in im1. Both images must be the same type and size.

Clips pixel intensity to 0 when necessary.

Package

image.

Source

ops.lisp.

Function: threshold-filter (image threshold)

Returns a GRAYSCALE-IMAGE the same dimensions as IMAGE whose corresponding elements are white if they exceed a threshold, or black if they do not.

Package

image.

Source

ops.lisp.


5.1.2 Generic functions

Generic Reader: mismatched-image-sizes (condition)
Package

image.

Methods
Reader Method: mismatched-image-sizes ((condition mismatched-image-sizes))
Source

ops.lisp.

Target Slot

sizes.


5.1.3 Conditions

Condition: mismatched-image-dims
Package

image.

Source

ops.lisp.

Direct superclasses

condition.

Direct methods

mismatched-image-dims-dims.

Direct slots
Slot: dims
Initargs

:dims

Readers

mismatched-image-dims-dims.

Writers

This slot is read-only.

Condition: mismatched-image-sizes
Package

image.

Source

ops.lisp.

Direct superclasses

error.

Direct methods

mismatched-image-sizes.

Direct slots
Slot: sizes
Initargs

:sizes

Readers

mismatched-image-sizes.

Writers

This slot is read-only.

Condition: mismatched-image-types
Package

image.

Source

ops.lisp.

Direct superclasses

error.

Direct methods

mismatched-image-types-types.

Direct slots
Slot: types
Initargs

:types

Readers

mismatched-image-types-types.

Writers

This slot is read-only.


5.1.4 Types

Type: 16-bit-image (&optional height width channels)

An IMAGE with element type (UNSIGNED-BYTE 16).

Package

image.

Source

image.lisp.

Type: 8-bit-image (&optional height width channels)

An IMAGE with element type (UNSIGNED-BYTE 8).

Package

image.

Source

image.lisp.

Type: grayscale-alpha-image (&optional height width)

An IMAGE with exactly two channels.

Package

image.

Source

image.lisp.

Type: grayscale-image (&optional height width)

An IMAGE with either one or two channels.

Package

image.

Source

image.lisp.

Type: image (&optional height width channels)

A three-dimensional array of (unsigned-byte 8) or (unsigned-byte 16). In the current version, an IMAGE is displaced to a one-dimensional SIMPLE-ARRAY with the same total number of elements, but applications should not rely on this implementation detail, as it is likely to change in future versions. The functions MAKE-IMAGE, DECODE, COPY-IMAGE, 8-BIT-IMAGE, AND 16-BIT-IMAGE return IMAGEs.

The three dimensions represent row, column, and channel. In other words, (aref image i j k) is the intensity in the k-th channel of the pixel in the i-th row and j-th column of image.

Package

image.

Source

image.lisp.

Type: opaque-image (&optional height width)

An IMAGE with either 1 or 3 channels

Package

image.

Source

image.lisp.

Type: rgb-alpha-image (&optional height width)

An IMAGE with exactly four channels.

Package

image.

Source

image.lisp.

Type: rgb-image (&optional height width)

An IMAGE with either three or four channels.

Package

image.

Source

image.lisp.

Type: transparent-image (&optional height width)

An IMAGE with either two or four channels (i.e. has an alphs channel).

Package

image.

Source

image.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *buffer*
Package

png.

Source

libpng.lisp.

Special Variable: *stream*
Package

png.

Source

libpng.lisp.

Special Variable: +png-libpng-ver-string+
Package

png.

Source

libpng.lisp.


5.2.2 Macros

Macro: with-png-info-struct ((var png-struct initform) &body body)
Package

png.

Source

libpng.lisp.

Macro: with-png-struct ((var &key direction) &body body)
Package

png.

Source

libpng.lisp.

Macro: with-pointer-to-array-data ((ptr-var array) &body body)
Package

png.

Source

compat.lisp.

Macro: with-row-pointers ((rows-ptr image) &body body)
Package

png.

Source

libpng.lisp.


5.2.3 Ordinary functions

Function: array-storage-vector (array)

Returns the underlying storage vector of ARRAY, which must be a non-displaced array.

In SBCL, if ARRAY is a of type (SIMPLE-ARRAY * (*)), it is its own storage vector. Multidimensional arrays, arrays with fill pointers, and adjustable arrays have an underlying storage vector with the same ARRAY-ELEMENT-TYPE as ARRAY, which this function returns.

Important note: the underlying vector is an implementation detail. Even though this function exposes it, changes in the implementation may cause this
function to be removed without further warning.

Package

png.

Source

compat.lisp.

Function: binary-morph-kernel (image r c mask op)

Impliments a binary morphological filter using binary MASK centered at R,C on IMAGE. OP works as follows:
* OP = :or (erosion) any mask pixel set results in output set,
* OP = :and (dilation), all mask pixels set results in output set, * OP = :maj (median), majority of mask pixels set results in output set

Package

image.

Source

ops.lisp.

Function: bytes-per-pixel (image)
Package

png.

Source

libpng.lisp.

Function: color-and-alpha-channels-p (image)
Package

image.

Source

image.lisp.

Function: color-channels (image)
Package

image.

Source

ops.lisp.

Function: color-channels-p (image)
Package

image.

Source

image.lisp.

Function: decode-file (pathname &key flip bgr)

Reads file PATHNAME, decodes as BMP file and returns IMAGE.

Package

bmp.

Source

bmp.lisp.

Function: encode-file (image pathname &key flip strip-alpha bgr)

Encodes IMAGE as BMP and writes to PATHNAME.

Package

bmp.

Source

bmp.lisp.

Function: ensure-buffer-sufficient (needed)
Package

png.

Source

libpng.lisp.

Function: even-channels-p (image)
Package

image.

Source

image.lisp.

Function: generate-mask (name 1side)

Generates a binary mask matrix of ’(UNSIGNED-BYTE 8) elements whose sides are both (2*1SIDE+1) pixels. Valid mask shapes are specified by NAME, currently :square and :cross. An invalid name will signal an error.

Package

image.

Source

ops.lisp.

Function: get-ihdr (png-ptr info-ptr)
Package

png.

Source

libpng.lisp.

Function: grayp (color-type)
Package

png.

Source

libpng.lisp.

Function: grayscale-alpha-channels-p (image)
Package

image.

Source

image.lisp.

Function: grayscale-channels-p (image)
Package

image.

Source

image.lisp.

Function: make-shareable-array (&rest args)
Package

image.

Source

image.lisp.

Function: max-color-index (image)
Package

image.

Source

ops.lisp.

Function: memcpy (dest source n)
Package

png.

Source

libpng.lisp.

Function: pixel-type (image)
Package

image.

Source

ops.lisp.

Function: png-access-version-number ()
Package

png.

Source

libpng.lisp.

Function: png-create-info-struct (png-ptr)
Package

png.

Source

libpng.lisp.

Function: png-create-read-struct (user-png-ver error-ptr error-fn warn-fn)
Package

png.

Source

libpng.lisp.

Function: png-create-write-struct (user-png-ver error-ptr error-fn warn-fn)
Package

png.

Source

libpng.lisp.

Function: png-destroy-info-struct (png-ptr info-ptr-ptr)
Package

png.

Source

libpng.lisp.

Function: png-destroy-read-struct (png-ptr-ptr info-ptr-ptr end-info-ptr-ptr)
Package

png.

Source

libpng.lisp.

Function: png-destroy-write-struct (png-ptr-ptr info-ptr-ptr)
Package

png.

Source

libpng.lisp.

Function: png-get-ihdr (png-ptr info-ptr width-uint32-ptr height-uint32-ptr bit-depth-int-ptr color-type-int-ptr interlace-type-int-ptr compression-type-int-ptr filter-type-int-ptr)
Package

png.

Source

libpng.lisp.

Function: png-get-io-ptr (png-ptr)
Package

png.

Source

libpng.lisp.

Function: png-get-rows (png-ptr info-ptr)
Package

png.

Source

libpng.lisp.

Function: png-get-valid (png-ptr info-ptr flag)
Package

png.

Source

libpng.lisp.

Function: png-init-io (png-ptr file)
Package

png.

Source

libpng.lisp.

Function: png-read-image (png-ptr row-pointers)
Package

png.

Source

libpng.lisp.

Function: png-read-info (png-ptr info-ptr)
Package

png.

Source

libpng.lisp.

Function: png-read-png (png-ptr info-ptr png-transforms params)
Package

png.

Source

libpng.lisp.

Function: png-set-bgr (png-ptr)
Package

png.

Source

libpng.lisp.

Function: png-set-expand (png-ptr)
Package

png.

Source

libpng.lisp.

Function: png-set-expand-gray-1-2-4-to-8 (png-ptr)
Package

png.

Source

libpng.lisp.

Function: png-set-ihdr (png-ptr info-ptr width height bit-depth color-type interlace-type compression-type filter-type)
Package

png.

Source

libpng.lisp.

Function: png-set-palette-to-rgb (png-ptr)
Package

png.

Source

libpng.lisp.

Function: png-set-read-fn (png-ptr io-ptr read-data-fn)
Package

png.

Source

libpng.lisp.

Function: png-set-rows (png-ptr info-ptr row-pointers)
Package

png.

Source

libpng.lisp.

Function: png-set-strip-16 (png-ptr)
Package

png.

Source

libpng.lisp.

Function: png-set-strip-alpha (png-ptr)
Package

png.

Source

libpng.lisp.

Function: png-set-swap (png-ptr)
Package

png.

Source

libpng.lisp.

Function: png-set-trns-to-alpha (png-ptr)
Package

png.

Source

libpng.lisp.

Function: png-set-write-fn (png-ptr io-ptr write-data-fn output-flush-fn)
Package

png.

Source

libpng.lisp.

Function: png-write-png (png-ptr info-ptr transforms params)
Package

png.

Source

libpng.lisp.

Function: read-magic-number (input)
Package

pnm.

Source

pnm.lisp.

Function: read-pbm (input width height)
Package

pnm.

Source

pnm.lisp.

Function: read-pgm-16 (input width height)
Package

pnm.

Source

pnm.lisp.

Function: read-pgm-8 (input width height)
Package

pnm.

Source

pnm.lisp.

Function: read-pnm-header (input)

Read the header if it hasn’t been read already, then return it.

Package

pnm.

Source

pnm.lisp.

Function: read-positive-integer (input)
Package

pnm.

Source

pnm.lisp.

Function: read-ppm-16 (input width height)
Package

pnm.

Source

pnm.lisp.

Function: read-ppm-8 (input width height)
Package

pnm.

Source

pnm.lisp.

Function: read-u2le (in)

Reads 2 unsigned BYTES in little-endian from IN stream without testing for end of file.

Package

bmp.

Source

bmp.lisp.

Function: read-u4le (in)

Reads 4 unsigned BYTES in little-endian from IN stream without testing for end of file.

Package

bmp.

Source

bmp.lisp.

Function: read-whitespace (input &key at-least)
Package

pnm.

Source

pnm.lisp.

Function: read-whitespace-character (input)
Package

pnm.

Source

pnm.lisp.

Function: view-mask (mask)

Prints MASK to *standard-output* for quick examination.

Package

image.

Source

ops.lisp.

Function: whitespace-char-p (char)
Package

pnm.

Source

pnm.lisp.

Function: write-pnm-data (image stream)
Package

pnm.

Source

pnm.lisp.

Function: write-pnm-data-1 (image stream)
Package

pnm.

Source

pnm.lisp.

Function: write-pnm-data-16 (image stream)
Package

pnm.

Source

pnm.lisp.

Function: write-pnm-data-8 (image stream)
Package

pnm.

Source

pnm.lisp.

Function: write-pnm-header (image stream type)
Package

pnm.

Source

pnm.lisp.

Function: write-u2le (out u)

Writes 2 unsigned BYTES in little-endian to OUT stream.

Package

bmp.

Source

bmp.lisp.

Function: write-u4le (out u)

Writes 4 unsigned BYTES in little-endian to OUT stream.

Package

bmp.

Source

bmp.lisp.


5.2.4 Generic functions

Generic Reader: mismatched-image-dims-dims (condition)
Package

image.

Methods
Reader Method: mismatched-image-dims-dims ((condition mismatched-image-dims))
Source

ops.lisp.

Target Slot

dims.

Generic Reader: mismatched-image-types-types (condition)
Package

image.

Methods
Reader Method: mismatched-image-types-types ((condition mismatched-image-types))
Source

ops.lisp.

Target Slot

types.

Generic Reader: unhandled-bitcount-bitcount (condition)
Package

bmp.

Methods
Reader Method: unhandled-bitcount-bitcount ((condition unhandled-bitcount))
Source

bmp.lisp.

Target Slot

bitcount.

Generic Reader: unhandled-compression-mode (condition)
Package

bmp.

Methods
Reader Method: unhandled-compression-mode ((condition unhandled-compression))
Source

bmp.lisp.

Target Slot

mode.


5.2.5 Conditions

Condition: unhandled-bitcount
Package

bmp.

Source

bmp.lisp.

Direct superclasses

condition.

Direct methods

unhandled-bitcount-bitcount.

Direct slots
Slot: bitcount
Initargs

:bitcount

Readers

unhandled-bitcount-bitcount.

Writers

This slot is read-only.

Condition: unhandled-compression
Package

bmp.

Source

bmp.lisp.

Direct superclasses

condition.

Direct methods

unhandled-compression-mode.

Direct slots
Slot: mode
Initargs

:mode

Readers

unhandled-compression-mode.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   1   8  
A   B   C   D   E   F   G   I   M   N   O   P   R   S   T   U   V   W  
Index Entry  Section

1
16-bit-image: Public ordinary functions

8
8-bit-image: Public ordinary functions

A
add: Public ordinary functions
add*: Public ordinary functions
array-storage-vector: Private ordinary functions

B
binary-morph-kernel: Private ordinary functions
binary-morphological-filter: Public ordinary functions
bytes-per-pixel: Private ordinary functions

C
channel-max: Public ordinary functions
channel-min: Public ordinary functions
close-filter: Public ordinary functions
color-and-alpha-channels-p: Private ordinary functions
color-channels: Private ordinary functions
color-channels-p: Private ordinary functions
convolve: Public ordinary functions
copy-image: Public ordinary functions

D
decode: Public ordinary functions
decode: Public ordinary functions
decode: Public ordinary functions
decode-file: Public ordinary functions
decode-file: Private ordinary functions
dilation-filter: Public ordinary functions
dims: Public ordinary functions

E
encode: Public ordinary functions
encode: Public ordinary functions
encode: Public ordinary functions
encode-file: Public ordinary functions
encode-file: Private ordinary functions
ensure-buffer-sufficient: Private ordinary functions
erosion-filter: Public ordinary functions
even-channels-p: Private ordinary functions

F
fillv: Public ordinary functions
flip: Public ordinary functions
Function, 16-bit-image: Public ordinary functions
Function, 8-bit-image: Public ordinary functions
Function, add: Public ordinary functions
Function, add*: Public ordinary functions
Function, array-storage-vector: Private ordinary functions
Function, binary-morph-kernel: Private ordinary functions
Function, binary-morphological-filter: Public ordinary functions
Function, bytes-per-pixel: Private ordinary functions
Function, channel-max: Public ordinary functions
Function, channel-min: Public ordinary functions
Function, close-filter: Public ordinary functions
Function, color-and-alpha-channels-p: Private ordinary functions
Function, color-channels: Private ordinary functions
Function, color-channels-p: Private ordinary functions
Function, convolve: Public ordinary functions
Function, copy-image: Public ordinary functions
Function, decode: Public ordinary functions
Function, decode: Public ordinary functions
Function, decode: Public ordinary functions
Function, decode-file: Public ordinary functions
Function, decode-file: Private ordinary functions
Function, dilation-filter: Public ordinary functions
Function, dims: Public ordinary functions
Function, encode: Public ordinary functions
Function, encode: Public ordinary functions
Function, encode: Public ordinary functions
Function, encode-file: Public ordinary functions
Function, encode-file: Private ordinary functions
Function, ensure-buffer-sufficient: Private ordinary functions
Function, erosion-filter: Public ordinary functions
Function, even-channels-p: Private ordinary functions
Function, fillv: Public ordinary functions
Function, flip: Public ordinary functions
Function, generate-mask: Private ordinary functions
Function, get-ihdr: Private ordinary functions
Function, grayp: Private ordinary functions
Function, grayscale-alpha-channels-p: Private ordinary functions
Function, grayscale-alpha-image: Public ordinary functions
Function, grayscale-channels-p: Private ordinary functions
Function, grayscale-image: Public ordinary functions
Function, image-alpha: Public ordinary functions
Function, image-bit-depth: Public ordinary functions
Function, image-channels: Public ordinary functions
Function, image-height: Public ordinary functions
Function, image-width: Public ordinary functions
Function, intensity-max: Public ordinary functions
Function, majority-filter: Public ordinary functions
Function, make-image: Public ordinary functions
Function, make-image-like: Public ordinary functions
Function, make-shareable-array: Private ordinary functions
Function, max-color-index: Private ordinary functions
Function, memcpy: Private ordinary functions
Function, mirror: Public ordinary functions
Function, move-towards: Public ordinary functions
Function, norm2: Public ordinary functions
Function, open-filter: Public ordinary functions
Function, pixel-type: Private ordinary functions
Function, png-access-version-number: Private ordinary functions
Function, png-create-info-struct: Private ordinary functions
Function, png-create-read-struct: Private ordinary functions
Function, png-create-write-struct: Private ordinary functions
Function, png-destroy-info-struct: Private ordinary functions
Function, png-destroy-read-struct: Private ordinary functions
Function, png-destroy-write-struct: Private ordinary functions
Function, png-get-ihdr: Private ordinary functions
Function, png-get-io-ptr: Private ordinary functions
Function, png-get-rows: Private ordinary functions
Function, png-get-valid: Private ordinary functions
Function, png-init-io: Private ordinary functions
Function, png-read-image: Private ordinary functions
Function, png-read-info: Private ordinary functions
Function, png-read-png: Private ordinary functions
Function, png-set-bgr: Private ordinary functions
Function, png-set-expand: Private ordinary functions
Function, png-set-expand-gray-1-2-4-to-8: Private ordinary functions
Function, png-set-ihdr: Private ordinary functions
Function, png-set-palette-to-rgb: Private ordinary functions
Function, png-set-read-fn: Private ordinary functions
Function, png-set-rows: Private ordinary functions
Function, png-set-strip-16: Private ordinary functions
Function, png-set-strip-alpha: Private ordinary functions
Function, png-set-swap: Private ordinary functions
Function, png-set-trns-to-alpha: Private ordinary functions
Function, png-set-write-fn: Private ordinary functions
Function, png-write-png: Private ordinary functions
Function, read-magic-number: Private ordinary functions
Function, read-pbm: Private ordinary functions
Function, read-pgm-16: Private ordinary functions
Function, read-pgm-8: Private ordinary functions
Function, read-pnm-header: Private ordinary functions
Function, read-positive-integer: Private ordinary functions
Function, read-ppm-16: Private ordinary functions
Function, read-ppm-8: Private ordinary functions
Function, read-u2le: Private ordinary functions
Function, read-u4le: Private ordinary functions
Function, read-whitespace: Private ordinary functions
Function, read-whitespace-character: Private ordinary functions
Function, rgb-alpha-image: Public ordinary functions
Function, rgb-image: Public ordinary functions
Function, rotate: Public ordinary functions
Function, size: Public ordinary functions
Function, subtract: Public ordinary functions
Function, subtract*: Public ordinary functions
Function, threshold-filter: Public ordinary functions
Function, view-mask: Private ordinary functions
Function, whitespace-char-p: Private ordinary functions
Function, write-pnm-data: Private ordinary functions
Function, write-pnm-data-1: Private ordinary functions
Function, write-pnm-data-16: Private ordinary functions
Function, write-pnm-data-8: Private ordinary functions
Function, write-pnm-header: Private ordinary functions
Function, write-u2le: Private ordinary functions
Function, write-u4le: Private ordinary functions

G
generate-mask: Private ordinary functions
Generic Function, mismatched-image-dims-dims: Private generic functions
Generic Function, mismatched-image-sizes: Public generic functions
Generic Function, mismatched-image-types-types: Private generic functions
Generic Function, unhandled-bitcount-bitcount: Private generic functions
Generic Function, unhandled-compression-mode: Private generic functions
get-ihdr: Private ordinary functions
grayp: Private ordinary functions
grayscale-alpha-channels-p: Private ordinary functions
grayscale-alpha-image: Public ordinary functions
grayscale-channels-p: Private ordinary functions
grayscale-image: Public ordinary functions

I
image-alpha: Public ordinary functions
image-bit-depth: Public ordinary functions
image-channels: Public ordinary functions
image-height: Public ordinary functions
image-width: Public ordinary functions
intensity-max: Public ordinary functions

M
Macro, with-png-info-struct: Private macros
Macro, with-png-struct: Private macros
Macro, with-pointer-to-array-data: Private macros
Macro, with-row-pointers: Private macros
majority-filter: Public ordinary functions
make-image: Public ordinary functions
make-image-like: Public ordinary functions
make-shareable-array: Private ordinary functions
max-color-index: Private ordinary functions
memcpy: Private ordinary functions
Method, mismatched-image-dims-dims: Private generic functions
Method, mismatched-image-sizes: Public generic functions
Method, mismatched-image-types-types: Private generic functions
Method, unhandled-bitcount-bitcount: Private generic functions
Method, unhandled-compression-mode: Private generic functions
mirror: Public ordinary functions
mismatched-image-dims-dims: Private generic functions
mismatched-image-dims-dims: Private generic functions
mismatched-image-sizes: Public generic functions
mismatched-image-sizes: Public generic functions
mismatched-image-types-types: Private generic functions
mismatched-image-types-types: Private generic functions
move-towards: Public ordinary functions

N
norm2: Public ordinary functions

O
open-filter: Public ordinary functions

P
pixel-type: Private ordinary functions
png-access-version-number: Private ordinary functions
png-create-info-struct: Private ordinary functions
png-create-read-struct: Private ordinary functions
png-create-write-struct: Private ordinary functions
png-destroy-info-struct: Private ordinary functions
png-destroy-read-struct: Private ordinary functions
png-destroy-write-struct: Private ordinary functions
png-get-ihdr: Private ordinary functions
png-get-io-ptr: Private ordinary functions
png-get-rows: Private ordinary functions
png-get-valid: Private ordinary functions
png-init-io: Private ordinary functions
png-read-image: Private ordinary functions
png-read-info: Private ordinary functions
png-read-png: Private ordinary functions
png-set-bgr: Private ordinary functions
png-set-expand: Private ordinary functions
png-set-expand-gray-1-2-4-to-8: Private ordinary functions
png-set-ihdr: Private ordinary functions
png-set-palette-to-rgb: Private ordinary functions
png-set-read-fn: Private ordinary functions
png-set-rows: Private ordinary functions
png-set-strip-16: Private ordinary functions
png-set-strip-alpha: Private ordinary functions
png-set-swap: Private ordinary functions
png-set-trns-to-alpha: Private ordinary functions
png-set-write-fn: Private ordinary functions
png-write-png: Private ordinary functions

R
read-magic-number: Private ordinary functions
read-pbm: Private ordinary functions
read-pgm-16: Private ordinary functions
read-pgm-8: Private ordinary functions
read-pnm-header: Private ordinary functions
read-positive-integer: Private ordinary functions
read-ppm-16: Private ordinary functions
read-ppm-8: Private ordinary functions
read-u2le: Private ordinary functions
read-u4le: Private ordinary functions
read-whitespace: Private ordinary functions
read-whitespace-character: Private ordinary functions
rgb-alpha-image: Public ordinary functions
rgb-image: Public ordinary functions
rotate: Public ordinary functions

S
size: Public ordinary functions
subtract: Public ordinary functions
subtract*: Public ordinary functions

T
threshold-filter: Public ordinary functions

U
unhandled-bitcount-bitcount: Private generic functions
unhandled-bitcount-bitcount: Private generic functions
unhandled-compression-mode: Private generic functions
unhandled-compression-mode: Private generic functions

V
view-mask: Private ordinary functions

W
whitespace-char-p: Private ordinary functions
with-png-info-struct: Private macros
with-png-struct: Private macros
with-pointer-to-array-data: Private macros
with-row-pointers: Private macros
write-pnm-data: Private ordinary functions
write-pnm-data-1: Private ordinary functions
write-pnm-data-16: Private ordinary functions
write-pnm-data-8: Private ordinary functions
write-pnm-header: Private ordinary functions
write-u2le: Private ordinary functions
write-u4le: Private ordinary functions


A.4 Data types

Jump to:   1   8  
B   C   F   G   I   L   M   O   P   R   S   T   U   W  
Index Entry  Section

1
16-bit-image: Public types

8
8-bit-image: Public types

B
bmp: The bmp package
bmp.lisp: The png/bmp․lisp file

C
compat.lisp: The png/compat․lisp file
Condition, mismatched-image-dims: Public conditions
Condition, mismatched-image-sizes: Public conditions
Condition, mismatched-image-types: Public conditions
Condition, unhandled-bitcount: Private conditions
Condition, unhandled-compression: Private conditions

F
File, bmp.lisp: The png/bmp․lisp file
File, compat.lisp: The png/compat․lisp file
File, grovel.lisp: The png/grovel․lisp file
File, image.lisp: The png/image․lisp file
File, libpng.lisp: The png/libpng․lisp file
File, ops.lisp: The png/ops․lisp file
File, png-package.lisp: The png/png-package․lisp file
File, png.asd: The png/png․asd file
File, pnm.lisp: The png/pnm․lisp file
File, wrappers.lisp: The png/wrappers․lisp file

G
grayscale-alpha-image: Public types
grayscale-image: Public types
grovel.lisp: The png/grovel․lisp file

I
image: The image package
image: Public types
image.lisp: The png/image․lisp file

L
libpng.lisp: The png/libpng․lisp file

M
mismatched-image-dims: Public conditions
mismatched-image-sizes: Public conditions
mismatched-image-types: Public conditions

O
opaque-image: Public types
ops.lisp: The png/ops․lisp file

P
Package, bmp: The bmp package
Package, image: The image package
Package, png: The png package
Package, pnm: The pnm package
png: The png system
png: The png package
png-package.lisp: The png/png-package․lisp file
png.asd: The png/png․asd file
pnm: The pnm package
pnm.lisp: The png/pnm․lisp file

R
rgb-alpha-image: Public types
rgb-image: Public types

S
System, png: The png system

T
transparent-image: Public types
Type, 16-bit-image: Public types
Type, 8-bit-image: Public types
Type, grayscale-alpha-image: Public types
Type, grayscale-image: Public types
Type, image: Public types
Type, opaque-image: Public types
Type, rgb-alpha-image: Public types
Type, rgb-image: Public types
Type, transparent-image: Public types

U
unhandled-bitcount: Private conditions
unhandled-compression: Private conditions

W
wrappers.lisp: The png/wrappers․lisp file