浏览代码

update of alpha channel

Jérôme BUISINE 4 年之前
父节点
当前提交
ff22778553
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      rawls/rawls.cpp

+ 3 - 0
rawls/rawls.cpp

@@ -100,6 +100,9 @@ bool rawls::saveAsPNG(unsigned width, unsigned height, unsigned nbChanels, float
                 float value = buffer[nbChanels * width * y + nbChanels * x + j];
                 image[nbChanelsAlpha * width * y + nbChanelsAlpha * x + j] = int(GammaConvert(value)); 
             } 
+
+            // alpha channel
+            image[nbChanelsAlpha * width * y + nbChanelsAlpha * x + 3] = 255; 
         }
     }