SAFR Windows SDK
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events
RealNetworks.CameraKit.Image Class Referenceabstract
Inheritance diagram for RealNetworks.CameraKit.Image:

Public Member Functions

abstract void Draw (Image image)
 Draws the given image into the receiver. The source image is scaled such that it fits precisely inside the receiver. More...
 
abstract void Draw (Image image, bool hflip)
 Draws the given image into the receiver. The source image is scaled such that it fits precisely inside the receiver. The source image is also optionally flipped horizontally. More...
 
abstract void DrawRect (Image image, Int32Rect srcRect)
 Copies the given rectangle from the source image into the receiver. More...
 
abstract void Draw (Image image, Int32Rect dstRect)
 Draws the given image into the receiver. The source image is scaled and positioned such that it fits inside the 'dstRect'. More...
 
abstract void Draw (BitmapSource source)
 Copies the pixels from the given bitmap source into the image. Assumes that the bitmap source size and the image size are the same. More...
 
abstract void CopyTo (WriteableBitmap bitmap)
 Copies the image into a writable bitmap. Assumes that the bitmap was created with a Windows pixel format that is compatible to the image's pixel format. More...
 
abstract BitmapSource CreateBitmapSource ()
 Creates a new bitmap source which contains a copy of all the pixels of the receiver. More...
 
abstract BitmapSource CreateBitmapSourceFromRegion (Int32Rect rect)
 Creates a new bitmap source which contains a copy of the pixels in the 'rect' region from the receiver. More...
 
void Dispose ()
 
abstract void Dispose (bool fromIDisposable)
 

Static Public Member Functions

static Image Create (int width, int height, PixelFormat pixelFormat)
 Creates a new bitmap backed image. This image type stores its pixels in main memory. More...
 
static Image Create (int width, int height, PixelFormat pixelFormat, Accelerator accel)
 Creates a new texture backed image. This image type stores its pixels in main memory. More...
 
static Image Create (BitmapSource bmp)
 Creates an image from the given BitmapSource instance. More...
 
static Image Create (System.Drawing.Bitmap image)
 Creates an image from the given Windows bitmap. More...
 
static Image Create (string path)
 Creates an image from the image file located at 'path'. More...
 

Properties

abstract int Width [get]
 Returns the width of the image in pixels. More...
 
abstract int Height [get]
 Returns the height of the image in pixels. More...
 
abstract PixelFormat PixelFormat [get]
 Returns the pixel format. More...
 
abstract ImageType Type [get]
 Returns the image type. More...
 
abstract Accelerator Accelerator [get]
 Returns the accelerator or null if the image is not texture-based. More...
 

Member Function Documentation

◆ CopyTo()

abstract void RealNetworks.CameraKit.Image.CopyTo ( WriteableBitmap  bitmap)
pure virtual

Copies the image into a writable bitmap. Assumes that the bitmap was created with a Windows pixel format that is compatible to the image's pixel format.

Parameters
bitmapThe writable bitmap

◆ Create() [1/5]

static Image RealNetworks.CameraKit.Image.Create ( BitmapSource  bmp)
static

Creates an image from the given BitmapSource instance.

Parameters
bmpthe BitmapSource
Returns
the image

◆ Create() [2/5]

static Image RealNetworks.CameraKit.Image.Create ( int  width,
int  height,
PixelFormat  pixelFormat 
)
static

Creates a new bitmap backed image. This image type stores its pixels in main memory.

Parameters
widththe width in pixels
heightthe height in pixels
pixelFormatthe pixel format
Returns

◆ Create() [3/5]

static Image RealNetworks.CameraKit.Image.Create ( int  width,
int  height,
PixelFormat  pixelFormat,
Accelerator  accel 
)
static

Creates a new texture backed image. This image type stores its pixels in main memory.

Parameters
widththe width in pixels
heightthe height in pixels
pixelFormatthe pixel format
accelthe accelerator
Returns

◆ Create() [4/5]

static Image RealNetworks.CameraKit.Image.Create ( string  path)
static

Creates an image from the image file located at 'path'.

Parameters
paththe path to the image file
Returns
the image

◆ Create() [5/5]

static Image RealNetworks.CameraKit.Image.Create ( System.Drawing.Bitmap  image)
static

Creates an image from the given Windows bitmap.

Parameters
imagethe Windows bitmap
Returns
the image

◆ CreateBitmapSource()

abstract BitmapSource RealNetworks.CameraKit.Image.CreateBitmapSource ( )
pure virtual

Creates a new bitmap source which contains a copy of all the pixels of the receiver.

Returns
the bitmap source

◆ CreateBitmapSourceFromRegion()

abstract BitmapSource RealNetworks.CameraKit.Image.CreateBitmapSourceFromRegion ( Int32Rect  rect)
pure virtual

Creates a new bitmap source which contains a copy of the pixels in the 'rect' region from the receiver.

Parameters
rectthe region of pixels to copy
Returns
the bitmap source

◆ Dispose() [1/2]

void RealNetworks.CameraKit.Image.Dispose ( )

◆ Dispose() [2/2]

abstract void RealNetworks.CameraKit.Image.Dispose ( bool  fromIDisposable)
pure virtual

◆ Draw() [1/4]

abstract void RealNetworks.CameraKit.Image.Draw ( BitmapSource  source)
pure virtual

Copies the pixels from the given bitmap source into the image. Assumes that the bitmap source size and the image size are the same.

Parameters
sourceThe bitmap source

◆ Draw() [2/4]

abstract void RealNetworks.CameraKit.Image.Draw ( Image  image)
pure virtual

Draws the given image into the receiver. The source image is scaled such that it fits precisely inside the receiver.

Parameters
imagethe source image

◆ Draw() [3/4]

abstract void RealNetworks.CameraKit.Image.Draw ( Image  image,
bool  hflip 
)
pure virtual

Draws the given image into the receiver. The source image is scaled such that it fits precisely inside the receiver. The source image is also optionally flipped horizontally.

Parameters
imagethe source image
hfliptrue if the image should be flipped; false otherwise

◆ Draw() [4/4]

abstract void RealNetworks.CameraKit.Image.Draw ( Image  image,
Int32Rect  dstRect 
)
pure virtual

Draws the given image into the receiver. The source image is scaled and positioned such that it fits inside the 'dstRect'.

Parameters
imagethe source image
dstRectthe rectangle into which to draw the source image

◆ DrawRect()

abstract void RealNetworks.CameraKit.Image.DrawRect ( Image  image,
Int32Rect  srcRect 
)
pure virtual

Copies the given rectangle from the source image into the receiver.

Parameters
imagethe source image
srcRectthe source rectangle

Property Documentation

◆ Accelerator

abstract Accelerator RealNetworks.CameraKit.Image.Accelerator
get

Returns the accelerator or null if the image is not texture-based.

◆ Height

abstract int RealNetworks.CameraKit.Image.Height
get

Returns the height of the image in pixels.

◆ PixelFormat

abstract PixelFormat RealNetworks.CameraKit.Image.PixelFormat
get

Returns the pixel format.

◆ Type

abstract ImageType RealNetworks.CameraKit.Image.Type
get

Returns the image type.

◆ Width

abstract int RealNetworks.CameraKit.Image.Width
get

Returns the width of the image in pixels.