Bitmap
| Category | refcounted |
| Type | hime_bitmap_t |
| Inherits | Object |
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_tClass 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
const unsigned char*inputsize_tinput_size - Size of input.
Return
hime_bitmap_thime_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
const unsigned char*inputsize_tinput_size - Size of input.
Return
hime_bitmap_tMethods
bool hime_bitmap_is_empty(self)
Return true if either width or height is zero, or the bitmap contains no pixels.
Parameters
hime_bitmap_const_tself
Return
boolhime_size_t hime_bitmap_get_size(self)
Return the pixel counts of row and column.
Parameters
hime_bitmap_const_tself
Return
hime_size_thime_color_t hime_bitmap_get_color(self, position)
Return the pixel at position as unpremultiplied color.
Parameters
hime_bitmap_const_tselfhime_point_tposition
Return
hime_color_t