public bool IsFeedLoadDone { get; }
@property (nonatomic, assign, readonly) BOOL isFeedLoadDone
public boolean isFeedLoadDone()
public:
property bool IsFeedLoadDone {
bool get();
}
IsFeedLoadDone # get (RasterCodecs)
true if the feed-load process is done; false, otherwise. The default value is true.
Checking the value of IsFeedLoadDone is useful to exit out of the feed-load process when sufficient data has been collected to load all the pages requested.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;
using Leadtools.Svg;
public void FeedLoadMultiExample()
{
RasterCodecs codecs = new RasterCodecs();
string srcFileName = Path.Combine(LEAD_VARS.ImagesDir, "Eye.gif");
string destFileName = Path.Combine(LEAD_VARS.ImagesDir, "FeedLoadMulti.tif");
// Load pages 2 through 5 from the file by reading chunks from the stream
codecs.StartFeedLoad(0, CodecsLoadByteOrder.BgrOrGray, 2, 5);
using (FileStream fs = File.OpenRead(srcFileName))
{
const int bufferSize = 1024;
byte[] buffer = new byte[bufferSize];
int read;
do
{
System.Windows.Forms.Application.DoEvents();
read = fs.Read(buffer, 0, bufferSize);
Debug.WriteLine("Feeding {0} bytes", read);
if (read > 0)
codecs.FeedLoad(buffer, 0, read);
}
while (read > 0 && !codecs.IsFeedLoadDone);
}
RasterImage image = codecs.StopFeedLoad();
Debug.WriteLine("{0} pages loaded", image.PageCount);
// Save the image to disk
codecs.Save(image, destFileName, RasterImageFormat.Tif, 1, 1, -1, 1, CodecsSavePageMode.Overwrite);
image.Dispose();
// Clean up
codecs.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