Image Info
Describes pixel dimensions and encoding. Bitmap, Image, Pixmap, and Surface can be created from ImageInfo. ImageInfo can be retrieved from Bitmap and Pixmap, but not from Image and Surface. For example, Image and Surface implementations may defer pixel depth, so may not completely specify ImageInfo.
ImageInfo contains dimensions, the pixel integral width and height. It encodes how pixel bits describe alpha, transparency; color components red, blue, and green; and ColorSpace, the range and linearity of colors.
Constructors
Properties
Returns number of bytes per pixel required by ColorType. Returns zero if .getColorType is ColorType.UNKNOWN.
Returns minimum bytes per row, computed from pixel getWidth() and ColorType, which specifies getBytesPerPixel(). Bitmap maximum value for row bytes must fit in 31 bits.
Returns bit shift converting row bytes to row pixels. Returns zero for ColorType.UNKNOWN.
Functions
Returns storage required by pixel array, given ImageInfo dimensions, ColorType, and rowBytes. rowBytes is assumed to be at least as large as .getMinRowBytes.
Returns storage required by pixel array, given ImageInfo dimensions, and ColorType. Uses .getMinRowBytes to compute bytes for pixel row.
Returns byte offset of pixel from pixel base address.
Returns true if rowBytes is valid for this ImageInfo.