←Select platform

WriteTransformMarker(int,IntPtr,int) Method


Controls how the transform markers are used when performing a lossless transformation for certain formats.

public void WriteTransformMarker( 
   int id, 
   IntPtr data, 
   int dataLength 
Public Overloads Sub WriteTransformMarker( _ 
   ByVal id As Integer, _ 
   ByVal data As IntPtr, _ 
   ByVal dataLength As Integer _ 
void WriteTransformMarker(  
   int id, 
   IntPtr data, 
   int dataLength 


The id of the metadata marker.

A pointer to unmanaged memory buffer containing the data for the metadata marker.

Number of bytes to read from data.


You should use this method to write a certain marker data into the file.

This method can be called only from within the CodecsTransformMarkerCallback passed to the Transform method.

The transform mechanism is as follows:

  • You call Transform.
  • Transform will call the CodecsTransformMarkerCallback callback passed to it for every marker contained in the source file. In the callback, you can replace markers, insert markers or allow LEADTOOLS to do the default processing (recommended).
  • You can override the default action for a marker by returning one of the following values from the transform callback:

Note: You can also use WriteTransformMarker to insert your own markers. The marker will be inserted before the current marker. You can call WriteTransformMarker as many times as you wish. Every call to WriteTransformMarker will insert a new marker.

Warning: Incorrect handling of the markers will generate corrupt files! Since some markers contain important information about the image (image width, height, compression method, colorspace, etc), you should use caution when working with markers.


For an example, refer to Transform.


Target Platforms

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

Leadtools.Codecs Assembly