Bitmap

Categoryrefcounted
Typehime_bitmap_t
InheritsObject

A ref-counted wrapper of SkBitmap.

SkBitmap describes a two-dimensional raster pixel array. SkBitmap is built on SkImageInfo, containing integer width and height, SkColorType and SkAlphaType describing the pixel format, and SkColorSpace describing the range of colors. SkBitmap points to SkPixelRef, which describes the physical array of pixels. SkImageInfo bounds may be located anywhere fully inside SkPixelRef bounds.

Constructors

hime_bitmap_t hime_bitmap_create_empty()

Create an empty bitmap.

Return

hime_bitmap_t

Class methods

hime_bitmap_t hime_bitmap_create_from_jpeg(input, input_size)

Decode the JPEG data contained in input of length input_size.

NULL is returned if decoding fails.

Parameters

Return

hime_bitmap_t

hime_bitmap_t hime_bitmap_create_from_png(input, input_size)

Decode the JPEG data contained in input of length input_size.

NULL is returned if decoding fails.

Parameters

Return

hime_bitmap_t

Methods

bool hime_bitmap_is_empty(self)

Return true if either width or height is zero, or the bitmap contains no pixels.

Parameters

Return

bool

hime_size_t hime_bitmap_get_size(self)

Return the pixel counts of row and column.

Parameters

Return

hime_size_t

hime_color_t hime_bitmap_get_color(self, position)

Return the pixel at position as unpremultiplied color.

Parameters

Return

hime_color_t