- id
- The id of the metadata marker.
- data
- A pointer to unmanaged memory buffer containing the data for the metadata marker.
- dataLength
- Number of bytes to read from data.
Visual Basic (Declaration) | |
---|---|
Overloads Public Sub WriteTransformMarker( _ ByVal id As Integer, _ ByVal data As IntPtr, _ ByVal dataLength As Integer _ ) |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As RasterCodecs Dim id As Integer Dim data As IntPtr Dim dataLength As Integer instance.WriteTransformMarker(id, data, dataLength) |
Parameters
- id
- The id of the metadata marker.
- data
- A pointer to unmanaged memory buffer containing the data for the metadata marker.
- dataLength
- 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:
- CodecsTransformMarkerAction.Default: Let Leadtools perform the default action on the marker. This means the marker might (or might not) be transformed and will be written to the destination file.
- CodecsTransformMarkerAction.Ignore: This marker will be ignored (this is useful for stripping unwanted markers). You should also use this if you want to do your own transformation and write the marker yourself by calling WriteTransformMarker(Int32,Byte[],Int32,Int32).
- CodecsTransformMarkerAction.Abort: Abort the process. This will cause Transform to throw a 'user-abort' exception.
Note: You can also use WriteTransformMarker(Int32,Byte[],Int32,Int32) to insert your own markers. The marker will be inserted before the current marker. You can call WriteTransformMarker(Int32,Byte[],Int32,Int32) as many times as you wish. Every call to WriteTransformMarker(Int32,Byte[],Int32,Int32) 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.
Target Platforms: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)