TransformMarker event (ILEADRasterIO)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

void TransformMarker(short iMarker, long lSize, ILEADRasterVariant *vData, short iTransform);

Overview

Refer to Examining and Altering Bitmaps.

Remarks

This event is fired for every JPEG marker present in the file transformed by the TransformFile method.

Processing this event is not required. It is recommended that you have a good knowledge of JPEG files before processing this event. Incorrect handling of the markers can create corrupted files.

Typically, this event could be used to process user-defined markers (APP0 – APP14). These markers may contain extra information like stamps, file resolution information, etc.

This can also be used to prevent certain markers from being written in the file. For more information, refer to the WriteMarkerAction property.

Upon returning from this event, LEADTOOLS will examine the value of the WriteMarkerAction property to see if the default processing should be performed for this marker. If the WriteMarkerAction property is:

image\sqrblit.gif WRITEMARKER_DEFAULT, then LEADTOOLS will perform the default action and write it to the file.

image\sqrblit.gif WRITEMARKER_IGNORE, then LEADTOOLS will not write this marker to the file.

image\sqrblit.gif WRITEMARKER_ABORT, then the file transformation process is aborted and the TransformFile method will return ERROR_USER_ABORT.

When transforming the marker data, call the WriteMarker method with the WriteMarkerAction property set to WRITEMARKER_IGNORE. That way the marker will not occur twice in the file.

See Also

Elements:

TransformFile method, WriteMarker method, WriteMarkerAction property

Topics:

Raster Images: Doing Geometric Transformations