From 8b1dcbfe4d92f9d7273bbd2f1eb805e5c508961a Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 12 Mar 2016 10:44:12 -0300 Subject: -Made editor support SSL certs by default (embedded them) -Made asset sharing support https -Many fixes to HTTPRequest -Added an asset installer dialog -Visual cleanups to asset sharing tab -Fixed some issues in ScrollContainer, hope it does not break things -Asset sharing tab is not visible (hidden on purpose) for now. --- core/image.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'core/image.cpp') diff --git a/core/image.cpp b/core/image.cpp index 184ab70dc..52946bbb8 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -2214,6 +2214,8 @@ void Image::blit_rect(const Image& p_src, const Rect2& p_src_rect,const Point2& Image (*Image::_png_mem_loader_func)(const uint8_t*,int)=NULL; +Image (*Image::_jpg_mem_loader_func)(const uint8_t*,int)=NULL; + void (*Image::_image_compress_bc_func)(Image *)=NULL; void (*Image::_image_compress_pvrtc2_func)(Image *)=NULL; void (*Image::_image_compress_pvrtc4_func)(Image *)=NULL; @@ -2388,7 +2390,7 @@ String Image::get_format_name(Format p_format) { return format_names[p_format]; } -Image::Image(const uint8_t* p_png,int p_len) { +Image::Image(const uint8_t* p_mem_png_jpg, int p_len) { width=0; height=0; @@ -2396,8 +2398,13 @@ Image::Image(const uint8_t* p_png,int p_len) { format=FORMAT_GRAYSCALE; if (_png_mem_loader_func) { - *this = _png_mem_loader_func(p_png,p_len); + *this = _png_mem_loader_func(p_mem_png_jpg,p_len); + } + + if (empty() && _jpg_mem_loader_func) { + *this = _jpg_mem_loader_func(p_mem_png_jpg,p_len); } + } Image::Image() { -- cgit v1.2.3-70-g09d2