public enum CodecsTransformMarkerAction
typedef NS_OPTIONS(NSInteger, LTCodecsTransformMarkerAction)
public enum CodecsTransformMarkerAction
public enum class CodecsTransformMarkerAction
class CodecsTransformMarkerAction(Enum):
Default = 0
Ignore = 1
Abort = 2
Value | Member | Description |
---|---|---|
0 | Default | Default. Pass to LEADTOOLS for normal processing. |
1 | Ignore | Ignore this marker. |
2 | Abort | Abort the process. |
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;
using Leadtools.Svg;
public void TransformExample()
{
RasterCodecs codecs = new RasterCodecs();
string srcFileName = Path.Combine(LEAD_VARS.ImagesDir, "Image1.cmp");
string destFileName = Path.Combine(LEAD_VARS.ImagesDir, "Image1_Transform.cmp");
// Load the source image with markers
Debug.WriteLine("Loading the source image with all markers");
codecs.Options.Load.Markers = true;
RasterImage srcImage = codecs.Load(srcFileName);
// Show the markers loaded, if any
Debug.WriteLine("These markers were loaded:");
foreach (RasterMarkerMetadata marker in srcImage.Markers)
{
byte[] data = marker.GetData();
codecs.WriteMarker(srcFileName, 1, marker);
// codecs.WriteMarker(stream, 1, marker);
codecs.WriteTransformMarker(marker.Id, data, 0, 1);
Debug.WriteLine(" {0}, DataSize:{1}", marker.Id, data.Length);
}
codecs.Transform(
srcFileName,
destFileName,
CodecsTransformFlags.Rotate90,
1,
CodecsTransformMarkerCallback);
// Clean up
codecs.Dispose();
}
CodecsTransformMarkerAction CodecsTransformMarkerCallback(int id, RasterNativeBuffer buffer, CodecsTransformFlags transform)
{
Debug.WriteLine("Transforming: id: {0}, Data Length: {1}, transform: {2}", id, buffer.Length, transform);
return CodecsTransformMarkerAction.Default;
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document