FILETRANSFORMS

Transforms may be used to manipulate images in a number of ways. The transforms discussed below, for use with FlashPix files, may be used to manipulate spatial orientation, color and tone, contrast, and filtering. In some cases, such as contrast manipulation or filtering, a single value may be needed, whereas, with spatial orientation and color and tone manipulation, a matrix of values is required to accomplish the transformation.

The values used to accomplish this are stored in the FILETRANSFORMS structure listed below. It is this structure that is written to the file for storage with the image using the LFile::WriteFileTransforms. The next time the image is loaded, you may examine the transforms stored with the image using the LFile::ReadFileTransforms function and decide whether to load the image in its original state, or in any of three transformed states. If you elect to load the image unchanged, you must make sure both the ELO_IGNOREVIEWTRANSFORMS and the ELO_IGNORECOLORTRANSFORMS flags have been set in the Flags data member of LOADFILEOPTION structure before loading the file.

Note: By setting these flags you are telling the system to ignore the transforms.

To load the image with only the effects of the color transforms incorporated, you must set the ELO_IGNOREVIEWTRANSFORMS flag, and clear the ELO_IGNORECOLORTRANSFORMS flag.

To load the image with only the effects of the viewing transforms incorporated, you must set the ELO_IGNORECOLORTRANSFORMS flag and clear the ELO_IGNOREVIEWTRANSFORMS flag.

Finally, to load the image with both the color transforms and the view transforms incorporated, clear both the ELO_IGNOREVIEWTRANSFORMS and the ELO_IGNORECOLORTRANSFORMS flags. Examples of all four loading options may be seen in"Example" under LFile::LoadFile.

Further explanation of spatial orientation, color and tone manipulation, contrast manipulation and filtering is provided below.

typedef struct _FILETRANSFORMS 
{ 
   // AffineMatrix translation, rotation, shear, skew, scale ... 
   L_FLOAT a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43, a44; 
   /* matrix values */ 
   // ColorTwistMatrix 
   L_FLOAT byy, byc1, byc2, bc1y, bc1c1, bc1c2, bc2y, bc2c1, bc2c2; /* matrix values */ 
   // Contrast Adjustment 
   L_FLOAT fContrastAdjustment; /* adjustment factor */ 
   L_FLOAT fFilteringValue; /* Sharpness adjustment */ 
} FILETRANSFORMS, * pFILETRANSFORMS; 

Comments

The FILETRANSFORM structure is used by LFile::ReadFileTransforms and LFile::WriteFileTransforms to read or write FlashPix transforms.

See Spatial Orientation - Affine matrices for further details on matrix operations.

Help Version 20.0.2020.4.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help