Gets or sets the color order of this
RasterImage.
Supported in Silverlight, Windows Phone 7
Syntax
Example
Visual Basic | Copy Code |
---|
Public Sub OrderExample()
Dim codecs As RasterCodecs = New RasterCodecs()
Dim srcFileName As String = Path.Combine(LEAD_VARS.ImagesDir, "Image1.cmp")
' Load the image as BGR (default) and get the first pixel value
Dim image As RasterImage = 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()
End Sub
Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class |
C# | Copy Code |
---|
public void OrderExample()
{
RasterCodecs codecs = new RasterCodecs();
string srcFileName = Path.Combine(LEAD_VARS.ImagesDir, "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();
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
} |
SilverlightCSharp | Copy Code |
---|
public void OrderExample()
{
// Create an image as BGR
RasterImage srcImage = new RasterImage(RasterMemoryFlags.Conventional, 300, 300, 24, RasterByteOrder.Bgr, RasterViewPerspective.TopLeft, null, null, 0);
Debug.WriteLine("Order is {0}", srcImage.Order);
Debug.Assert(srcImage.Order == RasterByteOrder.Bgr);
srcImage.Dispose();
// Create an image as RGB
srcImage = new RasterImage(RasterMemoryFlags.Conventional, 300, 300, 24, RasterByteOrder.Rgb, RasterViewPerspective.TopLeft, null, null, 0);
Debug.WriteLine("Order is {0}", srcImage.Order);
Debug.Assert(srcImage.Order == RasterByteOrder.Rgb);
srcImage.Dispose();
} |
SilverlightVB | Copy Code |
---|
Public Sub OrderExample()
' Create an image as BGR
Dim srcImage As RasterImage = New RasterImage(RasterMemoryFlags.Conventional, 300, 300, 24, RasterByteOrder.Bgr, RasterViewPerspective.TopLeft, Nothing, Nothing, 0)
Debug.WriteLine("Order is {0}", srcImage.Order)
Debug.Assert(srcImage.Order = RasterByteOrder.Bgr)
srcImage.Dispose()
' Create an image as RGB
srcImage = New RasterImage(RasterMemoryFlags.Conventional, 300, 300, 24, RasterByteOrder.Rgb, RasterViewPerspective.TopLeft, Nothing, Nothing, 0)
Debug.WriteLine("Order is {0}", srcImage.Order)
Debug.Assert(srcImage.Order = RasterByteOrder.Rgb)
srcImage.Dispose()
End Sub |
Remarks
Requirements
Target Platforms: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only), Windows Phone 7
See Also