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 a7806826a3e654dcb0127a5776d63c5b388964fe (commit) via 1ae981689ed3c4d210a422eca2ad38c3d7976809 (commit) via 0c057913df917d3e22393a2bce9db9fb75ac0583 (commit) from 011c9fd83af2c83740583e04c274edbce551a0fb (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/a7806826a3e654dcb0127a5776d63c5b38896...
commit a7806826a3e654dcb0127a5776d63c5b388964fe Author: Cyril Hrubis metan@ucw.cz Date: Fri May 3 20:55:15 2013 +0200
install: Hack /usr/lib vs /usr/lib64 detection.
This should fix installation on Fedora until we made proper 'make install' for the C library.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/install.sh b/install.sh index f631083..fef3703 100755 --- a/install.sh +++ b/install.sh @@ -7,11 +7,16 @@ if test -z "$INSTALL_PREFIX"; then fi
HEADER_LOC="$INSTALL_PREFIX/include/" -LIB_LOC="$INSTALL_PREFIX/lib/" +if [ -d $INSTALL_PREFIX/lib64 ]; then + LIB_LOC="$INSTALL_PREFIX/lib64/" +else + LIB_LOC="$INSTALL_PREFIX/lib/" +fi + BIN_LOC="$INSTALL_PREFIX/bin/"
# Headers -echo "INSTALL headers" +echo "INSTALL headers ($HEADER_LOC)" install -m 775 -d "${HEADER_LOC}GP" for i in `ls include/`; do if [ -d "include/$i" ]; then @@ -24,7 +29,7 @@ for i in `ls include/`; do done
# Library -echo "INSTALL libraries" +echo "INSTALL libraries ($LIB_LOC)" install -m 775 -d "$LIB_LOC"
for i in build/*.so build/*.so.* build/*.a; do diff --git a/pyinst.mk b/pyinst.mk index cc4484a..38d08ef 100644 --- a/pyinst.mk +++ b/pyinst.mk @@ -6,7 +6,13 @@ ifdef SWIG ifdef PYTHON_CONFIG
-PY_INSTALL_PREFIX=$(prefix)/lib/python$(PYTHON_VER)/gfxprim/$(LIBNAME) +# Detect /usr/lib64 vs /usr/lib +LIBDIR=$(findstring lib64,$(wildcard $(prefix)/*)) +ifeq ($(LIBDIR),) +LIBDIR=lib +endif + +PY_INSTALL_PREFIX=$(prefix)/$(LIBDIR)/python$(PYTHON_VER)/gfxprim/$(LIBNAME)
ifdef DESTDIR PY_INSTALL_PREFIX:=$(DESTDIR)$(PY_INSTALL_PREFIX)
http://repo.or.cz/w/gfxprim.git/commit/1ae981689ed3c4d210a422eca2ad38c3d7976...
commit 1ae981689ed3c4d210a422eca2ad38c3d7976809 Author: Cyril Hrubis metan@ucw.cz Date: Fri May 3 20:38:51 2013 +0200
gfxprim_config.py: Remove a few odd pixel types.
This just cleanups the config (and some of the code) and removes a few odd pixel types.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/demos/grinder/grinder.c b/demos/grinder/grinder.c index 1f8eccb..ee9d349 100644 --- a/demos/grinder/grinder.c +++ b/demos/grinder/grinder.c @@ -433,7 +433,6 @@ static const char *dither_formats[] = { "g2", "g4", "g8", - "rgb333", "rgb565", "rgb666", NULL, @@ -444,7 +443,6 @@ static const GP_PixelType dither_pixel_types[] = { GP_PIXEL_G2, GP_PIXEL_G4, GP_PIXEL_G8, - GP_PIXEL_xRGB7333, GP_PIXEL_RGB565, GP_PIXEL_RGB666, }; diff --git a/gfxprim_config.py b/gfxprim_config.py index cb3fb44..1af12c9 100644 --- a/gfxprim_config.py +++ b/gfxprim_config.py @@ -45,7 +45,6 @@ config = GfxPrimConfig( # # Standard RGB types # - PixelType(name='xRGB8888', pixelsize=PS_32BPP, chanslist=[ ('R', 16, 8), ('G', 8, 8), @@ -76,26 +75,8 @@ config = GfxPrimConfig( ('R', 12, 6), ('G', 6, 6), ('B', 0, 6)]), - - PixelType(name='xRGB14666', pixelsize=PS_32BPP, chanslist=[ - ('R', 12, 6), - ('G', 6, 6), - ('B', 0, 6)]),
# - # Added for dithering tests - # - PixelType(name='xRGB7333', pixelsize=PS_16BPP, chanslist=[ - ('R', 6, 3), - ('G', 3, 3), - ('B', 0, 3)]), - - PixelType(name='xRGB2222', pixelsize=PS_8BPP, chanslist=[ - ('R', 4, 2), - ('G', 2, 2), - ('B', 0, 2)]), - - # # Palette types # PixelType(name='P2', pixelsize=PS_2BPP_LE, chanslist=[ @@ -124,13 +105,5 @@ config = GfxPrimConfig(
PixelType(name='G16', pixelsize=PS_16BPP, chanslist=[ ('V', 0, 16)]), - - # - # Experiments - # - - PixelType(name='VA12', pixelsize=PS_4BPP_BE, chanslist=[ - ('A', 1, 2), - ('V', 3, 1)]), ] ) diff --git a/include/core/GP_Convert.gen.h.t b/include/core/GP_Convert.gen.h.t index 4672708..7dc25a9 100644 --- a/include/core/GP_Convert.gen.h.t +++ b/include/core/GP_Convert.gen.h.t @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * * Boston, MA 02110-1301 USA * * * - * Copyright (C) 2011 Cyril Hrubis metan@ucw.cz * + * Copyright (C) 2011-2013 Cyril Hrubis metan@ucw.cz * * Copyright (C) 2011 Tomas Gavenciak gavento@ucw.cz * * * *****************************************************************************/ @@ -103,6 +103,5 @@ GP_Pixel GP_PixelTo{{ pt.name }}(GP_Pixel pixel, GP_PixelType type); /* Experimental macros testing generated scripts */ {{ GP_Pixel_TYPE_TO_TYPE(pixeltypes_dict['RGB565'], pixeltypes_dict['RGBA8888']) }} {{ GP_Pixel_TYPE_TO_TYPE(pixeltypes_dict['RGBA8888'], pixeltypes_dict['G2']) }} -{{ GP_Pixel_TYPE_TO_TYPE(pixeltypes_dict['VA12'], pixeltypes_dict['RGBA8888']) }}
%% endblock body
http://repo.or.cz/w/gfxprim.git/commit/0c057913df917d3e22393a2bce9db9fb75ac0...
commit 0c057913df917d3e22393a2bce9db9fb75ac0583 Author: Cyril Hrubis metan@ucw.cz Date: Fri May 3 19:56:59 2013 +0200
demos: spiv: Handle transparent images better.
* Remove the workaround that converts all images to RGB888. - the Resize filters now can handle all pixel formats (minus the cubic float, but who cares about this one anyway)
* Fill the buffer with chessboard-like pattern before blit image with transparency.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/demos/spiv/spiv.c b/demos/spiv/spiv.c index 8b94b99..f16be8c 100644 --- a/demos/spiv/spiv.c +++ b/demos/spiv/spiv.c @@ -236,12 +236,12 @@ static GP_Context *load_image(struct loader_params *params, int elevate) } /* Workaround */ - if (img->pixel_type != GP_PIXEL_RGB888) { - GP_Context *tmp; - tmp = GP_ContextConvertAlloc(img, GP_PIXEL_RGB888); - GP_ContextFree(img); - img = tmp; - } +// if (img->pixel_type != GP_PIXEL_RGB888) { +// GP_Context *tmp; +// tmp = GP_ContextConvertAlloc(img, GP_PIXEL_RGB888); +// GP_ContextFree(img); +// img = tmp; +// }
image_cache_put(params->img_orig_cache, img, params->img_path, 0, 0); @@ -252,6 +252,30 @@ static GP_Context *load_image(struct loader_params *params, int elevate) }
/* + * Fill context with chessboard-like pattern. + */ +static void pattern_fill(GP_Context *ctx, unsigned int x0, unsigned int y0, unsigned int w, unsigned int h) +{ + unsigned int x, y; + + GP_Pixel g1 = GP_RGBToContextPixel(0x44, 0x44, 0x44, ctx); + GP_Pixel g2 = GP_RGBToContextPixel(0x33, 0x33, 0x33, ctx); + + for (y = 0; y < h; y++) { + for (x = 0; x < w; x++) { + GP_Pixel pix; + + if ((x%(w/10) < (w/20)) ^ (y%(h/10) < (h/20))) + pix = g1; + else + pix = g2; + + GP_PutPixel(ctx, x0 + x, y0 + y, pix); + } + } +} + +/* * Updates display. */ static void update_display(struct loader_params *params, GP_Context *img) @@ -305,6 +329,9 @@ static void update_display(struct loader_params *params, GP_Context *img) GP_FilterFloydSteinberg_RGB888(img, &sub_display, NULL); // GP_FilterHilbertPeano_RGB888(img, &sub_display, NULL); } else { + if (GP_PixelHasFlags(img->pixel_type, GP_PIXEL_HAS_ALPHA)) + pattern_fill(context, cx, cy, img->w, img->h); + GP_Blit_Clipped(img, 0, 0, img->w, img->h, context, cx, cy); }
-----------------------------------------------------------------------
Summary of changes: demos/grinder/grinder.c | 2 -- demos/spiv/spiv.c | 39 +++++++++++++++++++++++++++++++++------ gfxprim_config.py | 27 --------------------------- include/core/GP_Convert.gen.h.t | 3 +-- install.sh | 11 ++++++++--- pyinst.mk | 8 +++++++- 6 files changed, 49 insertions(+), 41 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.