Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

Commit

Permalink
Fix default alpha value in 8888 conversion
Browse files Browse the repository at this point in the history
Other conversion functions write zero to the alpha channel. The 8888
conversion was producing totally transparent PNGs.
  • Loading branch information
causal-agent committed Apr 30, 2017
1 parent 96ac0f4 commit 60c9793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fbgrab.c
Expand Up @@ -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';
}
}

Expand Down

0 comments on commit 60c9793

Please sign in to comment.