Loads specific frame images
(i.e.
ColorImage,
OpacityImage, and
PreOpacityImage)
from the specified JPEG 2000 file using the specified options.
Overload List
Overload | Description |
ReadFrames(RasterCodecs,String,Generic List,Int32,CodecsLoadByteOrder) |
Loads specific frame images
(i.e. ColorImage, OpacityImage, and PreOpacityImage)
from the specified JPEG 2000 file using the specified options.
|
ReadFrames(RasterCodecs,Stream,Generic List,Int32,CodecsLoadByteOrder) |
Loads specific frame images (i.e. ColorImage, OpacityImage,
and PreOpacityImage)
from the specified JPEG 2000 stream using the specified options.
|
Example
Visual Basic | Copy Code |
---|
Leadtools.Jpeg2000.Jpeg2000Engine.ReadFrames(String)
Private Sub ReadFramesStringExample()
Dim engine As New Jpeg2000Engine()
Dim fileInfo As Jpeg2000FileInformation = engine.GetFileInformation("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\image1.jpx")
If (FileInfo.Frame.GetLength(0) < 2) Then
Return
End If
Dim codecs As New RasterCodecs()
codecs.ThrowExceptionsOnInvalidImages = True
Dim frames As New List(Of Integer)
frames.Add(1)
Dim images As List(Of CompositeJpxImages) = engine.ReadFrames(codecs, "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\image1.jpx", frames, 0, CodecsLoadByteOrder.BgrOrGray)
Dim _image As CompositeJpxImages
For Each _image In images
_image.ColorImage.Dispose()
_image.OpacityImage.Dispose()
_image.PreOpacityImage.Dispose()
Next _image
codecs.Dispose()
End Sub |
C# | Copy Code |
---|
Leadtools.Jpeg2000.Jpeg2000Engine.ReadFrames(String) private void ReadFramesStringExample() { // Load a JPEG 2000 image Jpeg2000Engine engine = new Jpeg2000Engine(); Jpeg2000FileInformation fileInfo = engine.GetFileInformation(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\image1.jpx"); if (fileInfo.Frame.GetLength(0) < 2) return; RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; List<int> frames = new List<int>(); frames.Add(1); List<CompositeJpxImages> images = engine.ReadFrames(codecs,@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\image1.jpx",frames,0,CodecsLoadByteOrder.BgrOrGray); // Clean up foreach (CompositeJpxImages image in images) { image.ColorImage.Dispose(); image.OpacityImage.Dispose(); image.PreOpacityImage.Dispose(); } codecs.Dispose(); } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also