public CodecsPageEventCommand Command { get; set; }
@property (nonatomic, assign) LTCodecsPageEventCommand command;
public CodecsPageEventCommand getCommand()
public void setCommand(CodecsPageEventCommand value)
public:
property CodecsPageEventCommand Command {
CodecsPageEventCommand get();
void set ( CodecsPageEventCommand );
}
Command # get and set (CodecsPageEventArgs)
A value indicating how the load or save process should continue. The default value is Continue
.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;
using Leadtools.Svg;
private void Codecs_LoadSavePage(object sender, CodecsPageEventArgs e)
{
if (e.State == CodecsPageEventState.After)
Debug.WriteLine("The image has been processed");
else
Debug.WriteLine("The image has not processed yet");
if (e.Page > 5)
e.Command = CodecsPageEventCommand.Stop;
Debug.WriteLine("File name is: {0}", e.FileName);
if (e.Image != null)
Debug.WriteLine("The Image width and height is: {0},{1}", e.Image.Width, e.Image.Height);
Debug.WriteLine("Page Index is: {0}", e.Page);
Debug.WriteLine("Page Count is: {0}", e.PageCount);
}
public void LoadPageExample()
{
RasterCodecs codecs = new RasterCodecs();
codecs.LoadPage += new EventHandler<CodecsPageEventArgs>(Codecs_LoadSavePage);
codecs.SavePage += new EventHandler<CodecsPageEventArgs>(Codecs_LoadSavePage);
RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Image1.cmp"));
codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "loadsave.jpg"), RasterImageFormat.Jpeg, image.BitsPerPixel);
codecs.LoadPage -= new EventHandler<CodecsPageEventArgs>(Codecs_LoadSavePage);
codecs.SavePage -= new EventHandler<CodecsPageEventArgs>(Codecs_LoadSavePage);
// Clean up
codecs.Dispose();
image.Dispose();
}
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