1 parent ed30c5a commit 4ce8db2Copy full SHA for 4ce8db2
1 file changed
src/Processing.cpp
@@ -2529,7 +2529,10 @@ float PApplet::textDescent() {
2529
2530
PImage* PApplet::createImage(int w,int h,int mode){
2531
PImage* img = new PImage(w,h);
2532
- if(mode==3/*ARGB*/) {
+ img->format = mode;
2533
+ if(mode==ARGB) {
2534
+ ::std::fill(img->pixels.begin(),img->pixels.end(),0x00000000);
2535
+ } else if(mode==ALPHA) {
2536
::std::fill(img->pixels.begin(),img->pixels.end(),0x00000000);
2537
}
2538
img->dirty=true;
0 commit comments