From 8466d8cfa486fb30d1755c4261b781135083787b Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:05:29 -0800 Subject: Import Upstream version 3a1 --- pnm.txi | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 pnm.txi (limited to 'pnm.txi') diff --git a/pnm.txi b/pnm.txi new file mode 100644 index 0000000..67105ad --- /dev/null +++ b/pnm.txi @@ -0,0 +1,66 @@ +@code{(require 'pnm)} +@ftindex pnm + + +@defun pnm:type-dimensions path + +The string @var{path} must name a @dfn{portable bitmap graphics} file. +@cindex portable bitmap graphics +@code{pnm:type-dimensions} returns a list of 4 items: +@enumerate +@item +A symbol describing the type of the file named by @var{path}. +@item +The image width in pixels. +@item +The image height in pixels. +@item +The maximum value of pixels assume in the file. +@end enumerate + +The current set of file-type symbols is: +@table @asis +@item pbm +@itemx pbm-raw +@cindex pbm +@cindex pbm-raw +Black-and-White image; pixel values are 0 or 1. +@item pgm +@itemx pgm-raw +@cindex pgm +@cindex pgm-raw +Gray (monochrome) image; pixel values are from 0 to @var{maxval} +specified in file header. +@item ppm +@itemx ppm-raw +@cindex ppm +@cindex ppm-raw +RGB (full color) image; red, green, and blue interleaved pixel values +are from 0 to @var{maxval} +@end table +@end defun + +@defun pnm:image-file->array path array + + +Reads the @dfn{portable bitmap graphics} file named by @var{path} into +@cindex portable bitmap graphics +@var{array}. @var{array} must be the correct size and type for +@var{path}. @var{array} is returned. + + +@defunx pnm:image-file->array path + +@code{pnm:image-file->array} creates and returns an array with the +@dfn{portable bitmap graphics} file named by @var{path} read into it. +@cindex portable bitmap graphics +@end defun + +@defun pnm:array-write type array maxval path comment @dots{} + + +Writes the contents of @var{array} to a @var{type} image file named @var{path}. The file +will have pixel values between 0 and @var{maxval}, which must be compatible +with @var{type}. For @samp{pbm} files, @var{maxval} must be @samp{1}. +@var{comment}s are included in the file header. +@end defun -- cgit v1.2.3