LEADTOOLS JPEG 2000 (Leadtools.Jpeg2000 assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
Load(RasterCodecs,String,Int32,CodecsLoadByteOrder) Method
See Also 
Leadtools.Jpeg2000 Namespace > Jpeg2000Engine Class > Load Method : Load(RasterCodecs,String,Int32,CodecsLoadByteOrder) Method



codecs
The Leadtools.Codecs.RasterCodecs object.
fileName
System.String containing the name of the JPEG 2000 image file being loaded.
bitsPerPixel
Resulting image pixel depth. If this value is zero [0], the image will have the original file’s pixel depth (the image will not be converted).
order

Color order for 16-, 24-, 32-, 48-, and 64-bit images. If the resulting image is less than 16 bits per pixel, this will have no effect since palletized images do not use color order. Possible values are:

Value Meaning
CodecsLoadByteOrder.Rgb Red, green, and blue color order in memory
CodecsLoadByteOrder.Bgr Blue, green, and red color order in memory
CodecsLoadByteOrder.Gray 12- or 16-bit grayscale image. 12- and 16-bit grayscale images are supported only in the Document/Medical Imaging editions.
CodecsLoadByteOrder.RgbOrGray Load the image as red, green, blue OR as a 12- or 16-bit grayscale image. 12- and 16-bit grayscale images are supported only in the Document/Medical Imaging editions.
CodecsLoadByteOrder.BgrOrGray Load the image as blue, green, red OR as a 12- or 16-bit grayscale image. 12- and 16-bit grayscale images are supported only in the Document/Medical Imaging editions.
CodecsLoadByteOrder.Romm ROMM order. ROMM only supports 24- and 48-bit images.
CodecsLoadByteOrder.BgrOrGrayOrRomm Load the image as red, green, blue OR as a 12- or 16-bit grayscale image OR as ROMM. 12- and 16-bit grayscale images are supported only in the Document/Medical Imaging editions. ROMM only supports 24- and 48-bit color images.

codecs
The Leadtools.Codecs.RasterCodecs object.
fileName
System.String containing the name of the JPEG 2000 image file being loaded.
bitsPerPixel
Resulting image pixel depth. If this value is zero [0], the image will have the original file’s pixel depth (the image will not be converted).
order

Color order for 16-, 24-, 32-, 48-, and 64-bit images. If the resulting image is less than 16 bits per pixel, this will have no effect since palletized images do not use color order. Possible values are:

Value Meaning
CodecsLoadByteOrder.Rgb Red, green, and blue color order in memory
CodecsLoadByteOrder.Bgr Blue, green, and red color order in memory
CodecsLoadByteOrder.Gray 12- or 16-bit grayscale image. 12- and 16-bit grayscale images are supported only in the Document/Medical Imaging editions.
CodecsLoadByteOrder.RgbOrGray Load the image as red, green, blue OR as a 12- or 16-bit grayscale image. 12- and 16-bit grayscale images are supported only in the Document/Medical Imaging editions.
CodecsLoadByteOrder.BgrOrGray Load the image as blue, green, red OR as a 12- or 16-bit grayscale image. 12- and 16-bit grayscale images are supported only in the Document/Medical Imaging editions.
CodecsLoadByteOrder.Romm ROMM order. ROMM only supports 24- and 48-bit images.
CodecsLoadByteOrder.BgrOrGrayOrRomm Load the image as red, green, blue OR as a 12- or 16-bit grayscale image OR as ROMM. 12- and 16-bit grayscale images are supported only in the Document/Medical Imaging editions. ROMM only supports 24- and 48-bit color images.

Loads the specified JPEG 2000 image file using specific options.

Syntax

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

Parameters

codecs
The Leadtools.Codecs.RasterCodecs object.
fileName
System.String containing the name of the JPEG 2000 image file being loaded.
bitsPerPixel
Resulting image pixel depth. If this value is zero [0], the image will have the original file’s pixel depth (the image will not be converted).
order

Color order for 16-, 24-, 32-, 48-, and 64-bit images. If the resulting image is less than 16 bits per pixel, this will have no effect since palletized images do not use color order. Possible values are:

Value Meaning
CodecsLoadByteOrder.Rgb Red, green, and blue color order in memory
CodecsLoadByteOrder.Bgr Blue, green, and red color order in memory
CodecsLoadByteOrder.Gray 12- or 16-bit grayscale image. 12- and 16-bit grayscale images are supported only in the Document/Medical Imaging editions.
CodecsLoadByteOrder.RgbOrGray Load the image as red, green, blue OR as a 12- or 16-bit grayscale image. 12- and 16-bit grayscale images are supported only in the Document/Medical Imaging editions.
CodecsLoadByteOrder.BgrOrGray Load the image as blue, green, red OR as a 12- or 16-bit grayscale image. 12- and 16-bit grayscale images are supported only in the Document/Medical Imaging editions.
CodecsLoadByteOrder.Romm ROMM order. ROMM only supports 24- and 48-bit images.
CodecsLoadByteOrder.BgrOrGrayOrRomm Load the image as red, green, blue OR as a 12- or 16-bit grayscale image OR as ROMM. 12- and 16-bit grayscale images are supported only in the Document/Medical Imaging editions. ROMM only supports 24- and 48-bit color images.

Return Value

The Leadtools.RasterImage object that this method loads.

Example

Remarks

All of the engine boxes will be reset and updated with new loaded boxes only.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

Leadtools.Jpeg2000 requires a Document or Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features