diff options
Diffstat (limited to 'drivers/png/image_loader_png.cpp')
| -rw-r--r-- | drivers/png/image_loader_png.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp index 2a4720b07b..50b26d601a 100644 --- a/drivers/png/image_loader_png.cpp +++ b/drivers/png/image_loader_png.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -124,6 +124,13 @@ Error ImageLoaderPNG::_load_image(void *rf_up,png_rw_ptr p_func,Image *p_image) png_read_update_info(png, info); } + if (png_get_valid(png,info,PNG_INFO_tRNS)) { +// png_set_expand_gray_1_2_4_to_8(png); + png_set_tRNS_to_alpha(png); + png_read_update_info(png, info); + png_get_IHDR(png, info, &width, &height, &depth, &color, NULL, NULL, NULL); + } + int palette_colors = 0; int palette_components = 0; int components = 0; |