Leadtools.CF Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.6.15
StartFeedLoad Method
See Also 
Leadtools.Codecs Namespace > RasterCodecs Class : StartFeedLoad Method



bitsPerPixel
Resulting image pixel depth. Valid values are:
valuemeaning
0Keep the original file's pixel depth (Do not convert).
1 to 8The specified bits per pixel in the resultant image.
1212 bits per pixel in the resultant image.
1616 bits per pixel in the resultant image.
2424 bits per pixel in the resultant image.
3232 bits per pixel in the resultant image.
4848 bits per pixel in the resultant image.
6464 bits per pixel in the resultant image.
order
An CodecsLoadByteOrder that specifies the desired color order. Use CodecsLoadByteOrder.BgrOrGray if you want to keep the original byte order as it occur in the image.
bitsPerPixel
Resulting image pixel depth. Valid values are:
valuemeaning
0Keep the original file's pixel depth (Do not convert).
1 to 8The specified bits per pixel in the resultant image.
1212 bits per pixel in the resultant image.
1616 bits per pixel in the resultant image.
2424 bits per pixel in the resultant image.
3232 bits per pixel in the resultant image.
4848 bits per pixel in the resultant image.
6464 bits per pixel in the resultant image.
order
An CodecsLoadByteOrder that specifies the desired color order. Use CodecsLoadByteOrder.BgrOrGray if you want to keep the original byte order as it occur in the image.
Initializes a file-load process in which you control the input stream.

Syntax

Visual Basic (Declaration) 
Public Sub StartFeedLoad( _
   ByVal bitsPerPixel As Integer, _
   ByVal order As CodecsLoadByteOrder _
) 
Visual Basic (Usage)Copy Code
Dim instance As RasterCodecs
Dim bitsPerPixel As Integer
Dim order As CodecsLoadByteOrder
 
instance.StartFeedLoad(bitsPerPixel, order)
C# 
public void StartFeedLoad( 
   int bitsPerPixel,
   CodecsLoadByteOrder order
)
C++/CLI 
public:
void StartFeedLoad( 
   int bitsPerPixel,
   CodecsLoadByteOrder order
) 

Parameters

bitsPerPixel
Resulting image pixel depth. Valid values are:
valuemeaning
0Keep the original file's pixel depth (Do not convert).
1 to 8The specified bits per pixel in the resultant image.
1212 bits per pixel in the resultant image.
1616 bits per pixel in the resultant image.
2424 bits per pixel in the resultant image.
3232 bits per pixel in the resultant image.
4848 bits per pixel in the resultant image.
6464 bits per pixel in the resultant image.
order
An CodecsLoadByteOrder that specifies the desired color order. Use CodecsLoadByteOrder.BgrOrGray if you want to keep the original byte order as it occur in the image.

Example

This example will try to load an image from an IO stream.

Remarks

You must call FeedLoad to supply buffered data, and you must call StopFeedLoad 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 RasterCodecs.Load method, except that your code supplies the image data. The file-load process works as follows:

  1. You call StartFeedLoad to initialize the file-load process.
  2. You create a buffer, and each time you fill it with information, you call 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 RasterCodecs.Load. It allocates and begins loading the bitmap. The file-load process does not update information in the RasterImage until it has received enough information to do so. (Usually, the information, such as the image height and width, is in the file header.) The file-load process will make the first call to your event handler whenever this information is available. To end the file-load process, you call StopFeedLoad, which cleans up the process, and returns the loaded RasterImage, if successful. If you call this function before supplying the complete file, it will successfully clean up the process, but will throw an exception. You should catch the exception if the load is canceled purposely.

You can use the feed load mechanism to load an image file from any kind of stream (memory, file, HTTP). You can also use it to update a progress bar while loading your image.

For more information, refer to Loading and Saving Images.

For more information, refer to Loading and Saving Large Tiff Files.

For more information, refer to Loading and Saving Large Tiff Files.

Requirements

Target Platforms: Microsoft .NET CF Framework 2.0, Windows Mobile 5 PocketPC, Windows Mobile 5 Smartphone, Windows Mobile 6

See Also