aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/image.c b/src/image.c
index 879bbf745a3..cbdff81eba7 100644
--- a/src/image.c
+++ b/src/image.c
@@ -194,7 +194,7 @@ XPutPixel (ximage, x, y, pixel)
194 char *base_addr = GetPixBaseAddr (pixmap); 194 char *base_addr = GetPixBaseAddr (pixmap);
195 short row_bytes = GetPixRowBytes (pixmap); 195 short row_bytes = GetPixRowBytes (pixmap);
196 196
197 ((unsigned long *) (base_addr + y * row_bytes))[x] = pixel; 197 ((unsigned long *) (base_addr + y * row_bytes))[x] = 0xff000000 | pixel;
198 } 198 }
199 else if (depth == 1) 199 else if (depth == 1)
200 { 200 {
@@ -238,7 +238,7 @@ XGetPixel (ximage, x, y)
238 char *base_addr = GetPixBaseAddr (pixmap); 238 char *base_addr = GetPixBaseAddr (pixmap);
239 short row_bytes = GetPixRowBytes (pixmap); 239 short row_bytes = GetPixRowBytes (pixmap);
240 240
241 return ((unsigned long *) (base_addr + y * row_bytes))[x]; 241 return ((unsigned long *) (base_addr + y * row_bytes))[x] & 0x00ffffff;
242 } 242 }
243 else if (depth == 1) 243 else if (depth == 1)
244 { 244 {