Merge pull request #7015 from sgotti/imageio_fix_png_with_transparency
imageio: fix issues/crash on png with transparency
This commit is contained in:
commit
9e42a67f58
@ -285,6 +285,7 @@ int ImageIO::loadPNG (const Glib::ustring &fname)
|
|||||||
|
|
||||||
if (png_get_valid(png, info, PNG_INFO_tRNS)) {
|
if (png_get_valid(png, info, PNG_INFO_tRNS)) {
|
||||||
png_set_tRNS_to_alpha(png);
|
png_set_tRNS_to_alpha(png);
|
||||||
|
png_set_strip_alpha(png);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (color_type & PNG_COLOR_MASK_ALPHA) {
|
if (color_type & PNG_COLOR_MASK_ALPHA) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user