WRITE_IMAGE_FILE File Built-in
Description
Writes the image from a Oracle Forms image item into the specified file.
Syntax
WRITE_IMAGE_FILE
(file_name VARCHAR2,
file_type VARCHAR2,
item_id ITEM,
compression_quality NUMBER,
image_depth NUMBER);
WRITE_IMAGE_FILE
(file_name VARCHAR2,
file_type VARCHAR2,
item_name VARCHAR2,
compression_quality NUMBER,
image_depth NUMBER);
Built-in Type unrestricted procedure
Enter Query Mode yes
Parameters
- file_name
-
- The name of the file where the image is stored. The file name must adhere
to your operating system requirements.
-
- file_type
-
- The file type of the image: BMP, CALS, GIF, JFIF, JPEG, PICT, RAS, TIFF,
or TPIC. The parameter takes a VARCHAR2 argument.
-
- item_id
-
- The unique ID Oracle Forms assigned to the image item when you created
it. Use the FIND_ITEM Built-in to return the ID to an appropriately typed
variable. Datatype is ITEM.
-
- item_name
-
- The name you gave the image item when you defined it. Datatype is VARCHAR2.
-
- compression_quality
-
- The degree of compression Oracle Forms will apply to the image when it
stores it to the file (optional). Datatype is NUMBER. Valid values are:NO_COMPRESSION,
MINIMIZE_COMPRESSION, LOW_COMPRESSION, MEDIUM_COMPRESSION, HIGH_COMPRESSION,
MAXIMIZE_COMPRESSION
-
- image_depth
-
- The degree of depth Oracle Forms will apply to the image when it stores
it to the file (optional). Datatype is NUMBER. Valid values are:ORIGINAL_DEPTH,
MONOCHROME, GRAYSCALE, LUT (Lookup Table), RGB (Red, Green, Blue)
WRITE_IMAGE_FILE Restrictions
- The indicated file type must be compatible with the actual file type of
the image.
- As with any file, if you write the image to an existing file, you overwrite
the contents of that file with the contents of the image item.
- Though you can read PCD and PCX files from the filesystem or the database,
you cannot write image files to the filesystem in PCD or PCX format (using
WRITE_IMAGE_FILE). (If you use a restricted file type when writing images
to the filesystem, Oracle Forms defaults the image file to TIFF format.)
- Oracle Forms does not support multi-page TIFF.
- Writing a JPEG file from a Oracle Forms image item will result in loss
of resolution.
- The image is written to the middle tier server.
WRITE_IMAGE_FILE Examples
/* Built-in: WRITE_IMAGE_FILE
**
** Save the contents of an image item out to a file
** on the filesystem in a supported image format.
*/
BEGIN
WRITE_IMAGE_FILE('output.tif',
'TIFF',
'emp.photo_image_data',
maximize_compression,
original_depth);
END;