fix whitespace.
This commit is contained in:
parent
23ce5c0cdd
commit
f512b97708
1 changed files with 6 additions and 6 deletions
|
|
@ -250,14 +250,14 @@ char *XGetScreenshot(int *w, int *h) {
|
||||||
*h = height;
|
*h = height;
|
||||||
char *pixels = (char *)malloc(width * height * 3);
|
char *pixels = (char *)malloc(width * height * 3);
|
||||||
|
|
||||||
for (int row = 0; row < height; row++) {
|
for (int row = 0; row < height; row++) {
|
||||||
for (int col = 0; col < width; col++) {
|
for (int col = 0; col < width; col++) {
|
||||||
int pos = ((row * width) + col) * 3;
|
int pos = ((row * width) + col) * 3;
|
||||||
unsigned long pixel = XGetPixel(ximage, col, row);
|
unsigned long pixel = XGetPixel(ximage, col, row);
|
||||||
|
|
||||||
pixels[pos] = (pixel & ximage->red_mask) >> 16;
|
pixels[pos] = (pixel & ximage->red_mask) >> 16;
|
||||||
pixels[pos+1] = (pixel & ximage->green_mask) >> 8;
|
pixels[pos+1] = (pixel & ximage->green_mask) >> 8;
|
||||||
pixels[pos+2] = pixel & ximage->blue_mask;
|
pixels[pos+2] = pixel & ximage->blue_mask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue