This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 30d9e3ba8aa2412e028bb51b34d3be44ddf7a92b (commit) from 183e450a847b698b96f2f7ecbd08ed785e58879f (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/30d9e3ba8aa2412e028bb51b34d3be44ddf7a...
commit 30d9e3ba8aa2412e028bb51b34d3be44ddf7a92b Author: Cyril Hrubis metan@ucw.cz Date: Fri Jan 6 00:57:28 2012 +0100
loaders: use png conversion to RGB for unknown palettes.
diff --git a/libs/loaders/GP_PNG.c b/libs/loaders/GP_PNG.c index 51c645e..c430e72 100644 --- a/libs/loaders/GP_PNG.c +++ b/libs/loaders/GP_PNG.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * * Boston, MA 02110-1301 USA * * * - * Copyright (C) 2009-2010 Cyril Hrubis metan@ucw.cz * + * Copyright (C) 2009-2011 Cyril Hrubis metan@ucw.cz * * * *****************************************************************************/
@@ -127,7 +127,7 @@ GP_RetCode GP_ReadPNG(FILE *f, GP_Context **res,
GP_DEBUG(2, "Have %s%s interlace %s PNG%s size %ux%u depth %i", interlace_type_name(interlace_type), - color_type & PNG_COLOR_MASK_PALETTE ? "pallete " : "", + color_type & PNG_COLOR_MASK_PALETTE ? " pallete " : "", color_type & PNG_COLOR_MASK_COLOR ? "color" : "gray", color_type & PNG_COLOR_MASK_ALPHA ? " with alpha channel" : "", (unsigned int)w, (unsigned int)h, depth); @@ -169,6 +169,12 @@ GP_RetCode GP_ReadPNG(FILE *f, GP_Context **res, break; } } + + /* Convert everything else to RGB888 */ + //TODO: add palette matching to G2 G4 and G8 + png_set_palette_to_rgb(png); + png_set_bgr(png); + pixel_type = GP_PIXEL_RGB888; break; }
-----------------------------------------------------------------------
Summary of changes: libs/loaders/GP_PNG.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.