[gimp/gimp-2-6] file-png: Get num_colors properly before passing it on (cherry picked from commit 5b5d88a2f1d9f0e37d
- From: Nils Philippsen <nphilipp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-6] file-png: Get num_colors properly before passing it on (cherry picked from commit 5b5d88a2f1d9f0e37d
- Date: Thu, 17 Nov 2011 16:01:17 +0000 (UTC)
commit 847c9eaec839ad34030e2e5c5f7a5053e9ed5258
Author: Mukund Sivaraman <muks banu com>
Date: Tue Apr 26 15:18:27 2011 +0530
file-png: Get num_colors properly before passing it on
(cherry picked from commit 5b5d88a2f1d9f0e37d07b24148f76a14d0f2789b)
plug-ins/common/file-png.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index e3b30a7..619a818 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -1230,6 +1230,7 @@ save_image (const gchar *filename,
struct tm *gmt; /* GMT broken down */
int color_type;
int bit_depth;
+ png_colorp palette;
guchar remap[256]; /* Re-mapping for the palette */
@@ -1354,9 +1355,8 @@ save_image (const gchar *filename,
case GIMP_INDEXED_IMAGE:
bpp = 1;
color_type = PNG_COLOR_TYPE_PALETTE;
- png_set_PLTE (pp, info,
- (png_colorp) gimp_image_get_colormap (image_ID, &num_colors),
- num_colors);
+ palette = (png_colorp) gimp_image_get_colormap (image_ID, &num_colors);
+ png_set_PLTE (pp, info, palette, num_colors);
bit_depth = get_bit_depth_for_palette (num_colors);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]