pub struct LockedBitmap {
pub lock_info: BitmapLockInfo,
/* private fields */
}Expand description
Locked version of bitmap so that the data can be accessed
Fields§
§lock_info: BitmapLockInfoImplementations§
Source§impl LockedBitmap
impl LockedBitmap
Sourcepub fn unlock(self) -> Result<Bitmap, Error>
pub fn unlock(self) -> Result<Bitmap, Error>
Unlock the bitmap object. Once the bitmap is unlocked, the pixel data must not be accessed anymore.
\param bitmap_object The bitmap object.
\returns An error-code indicating success or failure of the operation.
Sourcepub fn copy(
&self,
width: u32,
height: u32,
pixel_type: PixelType,
stride: u32,
) -> Result<Bitmap, Error>
pub fn copy( &self, width: u32, height: u32, pixel_type: PixelType, stride: u32, ) -> Result<Bitmap, Error>
Copy the pixel data from the specified bitmap object to the specified memory buffer. The specified destination bitmap must have same width, height and pixel type as the source bitmap.
\param bitmap_object The bitmap object. \param width The width of the destination bitmap. \param height The height of the destination bitmap. \param pixel_type The pixel type. \param stride The stride (given in bytes). \param [out] ptr Pointer to the memory location where the bitmap is to be copied to.
\returns A LibCZIApiErrorCode.
Methods from Deref<Target = Bitmap>§
Sourcepub fn get_info(&self) -> Result<BitmapInfo, Error>
pub fn get_info(&self) -> Result<BitmapInfo, Error>
Get information about the specified bitmap object.
\param bitmap_object The bitmap object. \param [out] bitmap_info If successful, information about the bitmap object is put here.
\returns An error-code indicating success or failure of the operation.