From 0720da91d8cd4f9e77ca91048dfc7acb50e458c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Wed, 13 Sep 2017 21:40:15 -0700 Subject: [PATCH] Fixed preserving color channels when scaling image with alpha channel. --- src/image_encode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/image_encode.cpp b/src/image_encode.cpp index 5601f6e..4109840 100644 --- a/src/image_encode.cpp +++ b/src/image_encode.cpp @@ -341,7 +341,7 @@ namespace bimg (const float*)srcData, _src->m_width, _src->m_height, _src->m_width*16 , ( float*)dstData, _dst->m_width, _dst->m_height, _dst->m_width*16 , 4, 3 - , 0 + , STBIR_FLAG_ALPHA_PREMULTIPLIED , STBIR_EDGE_CLAMP , STBIR_FILTER_DEFAULT , STBIR_COLORSPACE_LINEAR