read an image file and output an AVS/Express field
module DVread_image {
string+Iparam filename; /* name of file to read */
int+Iparam flip; /* invert image in y */
int+Iparam filetype; /* file type */
Mesh_Unif+Dim2+Space2+Node_Data+Vector4+Oparam out; /* out field */
method+notify_val+notify_inst read_image_update = "DVread_image_update";
} ;
DVread_image reads an image file of a specified type and converts it into an AVS/Express Field.
A string. Names the input file to be read. The string can be either the complete absolute pathname, or a relative pathname. If it is relative, it will be interpreted relative to the user's working directory when AVS/Express was started.
Boolean indicating whether to invert the image about the x axis, i.e. in the vertical direction. The renderers assume that the image origin is at the lower left: toggle the flip param if the image is rendered upside-down.
An integer value indicating the image file type. A value of 0 causes the type to be determined from the file itself by looking at the id information in the header, or by using the filename extension. The following image formats are currently supported:
Developer Edition users wishing to create runtimes that include support for reading GIF and TIFF image formats, which use the patented LZW compression algorithm, must first obtain a license from Unisys Corporation:
WARNING : Use of this software for providing LZW capability for any purpose is not authorized unless user first enters into a license agreement with Unisys under U.S. Patent No. 4,558,302 and foreign counterparts. For information concering licensing, please contact:
Unisys Corporation
Welch Licensing Department - C1SW19
Township Line & Union Meeting Roads
P.O. Box 500
Blue Bell, PA 19422
Once you have entered into such a license agreement with Unisys Corp, runtime generation support for GIF and TIFF can be enabled in AVS/Express at no additional cost. Contact Advanced Visual Systems customer support for details.
Support for additional image formats can be provided by creating new readers using availabel API calls (see ). To obtain a current list of the supported image types, you can open v/modules.v and search for "Read_Image" -- the list can be found in the defined radioBox labels.
The output is a new Mesh_Unif object.
Grid_Unif (portions derived from Grid_Struct)
Because the scan lines are reversed, a few image processing functions may not produce the same result as they would if the image was rightside up. To ensure correct results toggle the flip param in this module. You might also compare the output of the image processing operations (using IPcompare) both with and without inve rting the image to determine if this is necessary.
v/dv.v
modules/rd_image.c
modules/image.h
Libraries.Main.Readers.Read_Image