makeFromBitmap

Creates 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 nullptr.

Return

created Image

Parameters

bitmap

ImageInfo, row bytes, and pixels

See also