mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 21:28:22 +01:00
Correct a bug in ReadPNG() with GRAY_ALPHA images
Change-Id: I4676160ee544ed914cc0de3f9cd140d9ee65addc
This commit is contained in:
parent
469d6eb974
commit
372e2b463b
@ -382,7 +382,8 @@ static int ReadPNG(FILE* in_file, WebPPicture* const pic, int keep_alpha) {
|
||||
png_set_strip_16(png);
|
||||
png_set_packing(png);
|
||||
if (color_type == PNG_COLOR_TYPE_PALETTE) png_set_palette_to_rgb(png);
|
||||
if (color_type == PNG_COLOR_TYPE_GRAY) {
|
||||
if (color_type == PNG_COLOR_TYPE_GRAY ||
|
||||
color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
|
||||
if (bit_depth < 8) {
|
||||
png_set_expand_gray_1_2_4_to_8(png);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user