StartFeedLoad method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int StartFeedLoad (int iBitsPerPixel, int iPage, int iPages);

Delphi Syntax

StartFeedLoad (iBitsPerPixel, iPage, iPages: Integer): Integer;

Overview

Refer to Loading a Bitmap from Your Own Buffer.

Remarks

Initializes a file-load process in which you control the input stream. You must call the FeedLoad method to supply buffered data, and you must call StopFeedLoad method when the loading is complete.

This file-load process is useful when receiving transmitted images, such as those on the Internet. It works the same way as the Load method , except that your code supplies the image data. The file-load process works as follows:

1.

You call the StartFeedLoad method to initialize the file-load process.

2.

You create a buffer, and each time you fill it with information, you call the FeedLoad method, which sends the data to the file-load process just as if the data were being read from a file on disk.

3.

Whenever it has enough data to do so, the file-load process behaves the same as in the Load method. It allocates and begins loading the bitmap. It generates a OnStatus event whenever it has enough data in its input buffer.

 

The file-load process does not update information in the bitmap handle until it has received enough information to do so. (Usually, the information, such as the bitmap height and width, is in the file header.) The file-load process will generate the first OnStatus event whenever this information is available.

 

4.

To end the file-load process, you call the StopFeedLoad method, which cleans up the process. If you call this method before supplying the complete file, it will successfully clean up the process, but will return a file-read error. You should trap the error if the load is canceled purposely.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

See Also

Elements:

Load method, LoadStamp method, LoadMemory method

Topics:

Raster Images: Loading Files