From e35f701b65571200e98e365f057c65377f73ad0f Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Thu, 15 Nov 2007 19:15:10 +0000 Subject: [PATCH] fixed bug in colormap handling (bug #497103). 2007-11-15 Sven Neumann * plug-ins/common/tiff-save.c (save_image): fixed bug in colormap handling (bug #497103). svn path=/trunk/; revision=24165 --- ChangeLog | 5 +++++ plug-ins/common/tiff-save.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index cd769a9a41..d8971a0ff4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-11-15 Sven Neumann + + * plug-ins/common/tiff-save.c (save_image): fixed bug in colormap + handling (bug #497103). + 2007-11-15 Michael Natterer * app/display/gimpdisplayshell-dnd.c diff --git a/plug-ins/common/tiff-save.c b/plug-ins/common/tiff-save.c index c111dedc53..3d96e04da3 100644 --- a/plug-ins/common/tiff-save.c +++ b/plug-ins/common/tiff-save.c @@ -755,9 +755,9 @@ save_image (const gchar *filename, for (i = 0; i < colors; i++) { - red[i] = *cmap++ * 65535 / 255; - grn[i] = *cmap++ * 65535 / 255; - blu[i] = *cmap++ * 65535 / 255; + red[i] = cmap[i * 3 + 0] * 65535 / 255; + grn[i] = cmap[i * 3 + 1] * 65535 / 255; + blu[i] = cmap[i * 3 + 2] * 65535 / 255; } } @@ -771,7 +771,7 @@ save_image (const gchar *filename, case GIMP_INDEXEDA_IMAGE: g_message ("TIFF save cannot handle indexed images with alpha channel."); default: - return FALSE; + return FALSE; } if (compression == COMPRESSION_CCITTFAX3 ||