StopFeedGetInformation Method (original) (raw)

Summary

Ends a file information process in which you control the input stream.

Syntax

C#

Objective-C

C++/CLI

Java

Python

- (nullable LTCodecsImageInfo *)stopFeedGetInformation:(NSError **)error 
public CodecsImageInfo stopFeedGetInformation() 
def StopFeedGetInformation(self): 

Return Value

An CodecsImageInfo object containing information about the image data provided by FeedGetInformation.

Example

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing; using Leadtools.ImageProcessing.Color; using Leadtools.Svg; public void FeedGetInformationExample() { RasterCodecs codecs = new RasterCodecs(); codecs.CancelFeedGetInformation(); string url = @"https://www.leadtools.com/images/page_graphics/leadlogo.png"; // Create a WebRequest for the URL WebRequest request = WebRequest.Create(url); request.Proxy.Credentials = CredentialCache.DefaultCredentials; // reduce the timeout to 20 sec request.Timeout = 20000; WebResponse response = request.GetResponse(); try { Stream strm = response.GetResponseStream(); // Read chunks from the stream and feed load to the image codecs.StartFeedGetInformation(true, 1); const int bufferSize = 1024; byte[] buffer = new byte[bufferSize]; bool more; do { System.Windows.Forms.Application.DoEvents(); int read = strm.Read(buffer, 0, bufferSize); Debug.WriteLine("Downloading {0} bytes", read); if (read > 0) more = codecs.FeedGetInformation(buffer, 0, read); else { // no more image data in the stream more = false; } } while (more); } finally { response.Close(); } CodecsImageInfo info = codecs.StopFeedGetInformation(); // Clean up codecs.Dispose(); // Show the information Debug.WriteLine(info.ToString()); }

Leadtools.Codecs Assembly

CompactFile(Stream,Stream,int,int,bool,int,int,bool,int,CodecsSavePageMode,bool,bool) Method

CompactFile(Stream,Stream,int,int,bool,long,int,bool,long,CodecsSavePageMode,bool,bool,bool) Method

CompactFile(string,string,int,int,bool,int,int,bool,int,CodecsSavePageMode,bool,bool) Method

CompactFile(string,string,int,int,bool,long,int,bool,long,CodecsSavePageMode,bool,bool,bool) Method

StartCompress(int,int,int,RasterByteOrder,RasterViewPerspective,int,byte[],int,int,CodecsCompression,CodecsCompressDataCallback) Method