Image File Types and Associated Attributes |
The table below describes the attributes that you can specify for the image writers.
When you are writing images, you must specify the FORMAT= attribute. You can specify this attribute either directly as an argument for the WRITE command or as part of the image-path (if you use the LNAMEMK function to specify the pathname). For example:
/* Specify the FORMAT= attribute directly */ /* as an argument to the WRITE command. */ rc=imgop(task-id,'WRITE','/user/images/sign.tif', 'format=tiff'); /* Use the LNAMEMK function to specify the image-path, */ /* and include the FORMAT= attribute as part of the path. */ path=lnamemk(5,'mine.images.sign','format=cat'); rc = imgop(task-id,'WRITE',path);
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 3.1, Windows 95, Windows 98, Windows 2000, and Windows NT. |
EMF | FORMAT=EMF | is supported only by Windows 95, Windows 98, Windows 2000, and Windows NT. |
EPSI | FORMAT=EPSI |
|
GIF | FORMAT=GIF |
|
JFIF | FORMAT=JFIF | is required for writing JPEG files that use JPEG File Interchange Format (JFIF). |
|
DCT=mode |
selects the 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, because 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 |
|
|
COMPRESS=NONE | creates a text PBM file. |
|
COMPRESS=BINARY | RAW | creates a PBM file of reduced size by packing the pixels as binary data (this option is the default setting when FORMAT=PBM is specified) |
PCL | FORMAT=PCL |
|
|
DPI=num | specifies the number of dots per inch to be used in the output file. |
|
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.
Also works with colormapped (256 color) images or RGB (millions of colors) 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 a PostScript page if you use the default setting. |
|
EPS | does not reset the printer margins; used to embed an image in another PCL document. |
|
PREVIEW | specifies whether a scaled-down, 1-bit, black-and-white preview image is written into the encapsulation header. The preview image enables this file to be read by software (such as SAS) that doesn't support a real PostScript reader. |
|
PREWIDTH=x
PREHEIGHT=y |
sets the size of the preview image in pixels. if PREVIEW is specified (default: 25% of original size). |
|
XSCALE | directly sets width scaling in points (1/72 inch). Default: calculate it. |
|
YSCALE | directly sets height scaling in points (1/72 inch). Default: calculate it. |
|
PAGEX | sets the output page width in points (1/72 inch). Default: 612 (a typical 8.5-inch page). |
|
PAGEY | sets the output page height in points (1/72 inch). Default: 792 (a typical 11-inch page). |
|
NOFIT | turns off the default of scaling an oversized image down to fit the page. Must be used with XSCALE and YSCALE. This option will be replaced by PAGEFIT in releases of SAS after 9.1. |
|
PAGEFIT |
The PAGEFIT option replaces the NOFIT option in SAS releases after 9.1. |
TIFF | FORMAT=TIFF |
|
|
COMPRESS=NONE | is the default. |
|
COMPRESS=G3FAX | sets compression to FAX CCITT Group 3 for monochrome black-and-white (depth of 1) images only. |
|
COMPRESS=G4FAX | sets compression to FAX CCITT Group 4 for monochrome black-and-white (depth of 1) images only. |
WMF | FORMAT=WMF | is supported only under Windows operating systems. |
XBM | FORMAT=XBM | is supported for writing only from interactive windows under UNIX. |
XPM | FORMAT=XPM | is supported only under the X Windows System under UNIX. |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.