[gimp] file-bmp: Change order of bytes (and the masks correspondingly) to please Firefox
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] file-bmp: Change order of bytes (and the masks correspondingly) to please Firefox
- Date: Mon, 8 Oct 2012 03:43:40 +0000 (UTC)
commit 9818c4706adc2a327fcf65dd0617d742e398b67a
Author: Mukund Sivaraman <muks banu com>
Date: Fri Sep 21 20:27:42 2012 +0530
file-bmp: Change order of bytes (and the masks correspondingly) to please Firefox
plug-ins/file-bmp/bmp-write.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/plug-ins/file-bmp/bmp-write.c b/plug-ins/file-bmp/bmp-write.c
index f228699..81898e3 100644
--- a/plug-ins/file-bmp/bmp-write.c
+++ b/plug-ins/file-bmp/bmp-write.c
@@ -456,17 +456,17 @@ WriteBMP (const gchar *filename,
default:
case RGB_888:
case RGBX_8888:
- Mask[0] = 0xff000000;
- Mask[1] = 0x00ff0000;
- Mask[2] = 0x0000ff00;
+ Mask[0] = 0x00ff0000;
+ Mask[1] = 0x0000ff00;
+ Mask[2] = 0x000000ff;
Mask[3] = 0x00000000;
break;
case RGBA_8888:
- Mask[0] = 0xff000000;
- Mask[1] = 0x00ff0000;
- Mask[2] = 0x0000ff00;
- Mask[3] = 0x000000ff;
+ Mask[0] = 0x00ff0000;
+ Mask[1] = 0x0000ff00;
+ Mask[2] = 0x000000ff;
+ Mask[3] = 0xff000000;
break;
case RGB_565:
@@ -617,20 +617,20 @@ write_image (FILE *f,
Write (f, buf, 3);
break;
case RGBX_8888:
- buf[3] = *temp++;
buf[2] = *temp++;
buf[1] = *temp++;
- buf[0] = 0;
+ buf[0] = *temp++;
+ buf[3] = 0;
xpos++;
if (channels > 3 && (guchar) *temp == 0)
buf[0] = buf[1] = buf[2] = 0xff;
Write (f, buf, 4);
break;
case RGBA_8888:
- buf[3] = *temp++;
buf[2] = *temp++;
buf[1] = *temp++;
- buf[0] = *temp;
+ buf[0] = *temp++;
+ buf[3] = *temp;
xpos++;
Write (f, buf, 4);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]