An image mapper allows you to efficiently gain read-only access to the pixels of an image. It works with bitmap and texture backed images. More...
Public Member Functions | |
delegate void | Callback (ImageMapping mapping) |
Image mapping callback. This callback is invoked with the mapped image pixels. More... | |
ImageMapper () | |
Creates an image mapper instance. More... | |
void | Dispose () |
void | Dispose (bool fromIDisposable) |
void | CopyTo (Image image, WriteableBitmap bitmap) |
Copies the pixel from the given image into the given writable bitmap. More... | |
void | CopyFrom (byte[] pixels, int width, int height, int bytesPerRow, PixelFormat pixelFormat, Image image) |
Copies pixels from the given byte array into an image. The image and the pixels in the byte array must have the same width and height. More... | |
void | CopyFrom (IntPtr pixels, int width, int height, int bytesPerRow, PixelFormat pixelFormat, Image image) |
Copies pixels from the given IntPtr into an image. The image and the pixels in the byte array must have the same width and height. More... | |
void | Map (Image image, ImageAccess mode, Callback callback) |
Makes the pixels of the given image available to the given closure. This function takes care of downloading / upload the image pixels if the image is backed by a texture. More... | |
void | Map (Image image, ImageMapping.Target target, ImageAccess mode, Callback callback) |
Same as plain Map() but allows you to map to either a CPU-based bitmap or a CUDA-based unified memory texture. More... | |
An image mapper allows you to efficiently gain read-only access to the pixels of an image. It works with bitmap and texture backed images.
RealNetworks.CameraKit.ImageMapper.ImageMapper | ( | ) |
Creates an image mapper instance.
delegate void RealNetworks.CameraKit.ImageMapper.Callback | ( | ImageMapping | mapping | ) |
Image mapping callback. This callback is invoked with the mapped image pixels.
mapping | information about the mapped image pixels |
void RealNetworks.CameraKit.ImageMapper.CopyFrom | ( | byte[] | pixels, |
int | width, | ||
int | height, | ||
int | bytesPerRow, | ||
PixelFormat | pixelFormat, | ||
Image | image | ||
) |
Copies pixels from the given byte array into an image. The image and the pixels in the byte array must have the same width and height.
pixels | byte array with the pixels |
width | width of a row |
height | height of the bitmap |
bytesPerRow | bytes per row |
pixelFormat | the pixel format |
image | the image |
void RealNetworks.CameraKit.ImageMapper.CopyFrom | ( | IntPtr | pixels, |
int | width, | ||
int | height, | ||
int | bytesPerRow, | ||
PixelFormat | pixelFormat, | ||
Image | image | ||
) |
Copies pixels from the given IntPtr into an image. The image and the pixels in the byte array must have the same width and height.
pixels | IntPtr pointing to the pixels |
width | width of a row |
height | height of the bitmap |
bytesPerRow | bytes per row |
pixelFormat | the pixel format |
image | the image |
void RealNetworks.CameraKit.ImageMapper.CopyTo | ( | Image | image, |
WriteableBitmap | bitmap | ||
) |
Copies the pixel from the given image into the given writable bitmap.
image | the image |
bitmap | the bitmap |
void RealNetworks.CameraKit.ImageMapper.Dispose | ( | ) |
void RealNetworks.CameraKit.ImageMapper.Dispose | ( | bool | fromIDisposable | ) |
void RealNetworks.CameraKit.ImageMapper.Map | ( | Image | image, |
ImageAccess | mode, | ||
Callback | callback | ||
) |
Makes the pixels of the given image available to the given closure. This function takes care of downloading / upload the image pixels if the image is backed by a texture.
image | the image |
mode | the CPU access mode |
callback | the closure that receives the image mapping |
void RealNetworks.CameraKit.ImageMapper.Map | ( | Image | image, |
ImageMapping.Target | target, | ||
ImageAccess | mode, | ||
Callback | callback | ||
) |
Same as plain Map() but allows you to map to either a CPU-based bitmap or a CUDA-based unified memory texture.
image | the image |
target | specifies whether to map to a CPU bitmap or a CUDA texture |
mode | the CPU access mode |
callback | the closure that receives the image mapping |