Fix also the other place where maskstride was calculated.

This commit is contained in:
Tor Lillqvist 2005-11-07 12:05:43 +00:00
parent 449f16b238
commit 90942c4fef

View File

@ -683,11 +683,7 @@ pixbuf_to_hbitmaps_alpha_winxp (GdkPixbuf *pixbuf,
}
/* MSDN says mask rows are aligned to "LONG" boundaries */
maskstride = width / 8;
if (maskstride % 4 != 0)
maskstride += 4 - (maskstride % 4);
if (maskstride < 4) /* one word minimum */
maskstride = 4;
maskstride = (((width + 31) & ~31) >> 3);
indata = gdk_pixbuf_get_pixels (pixbuf);
rowstride = gdk_pixbuf_get_rowstride (pixbuf);