Browse files

2008-10-30 Sebastien Pouliot <sebastien@ximian.com>

	* region-bitmap.c (reduce): Fix skipping a color channel while
	reducing the bitmap to 1bpp (provided by David Binderman)
	[Fix bug #440127]


svn path=/trunk/libgdiplus/; revision=117493
  • Loading branch information...
1 parent 58cd46e commit bc6d90a4f5e42cad4fc44dcac065f9ae730872d9 Sebastien Pouliot committed Oct 30, 2008
Showing with 7 additions and 1 deletion.
  1. +6 −0 src/ChangeLog
  2. +1 −1 src/region-bitmap.c
View
6 src/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-30 Sebastien Pouliot <sebastien@ximian.com>
+
+ * region-bitmap.c (reduce): Fix skipping a color channel while
+ reducing the bitmap to 1bpp (provided by David Binderman)
+ [Fix bug #440127]
+
2008-09-03 Sebastien Pouliot <sebastien@ximian.com>
* general.c: Compute intermediate start/end points correctly on an
View
2 src/region-bitmap.c
@@ -356,7 +356,7 @@ reduce (BYTE* source, int width, int height, BYTE *dest)
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
int pos = (i * width + j) * 4;
- BYTE combine = source [pos++] | source [pos++] | source [pos++] | source [pos];
+ BYTE combine = source [pos] | source [pos + 1] | source [pos + 2] | source [pos + 3];
if (combine != 0)
value |= 128;

0 comments on commit bc6d90a

Please sign in to comment.