summaryrefslogtreecommitdiff
path: root/tools/editor/icons/SCsub
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-07-18 18:30:30 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-07-18 18:30:30 -0300
commit7a4d67ae7129ee92feebea3d5f7b46d456d29f88 (patch)
tree9d057903f818c82221474e754321a2ae14a20fd5 /tools/editor/icons/SCsub
parent587826f879a1cf7a6ac578ae5cf5af160782d74f (diff)
Property convert images to RGBA before applying hq2x, fixes #5168
Diffstat (limited to 'tools/editor/icons/SCsub')
-rw-r--r--tools/editor/icons/SCsub2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/editor/icons/SCsub b/tools/editor/icons/SCsub
index 7132968c88..f2f5dcca48 100644
--- a/tools/editor/icons/SCsub
+++ b/tools/editor/icons/SCsub
@@ -65,7 +65,7 @@ def make_editor_icons_action(target, source, env):
s.write("static Ref<ImageTexture> make_icon(const uint8_t* p_png,const uint8_t* p_hidpi_png) {\n")
s.write("\tRef<ImageTexture> texture( memnew( ImageTexture ) );\n")
s.write("\tImage img((editor_is_hidpi()&&p_hidpi_png)?p_hidpi_png:p_png);\n")
- s.write("\tif (editor_is_hidpi() && !p_hidpi_png) img.expand_x2_hq2x();\n")
+ s.write("\tif (editor_is_hidpi() && !p_hidpi_png) { img.convert(Image::FORMAT_RGBA); img.expand_x2_hq2x(); }\n")
s.write("\ttexture->create_from_image( img,ImageTexture::FLAG_FILTER );\n")
s.write("\treturn texture;\n")
s.write("}\n\n")