From a517f9178a2bb79f7bd340d7f9bfff430e25bfa6 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Tue, 30 Jun 2020 18:38:26 +0300 Subject: [PATCH] Fix png files not being recognized when being exported from the HTML5 build --- src/Autoload/HTML5FileExchange.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Autoload/HTML5FileExchange.gd b/src/Autoload/HTML5FileExchange.gd index 9027be7ef..0328ed40d 100644 --- a/src/Autoload/HTML5FileExchange.gd +++ b/src/Autoload/HTML5FileExchange.gd @@ -101,5 +101,5 @@ func save_image(image : Image, file_name : String = "export") -> void: if OS.get_name() != "HTML5" or !OS.has_feature('JavaScript'): return - var png_data = Array(image.get_data()) + var png_data = Array(image.save_png_to_buffer()) JavaScript.eval("download('%s', %s, 'image/png');" % [file_name, str(png_data)], true)