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



fileName
String containing the name of the image file to load.
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 enumeration that describes the desired color order.
pageNumber
Page number to load (1-based) if the file contains a multi-page image.
fileName
String containing the name of the image file to load.
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 enumeration that describes the desired color order.
pageNumber
Page number to load (1-based) if the file contains a multi-page image.
Loads the specified image file, using specific options.

Syntax

Visual Basic (Declaration) 
Public Function Load( _
   ByVal fileName As String, _
   ByVal bitsPerPixel As Integer, _
   ByVal order As CodecsLoadByteOrder, _
   ByVal pageNumber As Integer _
) As RasterImage
Visual Basic (Usage)Copy Code
Dim instance As RasterCodecs
Dim fileName As String
Dim bitsPerPixel As Integer
Dim order As CodecsLoadByteOrder
Dim pageNumber As Integer
Dim value As RasterImage
 
value = instance.Load(fileName, bitsPerPixel, order, pageNumber)
C# 
public RasterImage Load( 
   string fileName,
   int bitsPerPixel,
   CodecsLoadByteOrder order,
   int pageNumber
)
C++/CLI 
public:
RasterImage^ Load( 
   String^ fileName,
   int bitsPerPixel,
   CodecsLoadByteOrder order,
   int pageNumber
) 

Parameters

fileName
String containing the name of the image file to load.
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 enumeration that describes the desired color order.
pageNumber
Page number to load (1-based) if the file contains a multi-page image.

Return Value

The RasterImage that this method loads.

Example

For an example, refer to RasterCodecs.

Remarks

Use CodecsLoadByteOrder.BgrOrGray if you want to keep the original byte order as it occur in the image.

Requirements

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

See Also