Chapter Contents

Previous

Next
SAS Component Language: Reference

Attributes for Reading Image Files

Reader Attributes for Supported File Types describes the attributes that you can specify for the image readers.

When you are reading images, include the FORMAT= attribute in the method if any of the following conditions are true:

FORMAT= is not required in other cases, but it is always more efficient to specify it.

Reader Attributes for Supported File Types
File Type Reader Attributes Comment
BMP FORMAT=BMP


COMPRESS=NONE Default.

COMPRESS=RLE Run-length encoded data.
CAT FORMAT=CAT
DIB FORMAT=DIB Supported only under the Windows 95, Windows 98, Windows NT, and OS/2 operating systems.
EMF FORMAT=EMF Supported only under Windows 95, Windows 98, and Windows NT.
EPSI FORMAT=EPSI

DPI=num
Number of dots per inch specified when the output file was created.
GIF FORMAT=GIF
JFIF FORMAT=JFIF Required for reading JPEG files that use the JPEG File Interchange Format (JFIF).

DCT=mode Specifies which type of Discrete Cosine Transform (DCT) to use when processing the image. Mode can be


INT an integer DCT


FAST a faster and less accurate integer DCT


FLOAT a slightly more accurate method that can be much slower unless the host has very fast floating-point hardware.


The results of the floating-point method can vary across host machines, whereas the integer methods should give the same results on all hosts.

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 Writes to the SAS log the version number and copyright messages for the Independent JPEG Group's JFIF software.

FAST Enables certain recommended processing options for fast, low quality output. Specifying FAST is 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 requires 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 between 2 and 256, inclusive.

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 you are processing a large image and only a smaller version is needed, because the reader is much faster when the output is scaled down.

DITHER=mode
Specifies which type of dithering to use for color quantization. Mode can be


FS Floyd-Steinberg dithering


ORDERED ordered dithering


NONE no dithering.
MET FORMAT=MET Supported only under OS/2.
PBM FORMAT=PBM

PCD FORMAT=PCD RES= specifies the image resolution to be read. Photo CD images have multiple resolution images in each image. Values are




BASE/64 64x96


BASE/16 128x192


BASE/4 256x384


BASE 512x768 (default)


4BASE 1024x1536


16BASE 2048x3072
PCX FORMAT=PCX
PICT FORMAT=PICT Supported only in the Macintosh environment.
PNG FORMAT=PNG

TGA FORMAT=TGA

TIFF FORMAT=TIFF

WMF FORMAT=WMF Supported only under MicroSoft Windows operating systems.
XBM FORMAT=XBM

XPM FORMAT=XPM Supported only by the X Window System under UNIX.
XWD FORMAT=XWD



Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.