• Seven Du's avatar
    FS-7500: libpng 1.6.0 has much simpler APIs, also add a new switch_img_patch_png… · e02ff265
    Seven Du 提交于
    FS-7500: libpng 1.6.0 has much simpler APIs, also add a new switch_img_patch_png to possible patch a transparent png to an img
    
    While this is not optimal, we should cache the png:
    1) cache the whole buffer, with comes with RGBARGBA pixel formats
    2) Allow switch_image_t to be other formats e.g. VPX_IMG_FMT_ARGB, VPX_IMG_FMT_ARGB_LE, or VPX_IMG_FMT_444A
       those can have alpha channels so we can check the alpha channel before we patch
    
    Note all PNG are created equel, or maybe a bug in libpng since for some PNG files with alpha the returned buffer
         not seems like RGBARGBA... while docs says it should default be RGBA
    e02ff265
switch_core_video.h 8.6 KB