[gimp] Bug 613328 - TGA files saved with incorrect header yOrigin data
- From: Sven Neumann <neo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 613328 - TGA files saved with incorrect header yOrigin data
- Date: Wed, 7 Jul 2010 18:40:02 +0000 (UTC)
commit 4a1078796ba2d7b03567760f806ded060bd87e61
Author: Andrew Wyatt <andywyatt onetel com>
Date: Wed Jul 7 20:38:53 2010 +0200
Bug 613328 - TGA files saved with incorrect header yOrigin data
Fix header for TGA files saved with save option 'Origin=Top Left'.
plug-ins/common/file-tga.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/common/file-tga.c b/plug-ins/common/file-tga.c
index 5ec0109..610dbc7 100644
--- a/plug-ins/common/file-tga.c
+++ b/plug-ins/common/file-tga.c
@@ -1132,7 +1132,7 @@ ReadImage (FILE *fp,
} /*read_image*/
-static gint
+static gboolean
save_image (const gchar *filename,
gint32 image_ID,
gint32 drawable_ID,
@@ -1214,8 +1214,10 @@ save_image (const gchar *filename,
header[3] = header[4] = header[5] = header[6] = header[7] = 0;
}
- header[8] = header[9] = 0; /* xorigin */
- header[10] = header[11] = tsvals.origin ? 0 : height; /* yorigin */
+ header[8] = header[9] = 0; /* xorigin */
+ header[10] = tsvals.origin ? 0 : (height % 256); /* yorigin */
+ header[11] = tsvals.origin ? 0 : (height / 256); /* yorigin */
+
header[12] = width % 256;
header[13] = width / 256;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]