Explorar o código

Fixed preserving color channels when scaling image with alpha channel.

Branimir Karadžić %!s(int64=8) %!d(string=hai) anos
pai
achega
0720da91d8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/image_encode.cpp

+ 1 - 1
src/image_encode.cpp

@@ -341,7 +341,7 @@ namespace bimg
 				  (const float*)srcData, _src->m_width, _src->m_height, _src->m_width*16
 				  (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
 				, (      float*)dstData, _dst->m_width, _dst->m_height, _dst->m_width*16
 				, 4, 3
 				, 4, 3
-				, 0
+				, STBIR_FLAG_ALPHA_PREMULTIPLIED
 				, STBIR_EDGE_CLAMP
 				, STBIR_EDGE_CLAMP
 				, STBIR_FILTER_DEFAULT
 				, STBIR_FILTER_DEFAULT
 				, STBIR_COLORSPACE_LINEAR
 				, STBIR_COLORSPACE_LINEAR