Home » Developing U++ » UppHub » Bug: SysInfo->ScreenGrab->Window_SaveCapture on X11 does not set the alpha channel
Bug: SysInfo->ScreenGrab->Window_SaveCapture on X11 does not set the alpha channel [message #52445] |
Wed, 02 October 2019 07:55 |
jjacksonRIAB
Messages: 220 Registered: June 2011
|
Experienced Member |
|
|
for (int y = 0; y < height; y++) {
RGBA *row = ib[y];
for (int x = 0; x < width ; x++) {
unsigned long pixel = XGetPixel(image, x, y);
unsigned char blue = pixel & blue_mask;
unsigned char green = (pixel & green_mask) >> 8;
unsigned char red = (pixel & red_mask) >> 16;
(row + x)->r = red;
(row + x)->g = green;
(row + x)->b = blue;
+--> (row + x)->a = 0xff;
}
}
|
|
|
|
Goto Forum:
Current Time: Sat May 04 13:18:35 CEST 2024
Total time taken to generate the page: 0.02880 seconds
|