Explorar el Código

update of alpha channel

Jérôme BUISINE hace 4 años
padre
commit
ff22778553
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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; 
         }
     }