LEADTOOLS JPEG 2000 (Leadtools.Jpeg2000 assembly)
LEAD Technologies, Inc

Load(RasterCodecs,Stream,Int32,CodecsLoadByteOrder) Method






The Leadtools.Codecs.RasterCodecs object.
A System.IO.Stream containing the image data to be loaded.
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).

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 stream using the specified options.
Syntax
'Declaration
 
Public Overloads Function Load( _
   ByVal codecs As RasterCodecs, _
   ByVal steam As Stream, _
   ByVal bitsPerPixel As Integer, _
   ByVal order As CodecsLoadByteOrder _
) As RasterImage
'Usage
 
Dim instance As Jpeg2000Engine
Dim codecs As RasterCodecs
Dim steam As Stream
Dim bitsPerPixel As Integer
Dim order As CodecsLoadByteOrder
Dim value As RasterImage
 
value = instance.Load(codecs, steam, bitsPerPixel, order)
 function Leadtools.Jpeg2000.Jpeg2000Engine.Load(RasterCodecs,Stream,Int32,CodecsLoadByteOrder)( 
   codecs ,
   steam ,
   bitsPerPixel ,
   order 
)

Parameters

codecs
The Leadtools.Codecs.RasterCodecs object.
steam
A System.IO.Stream containing the image data to be 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.
Remarks
All of the engine boxes will be reset (both those that have been loaded and any that have not been loaded). Only those boxes that have been found in the file during loading are updated.
Example
For an example, refer to Leadtools.Jpeg2000.Jpeg2000Engine.Save(RasterCodecs codecs, Stream stream, RasterImage image, Jpeg2000FileFormat format, int bitsPerPixel, int qualityFactor) example.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Jpeg2000Engine Class
Jpeg2000Engine Members
Overload List
AppendFrames
Load(RasterCodecs, String, Int32, CodecsLoadByteOrder)
LoadComposite
ReadFrames
Save
SaveComposite
Compression Using LEAD and JPEG Formats
File Formats - JPEG And LEAD Compressed
Bitmaps In Memory And In Files
JPEG2000 File Comments
JPEG And LEAD File Comments
Programming with JPEG 2000 Features
JPEG 2000 Boxes

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.

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