Function vizia::vg::image::images::raster_from_bitmap
pub fn raster_from_bitmap(
bitmap: &Handle<SkBitmap>,
) -> Option<RCHandle<SkImage>>
Expand description
Creates a CPU-backed Image
from bitmap
, sharing or copying bitmap
pixels. If the bitmap
is marked immutable, and its pixel memory is shareable, it may be shared
instead of copied.
Image
is returned if bitmap is valid. Valid Bitmap
parameters include:
dimensions are greater than zero;
each dimension fits in 29 bits;
ColorType
and AlphaType
are valid, and ColorType
is not ColorType::Unknown
;
row bytes are large enough to hold one row of pixels;
pixel address is not None
.