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 870edf9002091a710e94dd929c2e9583af590f34 (commit)
from 30d9e3ba8aa2412e028bb51b34d3be44ddf7a92b (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/870edf9002091a710e94dd929c2e9583af59…
commit 870edf9002091a710e94dd929c2e9583af590f34
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Fri Jan 6 20:27:13 2012 +0100
pylib: Propagate math python buildins to templates
Now we can use int() float() and round() in templates too.
diff --git a/pylib/gfxprim/render_utils.py b/pylib/gfxprim/render_utils.py
index d99aa3d..b115b91 100644
--- a/pylib/gfxprim/render_utils.py
+++ b/pylib/gfxprim/render_utils.py
@@ -28,6 +28,10 @@ def create_environment(config, template_dir):
env.globals['len'] = len
env.globals['error'] = template_error
env.globals['hex'] = lambda(x): hex(x).rstrip('L')
+ # Propagate some python buildins
+ env.globals['int'] = int;
+ env.globals['float'] = float;
+ env.globals['round'] = round;
return env
-----------------------------------------------------------------------
Summary of changes:
pylib/gfxprim/render_utils.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
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/30d9e3ba8aa2412e028bb51b34d3be44ddf7…
commit 30d9e3ba8aa2412e028bb51b34d3be44ddf7a92b
Author: Cyril Hrubis <metan(a)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(a)ucw.cz> *
+ * Copyright (C) 2009-2011 Cyril Hrubis <metan(a)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(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")