From 7748021cc09a52fbb12fc33d7e84806890394249 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 29 Jun 2010 21:56:34 +0200 Subject: Move over to RGBA instead of ARGB. Add missing gray-alpha 'duff' functions. --- apps/win_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apps/win_main.c') diff --git a/apps/win_main.c b/apps/win_main.c index e4c78983..ae12c673 100644 --- a/apps/win_main.c +++ b/apps/win_main.c @@ -396,9 +396,9 @@ void winconvert(fz_pixmap *image) unsigned char *s = image->samples + y * image->w * 4; for (x = 0; x < image->w; x++) { - p[x * 3 + 0] = s[x * 4 + 3]; - p[x * 3 + 1] = s[x * 4 + 2]; - p[x * 3 + 2] = s[x * 4 + 1]; + p[x * 3 + 0] = s[x * 4 + 2]; + p[x * 3 + 1] = s[x * 4 + 1]; + p[x * 3 + 2] = s[x * 4 + 0]; } } } @@ -410,9 +410,9 @@ void winconvert(fz_pixmap *image) unsigned char *s = image->samples + y * image->w * 2; for (x = 0; x < image->w; x++) { - p[x * 3 + 0] = s[x * 2 + 1]; - p[x * 3 + 1] = s[x * 2 + 1]; - p[x * 3 + 2] = s[x * 2 + 1]; + p[x * 3 + 0] = s[x * 2]; + p[x * 3 + 1] = s[x * 2]; + p[x * 3 + 2] = s[x * 2]; } } } -- cgit v1.2.3