Permalink
Browse files

Fix default alpha value in 8888 conversion

Other conversion functions write zero to the alpha channel. The 8888
conversion was producing totally transparent PNGs.
  • Loading branch information...
programble committed Apr 30, 2017
1 parent 96ac0f4 commit 60c979319cdcfedafee1922c91d52f2d9e95db1e
Showing with 1 addition and 1 deletion.
  1. +1 −1 fbgrab.c
@@ -279,7 +279,7 @@ static void convert8888to32(int width, int height,
/* RED = 2 */
outbuffer[(i<<2)+Red] = inbuffer[i*4+srcRed];
/* ALPHA */
outbuffer[(i<<2)+Alpha] = srcAlpha >= 0 ? inbuffer[i*4+srcAlpha] : 0xff;
outbuffer[(i<<2)+Alpha] = srcAlpha >= 0 ? inbuffer[i*4+srcAlpha] : '\0';
}
}

0 comments on commit 60c9793

Please sign in to comment.