Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

picfile(9) [plan9 man page]

PICFILE(9.6)															      PICFILE(9.6)

NAME
picfile - raster graphic image format DESCRIPTION
Files in this format store images represented as two-dimensional arrays of multiple-channel pixels. A picfile consists of an textual header followed by binary data encoding the pixels in row-major order. The header is a list of attribute/value pairs separated by new- lines, terminated by an empty line. Each header line has the form name=value. The name may not contain an ASCII NUL, newline, or the value may not contain NUL or newline. The last line of a header is empty. The standard attributes are described below; all but TYPE and WINDOW are optional. TYPE must come first; otherwise order is irrelevant. As any unrecognized attribute is passed over uninterpreted by all standard software, applications are welcome to include arbitrary annota- tions, such as SHOESIZE=101/2, if they wish. TYPE=type How the pixels are encoded. Standard types are runcode A run-length encoding. The data are a sequence of (nchan+1)-byte records each containing a count k and nchan bytes giving a pixel value to be repeated k+1 times. A run may not span scanlines. dump A two-dimensional array of nchan-byte records in row major order. bitmap One-bit pixels, packed into bytes high bit leftmost. Zero bits are white, one bits are black. Rows are padded with zeros to a multiple of 16 bits. ccitt-g4 A black-and-white image under CCITT FAX Group 4 compression. This format is highly compressive on images of text and line art. Similarly, and for Group 3, 1-D and 2-D. pico A sequence of nchan two-dimensional arrays of single bytes. ccir601 Pixels are in dump order, 2 bytes per pixel encoded according to the IEEE digital component video standard. WINDOW=x0 y0 x1 y1 The x,y coordinates of the upper left corner and the point just diagonally outside the lower right corner, x increasing to the right, y down. NCHAN=nchan The number of channels, default 1. CHAN=channels The names of the channels. Channels should be nchan characters long. Certain substrings of channels are conventionally understood by most programs that read and write picture files: m is a monochrome image channel, rgb is a full-color image, a is an alpha chan- nel, and z... is a floating point (four-byte, single precision) z value. Some very old monochrome pictures have CHAN=r. This usage is deprecated but still recognized by some programs. RES=x y The digitizing resolution horizontally and vertically, in pixels/inch. CMAP= (The value is empty.) A color map, a 256x3-byte translation table for color values, follows the header. In a full-color picture, each color-map row maps pixel values of the corresponding channel. In a monochrome picture, pixel values index the color map to yield red, green and blue, like this: uchar cmap[256][3]; red = cmap[pixel][0]; green = cmap[pixel][1]; blue = cmap[pixel][2]; EXAMPLES
sed '/^$/q' image Print a header. A sample header follows. TYPE=dump WINDOW=0 0 512 512 NCHAN=1 CHAN=m RES=300 300 CMAP= COMMAND= antiquantize 'halftone CLASSIC' 512.halftone LIBERTY.anticlassic COMMAND= halftone CLASSIC 512.liberty 512.halftone 1.75 512.halftone COMMAND= transpose IN OUT COMMAND= resample 512 IN OUT COMMAND= transpose IN OUT COMMAND= resample 512 IN OUT COMMAND= clip 400 400 LIBERTY OUT SEE ALSO
bitmap(6) Tom Duff, ``Raster Graphics in Plan 9'' PICFILE(9.6)

Check Out this Related Man Page

FACE(6) 							   Games Manual 							   FACE(6)

NAME
face - face files DESCRIPTION
The directory /lib/face contains a hierarchy of images of people. In that directory are subdirectories named by the sizes of the corre- sponding image files: 48x48x1 (48 by 48 pixels, one bit per pixel); 48x48x2 (48 by 48 pixels, two bits per pixel); 512x512x8 (512 by 512 pixels, eight bits per pixel); 512x512x24 (512 by 512 pixels, twenty-four bits per pixel (3 times 8 bits per color)). The large files serve no special purpose; they are stored either as bitmaps (see bitmap(6)) or as picture files (see picfile(9.6). The small files are the `icons' displayed by seemail (see mail(1)); their format is special. Icons are stored as text, one line of the file to one scan line of display. Each line is divided into 8-bit, 16-bit, or 32-bit big-endian words, stored as a list of comma-separated hexadecimal C constants, such as: 0x9200, 0x1bb0, 0x003e, This odd format is historical and the programs that read it are somewhat forgiving about blanks and the need for commas. The files /lib/face/*/.dict hold a correspondence between users at machines and face files. The format is machine/user directory/file.ver The machine is the domain name of the machine sending the message, and user the name of the user sending it, as recorded in /sys/log/mail. The directory is a further subdirectory of (say) /lib/face/48x48x1, named by a single letter corresponding to the first character of the user names. The file is the name of the file, typically but not always the user name, and ver is a number to distinguish different images, for example to distinguish the image for Bill Gates from the image for Bill Joy, both of which might otherwise be called b/bill. For exam- ple, Bill Gates might be represented by the line microsoft.com/bill b/bill.1 If multiple entries exist for a user in the various .dict files, seemail chooses the highest pixel size less than or equal to that of the display on which it is running. Finally, or rather firstly, the file /lib/face/.machinelist contains a list of machine/domain pairs, one per line, to map any of a set of machines to a single domain name to be looked up in the .dict files. The machine name may be a regular expression, so for example the entry .*research.att.com astro maps any of the machines in AT&T Research into the shorthand name astro, which then appears as a domain name in the .dict files. SEE ALSO
mail(1), tweak(1), bitmap(6) FACE(6)
Man Page