LuciadCPillar C# 2023.1.04
Luciad.Drawing.Image Class Reference

An image with a width, height and pixel data in a specified pixel format. More...

Inheritance diagram for Luciad.Drawing.Image:

Public Member Functions

void Dispose ()
 
System.Drawing.Color GetColor (uint x, uint y)
 Returns the color value at the given image location. More...
 

Static Public Member Functions

static Luciad.Drawing.Image Create (uint width, uint height, bool isAlphaPreMultiplied, Luciad.Drawing.PixelFormat pixelFormat, Luciad.Containers.ByteBuffer data)
 Creates an Image. More...
 

Properties

Luciad.Containers.ByteBuffer Bytes [get]
 
uint Height [get]
 
bool IsAlphaPreMultiplied [get]
 
Luciad.Drawing.PixelFormat PixelFormat [get]
 
uint Width [get]
 

Detailed Description

An image with a width, height and pixel data in a specified pixel format.

The origin of an image (pixel (0, 0)) is defined at the top left corner, with the x axis pointing right, and the y axis pointing down.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Image.

Member Function Documentation

◆ Create()

Luciad.Drawing.Image Luciad.Drawing.Image.Create ( uint  width,
uint  height,
bool  isAlphaPreMultiplied,
Luciad.Drawing.PixelFormat  pixelFormat,
Luciad.Containers.ByteBuffer  data 
)
inlinestatic

Creates an Image.

width

the width of the new image

height

the height of the new image

isAlphaPreMultiplied

true to indicate that the colors in the data buffer contain premultiplied alpha

pixelFormat

the pixel format

data

the pixel data. The buffer contains rows (left to right) of color data. The rows are ordered from top to bottom. The size of each color, and so also the size of the data buffer, is determined by the used PixelFormat.

a new image

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Image::create.

◆ Dispose()

void Luciad.Drawing.Image.Dispose ( )
inline

◆ GetColor()

System.Drawing.Color Luciad.Drawing.Image.GetColor ( uint  x,
uint  y 
)
inline

Returns the color value at the given image location.

This will be an rgba color for Image instance with: PixelFormat::Rgba8888 PixelFormat::Rgba888

This will be a greyscale Color for Image instance with: PixelFormat::Float32 PixelFormat::UnsignedShort

x

the x-coordinate of the pixel. A value of 0 corresponds with a left-most pixel.

y

the y-coordinate of the pixel. A value of 0 corresponds with a top-most pixel.

the Color value at the given image location.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Image::getColor.

Property Documentation

◆ Bytes

Luciad.Containers.ByteBuffer Luciad.Drawing.Image.Bytes
get

◆ Height

uint Luciad.Drawing.Image.Height
get

◆ IsAlphaPreMultiplied

bool Luciad.Drawing.Image.IsAlphaPreMultiplied
get

◆ PixelFormat

Luciad.Drawing.PixelFormat Luciad.Drawing.Image.PixelFormat
get

◆ Width

uint Luciad.Drawing.Image.Width
get