Gets or sets the color order of this
RasterImage.
Syntax
Example
Visual Basic |
Copy Code |
Public Sub OrderExample() RasterCodecs.Startup() Dim codecs As RasterCodecs = New RasterCodecs()
Dim srcFileName As String = LeadtoolsExamples.Common.ImagesPath.Path + "Image1.cmp"
Dim image As RasterImage = codecs.Load(srcFileName, 24, CodecsLoadByteOrder.Bgr, 1, 1) Console.WriteLine("Order is {0}", image.Order) image.Dispose()
image = codecs.Load(srcFileName, 24, CodecsLoadByteOrder.Rgb, 1, 1) Console.WriteLine("Order is {0}", image.Order) image.Dispose()
codecs.Dispose() RasterCodecs.Shutdown() End Sub |
C# |
Copy Code |
public void OrderExample() { RasterCodecs.Startup(); RasterCodecs codecs = new RasterCodecs(); string srcFileName = LeadtoolsExamples.Common.ImagesPath.Path + "Image1.cmp"; // Load the image as BGR (default) and get the first pixel value RasterImage image = codecs.Load(srcFileName, 24, CodecsLoadByteOrder.Bgr, 1, 1); Console.WriteLine("Order is {0}", image.Order); image.Dispose(); // Load the image as RGB and get the first pixel value image = codecs.Load(srcFileName, 24, CodecsLoadByteOrder.Rgb, 1, 1); Console.WriteLine("Order is {0}", image.Order); image.Dispose(); codecs.Dispose(); RasterCodecs.Shutdown(); } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also