Have wuffs_aux SelectPixfmt default to BGRA_PREMUL

This commit is contained in:
Nigel Tao committed 2021-03-29 22:06:39 +11:00
1 parent decb64e5ea
commit 57ad55355b
5 files changed
+28 -19

No files matched your search

+1 -2
View File
@@ -88,8 +88,7 @@ DecodeImageCallbacks::SelectDecoder(uint32_t fourcc,
wuffs_base__pixel_format //
DecodeImageCallbacks::SelectPixfmt(
const wuffs_base__image_config& image_config) {
return wuffs_base__make_pixel_format(
WUFFS_BASE__PIXEL_FORMAT__BGRA_NONPREMUL);
return wuffs_base__make_pixel_format(WUFFS_BASE__PIXEL_FORMAT__BGRA_PREMUL);
}
DecodeImageCallbacks::AllocResult //
+2 -2
View File
@@ -96,8 +96,8 @@ class DecodeImageCallbacks {
// Returning otherwise means failure (DecodeImage_UnsupportedPixelFormat).
//
// The default SelectPixfmt implementation returns
// wuffs_base__make_pixel_format(WUFFS_BASE__PIXEL_FORMAT__BGRA_NONPREMUL)
// which is 4 bytes per pixel (8 bits per channel × 4 channels).
// wuffs_base__make_pixel_format(WUFFS_BASE__PIXEL_FORMAT__BGRA_PREMUL) which
// is 4 bytes per pixel (8 bits per channel × 4 channels).
virtual wuffs_base__pixel_format //
SelectPixfmt(const wuffs_base__image_config& image_config);