The png Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The png Reference Manual

This is the png Reference Manual, generated automatically by Declt version 2.4 patchlevel 1 "Will Decker" on Fri May 24 08:21:08 2019 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

CL-PNG is a Common Lisp package for reading and writing PNG (Portable
Network Graphics) files.  The CL-PNG homepage is at
.

Copyright (C) 2001--2009 by the authors (see the file AUTHORS).
Licensed under the GNU Lesser General Public License; see the file
COPYING for details.

See doc/index.html for documentation.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 png

Description

Read and write PNG (Portable Network Graphics) files.

Defsystem Dependency

cffi-grovel

Dependencies
Source

png.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

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


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 png.asd

Location

png.asd

Systems

png (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 png/png-package.lisp

Parent

png (system)

Location

png-package.lisp

Packages

png


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 png/compat.lisp

Dependency

png-package.lisp (file)

Parent

png (system)

Location

compat.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 png/libpng.lisp

Dependencies
Parent

png (system)

Location

libpng.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.5 png/grovel.lisp

Parent

png (system)

Location

grovel.lisp


Previous: , Up: Lisp files   [Contents][Index]

3.1.6 png/wrappers.lisp

Parent

png (system)

Location

wrappers.lisp


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 png

Read and write PNG (Portable Network Graphics) files.

Source

png-package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

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 (file)

Function: decode-file PATHNAME &key SWAPBGR
Package

png

Source

libpng.lisp (file)

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 (file)

Function: encode-file IMAGE PATHNAME &key SWAPBGR
Package

png

Source

libpng.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Constants

Constant: +png-color-mask-alpha+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-color-mask-color+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-color-mask-palette+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-color-type-gray+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-color-type-gray-alpha+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-color-type-palette+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-color-type-rgb+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-compression-type-base+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-compression-type-default+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-filter-type-base+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-filter-type-default+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-interlace-none+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-transform-identity+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-transform-strip-16+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-transform-strip-alpha+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: +png-transform-swap-endian+
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: size-of-png-size
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: size-of-size
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file

Constant: size-of-ssize
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/grovel.processed-grovel-file


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Special variables

Special Variable: *buffer*
Package

png

Source

libpng.lisp (file)

Special Variable: *stream*
Package

png

Source

libpng.lisp (file)

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

png

Source

libpng.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Macros

Macro: with-png-info-struct (VAR PNG-STRUCT INITFORM) &body BODY
Package

png

Source

libpng.lisp (file)

Macro: with-png-struct (VAR &key DIRECTION) &body BODY
Package

png

Source

libpng.lisp (file)

Macro: with-pointer-to-array-data (PTR-VAR ARRAY) &body BODY
Package

png

Source

compat.lisp (file)

Macro: with-row-pointers (ROWS-PTR IMAGE) &body BODY
Package

png

Source

libpng.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 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 (file)

Function: bytes-per-pixel IMAGE
Package

png

Source

libpng.lisp (file)

Function: ensure-buffer-sufficient NEEDED
Package

png

Source

libpng.lisp (file)

Function: get-ihdr PNG-PTR INFO-PTR
Package

png

Source

libpng.lisp (file)

Function: get-png-libpng-ver-string ()
Package

png

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.0-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-png-vl-anyversion-7d0cf5b6-git/wrappers.processed-wrapper-file

Function: grayp COLOR-TYPE
Package

png

Source

libpng.lisp (file)

Function: memcpy DEST SOURCE N
Package

png

Source

libpng.lisp (file)

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

png

Source

libpng.lisp (file)

Function: png-create-info-struct PNG-PTR
Package

png

Source

libpng.lisp (file)

Function: png-create-read-struct USER-PNG-VER ERROR-PTR ERROR-FN WARN-FN
Package

png

Source

libpng.lisp (file)

Function: png-create-write-struct USER-PNG-VER ERROR-PTR ERROR-FN WARN-FN
Package

png

Source

libpng.lisp (file)

Function: png-destroy-info-struct PNG-PTR INFO-PTR-PTR
Package

png

Source

libpng.lisp (file)

Function: png-destroy-read-struct PNG-PTR-PTR INFO-PTR-PTR END-INFO-PTR-PTR
Package

png

Source

libpng.lisp (file)

Function: png-destroy-write-struct PNG-PTR-PTR INFO-PTR-PTR
Package

png

Source

libpng.lisp (file)

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 (file)

Function: png-get-io-ptr PNG-PTR
Package

png

Source

libpng.lisp (file)

Function: png-get-rows PNG-PTR INFO-PTR
Package

png

Source

libpng.lisp (file)

Function: png-get-valid PNG-PTR INFO-PTR FLAG
Package

png

Source

libpng.lisp (file)

Function: png-init-io PNG-PTR FILE
Package

png

Source

libpng.lisp (file)

Function: png-read-image PNG-PTR ROW-POINTERS
Package

png

Source

libpng.lisp (file)

Function: png-read-info PNG-PTR INFO-PTR
Package

png

Source

libpng.lisp (file)

Function: png-read-png PNG-PTR INFO-PTR PNG-TRANSFORMS PARAMS
Package

png

Source

libpng.lisp (file)

Function: png-set-bgr PNG-PTR
Package

png

Source

libpng.lisp (file)

Function: png-set-expand PNG-PTR
Package

png

Source

libpng.lisp (file)

Function: png-set-expand-gray-1-2-4-to-8 PNG-PTR
Package

png

Source

libpng.lisp (file)

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 (file)

Function: png-set-palette-to-rgb PNG-PTR
Package

png

Source

libpng.lisp (file)

Function: png-set-read-fn PNG-PTR IO-PTR READ-DATA-FN
Package

png

Source

libpng.lisp (file)

Function: png-set-rows PNG-PTR INFO-PTR ROW-POINTERS
Package

png

Source

libpng.lisp (file)

Function: png-set-strip-16 PNG-PTR
Package

png

Source

libpng.lisp (file)

Function: png-set-strip-alpha PNG-PTR
Package

png

Source

libpng.lisp (file)

Function: png-set-swap PNG-PTR
Package

png

Source

libpng.lisp (file)

Function: png-set-trns-to-alpha PNG-PTR
Package

png

Source

libpng.lisp (file)

Function: png-set-write-fn PNG-PTR IO-PTR WRITE-DATA-FN OUTPUT-FLUSH-FN
Package

png

Source

libpng.lisp (file)

Function: png-write-png PNG-PTR INFO-PTR TRANSFORMS PARAMS
Package

png

Source

libpng.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   P  
Index Entry  Section

F
File, Lisp, png.asd: The png<dot>asd file
File, Lisp, png/compat.lisp: The png/compat<dot>lisp file
File, Lisp, png/grovel.lisp: The png/grovel<dot>lisp file
File, Lisp, png/libpng.lisp: The png/libpng<dot>lisp file
File, Lisp, png/png-package.lisp: The png/png-package<dot>lisp file
File, Lisp, png/wrappers.lisp: The png/wrappers<dot>lisp file

L
Lisp File, png.asd: The png<dot>asd file
Lisp File, png/compat.lisp: The png/compat<dot>lisp file
Lisp File, png/grovel.lisp: The png/grovel<dot>lisp file
Lisp File, png/libpng.lisp: The png/libpng<dot>lisp file
Lisp File, png/png-package.lisp: The png/png-package<dot>lisp file
Lisp File, png/wrappers.lisp: The png/wrappers<dot>lisp file

P
png.asd: The png<dot>asd file
png/compat.lisp: The png/compat<dot>lisp file
png/grovel.lisp: The png/grovel<dot>lisp file
png/libpng.lisp: The png/libpng<dot>lisp file
png/png-package.lisp: The png/png-package<dot>lisp file
png/wrappers.lisp: The png/wrappers<dot>lisp file

Jump to:   F   L   P  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   A   B   D   E   F   G   M   P   W  
Index Entry  Section

A
array-storage-vector: Internal functions

B
bytes-per-pixel: Internal functions

D
decode: Exported functions
decode-file: Exported functions

E
encode: Exported functions
encode-file: Exported functions
ensure-buffer-sufficient: Internal functions

F
Function, array-storage-vector: Internal functions
Function, bytes-per-pixel: Internal functions
Function, decode: Exported functions
Function, decode-file: Exported functions
Function, encode: Exported functions
Function, encode-file: Exported functions
Function, ensure-buffer-sufficient: Internal functions
Function, get-ihdr: Internal functions
Function, get-png-libpng-ver-string: Internal functions
Function, grayp: Internal functions
Function, memcpy: Internal functions
Function, png-access-version-number: Internal functions
Function, png-create-info-struct: Internal functions
Function, png-create-read-struct: Internal functions
Function, png-create-write-struct: Internal functions
Function, png-destroy-info-struct: Internal functions
Function, png-destroy-read-struct: Internal functions
Function, png-destroy-write-struct: Internal functions
Function, png-get-ihdr: Internal functions
Function, png-get-io-ptr: Internal functions
Function, png-get-rows: Internal functions
Function, png-get-valid: Internal functions
Function, png-init-io: Internal functions
Function, png-read-image: Internal functions
Function, png-read-info: Internal functions
Function, png-read-png: Internal functions
Function, png-set-bgr: Internal functions
Function, png-set-expand: Internal functions
Function, png-set-expand-gray-1-2-4-to-8: Internal functions
Function, png-set-ihdr: Internal functions
Function, png-set-palette-to-rgb: Internal functions
Function, png-set-read-fn: Internal functions
Function, png-set-rows: Internal functions
Function, png-set-strip-16: Internal functions
Function, png-set-strip-alpha: Internal functions
Function, png-set-swap: Internal functions
Function, png-set-trns-to-alpha: Internal functions
Function, png-set-write-fn: Internal functions
Function, png-write-png: Internal functions

G
get-ihdr: Internal functions
get-png-libpng-ver-string: Internal functions
grayp: Internal functions

M
Macro, with-png-info-struct: Internal macros
Macro, with-png-struct: Internal macros
Macro, with-pointer-to-array-data: Internal macros
Macro, with-row-pointers: Internal macros
memcpy: Internal functions

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

W
with-png-info-struct: Internal macros
with-png-struct: Internal macros
with-pointer-to-array-data: Internal macros
with-row-pointers: Internal macros

Jump to:   A   B   D   E   F   G   M   P   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
C   S  
Index Entry  Section

*
*buffer*: Internal special variables
*stream*: Internal special variables

+
+png-color-mask-alpha+: Internal constants
+png-color-mask-color+: Internal constants
+png-color-mask-palette+: Internal constants
+png-color-type-gray+: Internal constants
+png-color-type-gray-alpha+: Internal constants
+png-color-type-palette+: Internal constants
+png-color-type-rgb+: Internal constants
+png-compression-type-base+: Internal constants
+png-compression-type-default+: Internal constants
+png-filter-type-base+: Internal constants
+png-filter-type-default+: Internal constants
+png-interlace-none+: Internal constants
+png-libpng-ver-string+: Internal special variables
+png-transform-identity+: Internal constants
+png-transform-strip-16+: Internal constants
+png-transform-strip-alpha+: Internal constants
+png-transform-swap-endian+: Internal constants

C
Constant, +png-color-mask-alpha+: Internal constants
Constant, +png-color-mask-color+: Internal constants
Constant, +png-color-mask-palette+: Internal constants
Constant, +png-color-type-gray+: Internal constants
Constant, +png-color-type-gray-alpha+: Internal constants
Constant, +png-color-type-palette+: Internal constants
Constant, +png-color-type-rgb+: Internal constants
Constant, +png-compression-type-base+: Internal constants
Constant, +png-compression-type-default+: Internal constants
Constant, +png-filter-type-base+: Internal constants
Constant, +png-filter-type-default+: Internal constants
Constant, +png-interlace-none+: Internal constants
Constant, +png-transform-identity+: Internal constants
Constant, +png-transform-strip-16+: Internal constants
Constant, +png-transform-strip-alpha+: Internal constants
Constant, +png-transform-swap-endian+: Internal constants
Constant, size-of-png-size: Internal constants
Constant, size-of-size: Internal constants
Constant, size-of-ssize: Internal constants

S
size-of-png-size: Internal constants
size-of-size: Internal constants
size-of-ssize: Internal constants
Special Variable, *buffer*: Internal special variables
Special Variable, *stream*: Internal special variables
Special Variable, +png-libpng-ver-string+: Internal special variables

Jump to:   *   +  
C   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   P   S  
Index Entry  Section

P
Package, png: The png package
png: The png system
png: The png package

S
System, png: The png system

Jump to:   P   S