pub struct ImageData {
    pub frame: *mut IWICBitmapSource,
}
Expand description

Represents a source of pixel that can be read, but cannot be written back to.

Fields

frame: *mut IWICBitmapSource

Implementations

Retrieves the sampling rate between pixels and physical world measurements.

Retrieves the pixel width and height of the bitmap.

Copy the frame pixels into a buffer.

Parameters: pixel_size: defines the size of a pixel in bytes. In a typical RGBA image, this would be 4 (1 byte for each component). If unsure, use the pixel_format.

May return an error if the pixel data could not be read

Copy a region of the frames pixel into a buffer.

Parameters: offset: The [x,y] offset at which the region begins size: The [width, height] size of the region pixel_size: defines the size of a pixel in bytes. In a typical RGBA image, this would be 4 (1 byte for each component). If unsure, use the pixel_format.

May return an error if the pixel data could not be read

Create a bitmap resource the the image data. This resource can then be used in the other NWG component. The bitmap returned is considered “owned”.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.