| SAS/GRAPH Colors and Images |
SAS/GRAPH software enables you to display images as part of your graph. You can place an image in the background area of a graph, in the backplane of graphs that support frames, or on the bars of two-dimensional bar charts. You can also apply images at specified graph-coordinate positions using the Annotate facility or the DATA Step Graphics Interface (DSGI).
The images you add to your graphs can be SAS files or external files in a wide range of image formats. If you wish to withold images from your graphics output, you can specify the NOIMAGEPRINT graphics option.
| Image File Types Supported by SAS/GRAPH |
For displaying images in your graphs, SAS/GRAPH software supports the following image file types:
| Reading and Writing Image File Types |
The Image File Types Supported by SAS/GRAPH may be supported for reading or writing. In addition, all SAS/GRAPH supported file types can be printed. The printed output's appearance is dependent on the driver that is selected. See Image Formats for Reading and Image Formats for Writing for more information on specific file type capabilities and attributes.
When you are reading some images, the FORMAT= attribute is required. See Including the FORMAT= attribute for more information. Some of the file types that require the FORMAT= attribute are only supported by certain hosts. Image File Types Supported Only on Certain Hosts contains information on these file types, the reader and writer attributes, and the host support.
If you are using SAS/GRAPH on the z/OS platform, you must be running the UNIX System Services Hierarchical File System (HFS) to read and write image files.
When you are reading images, include the FORMAT= attribute if
you are reading a format supported only on certain hosts. See Image File Types Supported Only on Certain Hosts for more information.
The following table describes the attributes for the image readers that are supported by SAS/GRAPH:
| File Type | Reader Attributes | Comment | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BMP | FORMAT=BMP |
|
||||||||||||
| CAT | FORMAT=CAT |
|
||||||||||||
| DIB | FORMAT=DIB | is supported only by Windows NT, Window 2000, and Windows XP. | ||||||||||||
| EMF | FORMAT=EMF | is supported only by Windows NT, Window 2000, and Windows XP. | ||||||||||||
| GIF | FORMAT=GIF |
|
||||||||||||
| JFIF | FORMAT=JFIF | required for reading JPEG files that use JPEG File Interchange Format (JFIF). | ||||||||||||
|
|
DCT=mode | selects specific type of Discrete Cosine Transform (DCT) to use when processing the image; mode can be | ||||||||||||
|
|
GRAYSCALE | produces a gray-scale image even if the JPEG file is in color. This is useful for viewing on monochrome displays. The reader runs noticeably faster in this mode. | ||||||||||||
|
|
VERSION | prints the version number and copyright messages for the Independent JPE Group's JFIF software to the log. | ||||||||||||
|
|
FAST | enables certain recommended processing options for fast, low quality output; equivalent to enabling ONEPASS, DITHER=ORDERED, COLORS=216, NOSMOOTH, and DCT=FAST. | ||||||||||||
|
|
NOSMOOTH | uses a faster, lower quality, upsampling routine. | ||||||||||||
|
|
ONEPASS | uses a one-pass color quantization instead of the standard two-pass quantization. The one-pass method is faster and needs less memory, but it produces a lower-quality image. This attribute is ignored unless you also specify the COLORS attribute. ONEPASS is always enabled for gray-scale output. | ||||||||||||
|
|
COLORS=n | reduces the number of colors in the image to at most n colors; n must be in the range 2...256. | ||||||||||||
|
|
SCALE_RATIO=n | scales the output image by a factor of 1/n. Currently the scale factor must be 1/1, 1/2, 1/4, or 1/8. This is useful when processing a large image and only a smaller version is needed, as the reader is much faster when scaling down the output. | ||||||||||||
|
|
DITHER=mode | selects the specific type of dithering to use color quantization; mode can be | ||||||||||||
| PBM | FORMAT=PBM |
|
||||||||||||
| PCD | FORMAT=PCD |
specifies photo CD format. FORMAT=PCD RES= specifies
the image resolution to be read. Photo CD images have multiple resolution
images in each image. Values are:
|
||||||||||||
| PCX | FORMAT=PCX | is not supported for writing. | ||||||||||||
| PNG | FORMAT=PNG |
|
||||||||||||
| TGA | FORMAT=TGA |
|
||||||||||||
| TIFF | FORMAT=TIFF |
|
||||||||||||
| XBM | FORMAT=XBM |
|
||||||||||||
| XPM | FORMAT=XPM | is supported only under the X Windows System under UNIX. | ||||||||||||
| XWD | FORMAT=XWD |
|
The following table describes the attributes for the image writers that are supported by SAS/GRAPH:
| File Type | Writer Attributes | Comment |
|---|---|---|
| BMP | FORMAT=BMP |
|
| CAT | FORMAT=CAT |
|
|
|
COMPRESS=G3FAX | sets compression to FAX CCITT Group 3 for monochrome black-and-white images (depth of 1) only. |
|
|
COMPRESS=G4FAX | sets compression to FAX CCITT Group4 for monochrome black-and-white images (depth of 1) only. |
|
|
DESC= | enables description for catalog description |
| DIB | FORMAT=DIB | is supported only by Windows NT, Window 2000, and Windows XP. |
| EMF | FORMAT=EMF | is supported only by Windows 95, Windows 98, Windows 2000, and Windows NT. |
| GIF | FORMAT=GIF |
|
| JFIF | FORMAT=JFIF | is required for writing JPEG files that use JPEG File Interchange Format (JFIF). |
|
|
DCT=mode | selects specific type of Discrete Cosine Transform (DCT) to use when processing the image; mode can be |
|
|
GRAYSCALE | produces a gray-scale image even if the JPEG file is in color. This is useful for viewing on monochrome displays. The writer runs noticeably faster in this mode. |
|
|
VERSION | prints the version number and copyright messages for the Independent JPE Group's JFIF software to the log. |
|
|
FAST | enables certain recommended processing options for fast, low quality output; equivalent to enabling ONEPASS, DITHER=ORDERED, COLORS=216, NOSMOOTH, and DCT=FAST. |
|
|
NOSMOOTH | uses a faster, lower quality, upsampling routine. |
|
|
ONEPASS | uses a one-pass color quantization instead of the standard two-pass quantization. The one-pass method is faster and needs less memory, but it produces a lower-quality image. This attribute is ignored unless you also specify the COLORS attribute. ONEPASS is always enabled for gray-scale output. |
|
|
COLORS=n | reduces the number of colors in the image to at most n colors; n must be in the range 2...256. |
|
|
SCALE_RATIO=n | scales the output image by a factor of 1/n. Currently the scale factor must be 1/1, 1/2, 1/4, or 1/8. This is useful when processing a large image and only a smaller version is needed, as the writer is much faster when scaling down the output. |
|
|
DITHER=mode | selects the specific type of dithering to use color quantization; mode can be |
| PBM | FORMAT=PBM |
|
|
|
COMPRESS=NONE | creates a text PBM file. |
|
|
COMPRESS=BINARY | RAW | if either of these values is specified, creates a PBM file of reduced size by packing the pixels as binary data (when FORMAT=PBM is specified, output is produced by default as if one of these values is specified). |
| PCL | FORMAT=PCL |
|
|
|
DPI=num | specifies the number of dots per inch to use to calculate the visual size of the image on the PostScript page in the output file. The default is 300. For example, a 600-pixel by 600-pixel image appears as a 2-inch by 2-inch image on the PostScript page if you use the default setting. |
|
|
EPS | does not reset the printer margins; use to embed an image into another PCL document |
| PNG | FORMAT=PNG |
|
| PS | FORMAT=PS |
|
|
|
COMPRESS=NONE | is the default for color images. |
|
|
COMPRESS=RLE | sets compression to run-length encoded; default for gray-scale images. |
|
|
DPI=num | specifies the number of dots per inch to use to calculate the visual size of the image on the PostScript page in the output file. The default is 300. For example, a 600-pixel by 600-pixel image appears as a 2-inch by 2-inch image on the PostScript page if you use the default setting. |
|
|
EPS |