[][src]Function lvgl::widgets::img::buf_alloc

pub fn buf_alloc(
    w: lv_coord_t,
    h: lv_coord_t,
    cf: lv_img_cf_t
) -> MynewtResult<*mut lv_img_dsc_t>

Allocate an image buffer in RAM

  • w: width of image
  • h: height of image
  • cf: a color format (LV_IMG_CF_...) Return: an allocated image, or NULL on failure