write_picture__ ( Image : : Format, FillGrey, FileName : )

Write images in graphic formats.

The operator write_picture__ returns the indicated image (Image) in different image formats in files. Pixels outside the region receive the gray value FillGrey.

The following formats are currently supported:

'tiff':
TIFF format, 1 sample per pixel, 8 bits per sample, 
uncompressed,72 dpi; file extension: *.tiff

'tiff_no_ext':
like 'tiff'\, but without file extension.
'tiff_mac':  
like 'tiff'; with additional Macintosh specific header 
(128 Bytes).

'tiff_rgb':  
TIFF format, 3 samples per pixel (filed consecutively),
8 bits per sample, uncompressed, 72 dpi; 
file extension: *.tiff

'tiff_rgb_mac':
like 'tiff_rgb'; with additional Macintosh specific header 
(128 Bytes).
 


Parameters

Image (input_object)
image(-array) -> object
Output image(s).

Format (input_control)
string -> string
Graphic format.
Default value: 'tiff'
List of values: 'tiff', 'tiff_no_ext', 'tiff_mac', 'tiff_rgb', 'tiff_rgb_mac'

FillGrey (input_control)
integer -> integer
Fill gray value for pixels not belonging to the image region.
Default value: 0
Range of values: 0 <= FillGrey <= 255

FileName (input_control)
filename.named(-array) -> string
Name of graphic file.


Result

If the parameter values are correct the operator write_picture__ returns the value TRUE. Otherwise an exception is raised. If the file cannot be opened write_picture__ returns FAIL.


Possible Predecessors

open_window, read_image, read_picture



Copyright © 1996-1997 MVTec Software GmbH