/* Check if a color format has alpha channel or not  */
bool lv_img_color_format_has_alpha(lv_img_cf_t cf)
/* Check if a color format has alpha channel or not  */
bool lv_img_color_format_has_alpha(lv_img_cf_t cf)
{
    bool has_alpha = false;
    switch(cf) {
        case LV_IMG_CF_TRUE_COLOR_ALPHA:
        case LV_IMG_CF_RAW_ALPHA:
        case LV_IMG_CF_ALPHA_1BIT:
        case LV_IMG_CF_ALPHA_2BIT:
        case LV_IMG_CF_ALPHA_4BIT:
        case LV_IMG_CF_ALPHA_8BIT: has_alpha = true; break;
        default: has_alpha = false; break;
    }
    return has_alpha;
}