Skip to content
Permalink
Browse files

Incorrect alpha value when converting 32-bit framebuffers.

  • Loading branch information
Gunnar Monell
Gunnar Monell committed Feb 13, 2020
1 parent 131bdbb commit 833ab5786ac36daa672ff3bb174553e8cd55775b
Showing with 4 additions and 4 deletions.
  1. +3 −3 fbgrab.1.man
  2. +1 −1 fbgrab.c
@@ -1,4 +1,4 @@
.TH fbgrab 1 "(C) 2002 - 2013 Gunnar Monell, GPL"
.TH fbgrab 1 "(C) 2002 - 2020 Gunnar Monell, GPL"
.SH NAME
\fBfbgrab\fP - takes screenshots using the framebuffer device
.SH SYNOPSIS
@@ -79,12 +79,12 @@ fbgrab -w 1024 -h 768 -b 16 -f framebuffer.dump fb.png
to convert it to a picture.

.SH AUTHOR
Written by Gunnar Monell <gmo@linux.nu>.
Written by Gunnar Monell <gunnar.monell@gmail.com>.
Basically a rewrite of fbshot by Stephan Beyer <fbshot@s-beyer.de>

.SH COPYRIGHT (C)
.P
(C) 2002-2013 Gunnar Monell <gmo@linux.nu>
(C) 2002-2020 Gunnar Monell <gunnar.monell@gmail.com>
.P
(C) 2000 Stephan Beyer <fbshot@s-beyer.de>
.P
@@ -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 833ab57

Please sign in to comment.
You can’t perform that action at this time.