|
|
|||
|
|
| MIME type: image/x-portable-graymap PGM grayscale raster image format. Member of the Portable family of image formats. Related to PBM and PPM. Implements a subset of the PNM format. Native format of the Netpbm graphics software package. Primarily used as an intermediate file format on Unix systems. PGM is an acronym for Portable Gray Map. ASCII or binary format. Stores raster images formatted as plain text, representing each pixel as an 8-bit gray level. Developed in 1988 as part of the Pbmplus package. |
| "Elements" | list of elements and options available in this file | |
| "Rules" | full list of rules for each element and option | |
| "Options" | list of rules for options, properties and settings |
| "Data" | array of grayscale values | |
| "Graphics" | Graphics object representing an image | |
| "GrayLevels" | equivalent to "Data" | |
| "RGBColorArray" | array of RGBColor objects |
| "ColorMap" | None | determines the grayscale palette used for representing the imported PGM | |
| "DitheringMethod" | "FloydSteinberg" | the dithering method used when color reduction is performed on Import |
| Automatic | chooses an adaptive set of at most 256 colors | |
| n | adaptive set of at most n colors | |
| {color1, color2, ...} | list of GrayLevel objects | |
| None | no color reduction is performed |
| "FloydSteinberg" | Floyd-Steinberg error diffusion dithering | |
| None | no dithering is used |
| "ImageTopOrientation" | Top | orientation of the exported image |
| "ColorSpace" | GrayLevel | color space of the image |
This imports a PGM example file:
Read the color palette used in this file:
Import the "BitDepth" element:
Create a sample gray-level image using ArrayPlot and export it to PGM:
Export arbitrary graphics to the PGM format:
|
| © 2013 Wolfram Research, Inc. |