mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
ncpixel_b/ncpixel_g: fix for RGBA
This commit is contained in:
parent
f9b4993b07
commit
515aa881cc
@ -2422,13 +2422,13 @@ ncpixel_r(uint32_t pixel){
|
||||
// Extract the 8-bit green component from a pixel
|
||||
static inline unsigned
|
||||
ncpixel_g(uint32_t pixel){
|
||||
return (pixel & 0x00ff0000ul) >> 16u;
|
||||
return (pixel & 0x0000ff00ul) >> 8u;
|
||||
}
|
||||
|
||||
// Extract the 8-bit blue component from a pixel
|
||||
static inline unsigned
|
||||
ncpixel_b(uint32_t pixel){
|
||||
return (pixel & 0x0000ff00ul) >> 8u;
|
||||
return (pixel & 0x00ff0000ul) >> 16u;
|
||||
}
|
||||
|
||||
// Set the 8-bit alpha component of a pixel
|
||||
|
Loading…
Reference in New Issue
Block a user