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 69da631cdcad26baa4ba500942f0c6d74cebff44 (commit) from ed37eafd478e7e915aaa44fb1ab0d5e412fd86d4 (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/69da631cdcad26baa4ba500942f0c6d74cebf...
commit 69da631cdcad26baa4ba500942f0c6d74cebff44 Author: Cyril Hrubis metan@ucw.cz Date: Mon Jun 18 19:58:22 2012 +0200
filters: Add Laplace filter and Laplace based Edge Sharpening.
diff --git a/include/filters/GP_Filters.h b/include/filters/GP_Filters.h index d00a852..92ce03a 100644 --- a/include/filters/GP_Filters.h +++ b/include/filters/GP_Filters.h @@ -56,4 +56,7 @@ /* Bitmap dithering */ #include "filters/GP_Dither.h"
+/* Laplace based filters */ +#include "filters/GP_Laplace.h" + #endif /* GP_FILTERS_H */ diff --git a/include/filters/GP_Filters.h b/include/filters/GP_Laplace.h similarity index 62% copy from include/filters/GP_Filters.h copy to include/filters/GP_Laplace.h index d00a852..e250cd6 100644 --- a/include/filters/GP_Filters.h +++ b/include/filters/GP_Laplace.h @@ -16,44 +16,33 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * * Boston, MA 02110-1301 USA * * * - * Copyright (C) 2009-2010 Jiri "BlueBear" Dluhos * - * jiri.bluebear.dluhos@gmail.com * - * * - * Copyright (C) 2009-2011 Cyril Hrubis metan@ucw.cz * + * Copyright (C) 2009-2012 Cyril Hrubis metan@ucw.cz * * * *****************************************************************************/
/*
- GP_Context filters. + Laplace filter and Laplace-based filters.
*/
-#ifndef GP_FILTERS_H -#define GP_FILTERS_H - -/* Filter per channel parameter passing interface */ -#include "filters/GP_FilterParam.h" - -/* Point filters, brightness, contrast ... */ -#include "filters/GP_Point.h" - -/* Addition, difference, min, max ... */ -#include "filters/GP_Arithmetic.h" - -/* Histograms, ... */ -#include "filters/GP_Stats.h" +#ifndef FILTERS_GP_LAPLACE_H +#define FILTERS_GP_LAPLACE_H
-/* Image rotations (90 180 270 grads) and mirroring */ -#include "filters/GP_Rotate.h" +#include "GP_Filter.h"
-/* Linear convolution based filters (mostly blurs) */ -#include "filters/GP_Linear.h" - -/* Image scaling (resampling) */ -#include "filters/GP_Resize.h" +/* + * Laplace, second-derivative filter. + */ +int GP_FilterLaplace(const GP_Context *src, GP_Context *dst, + GP_ProgressCallback *callback);
-/* Bitmap dithering */ -#include "filters/GP_Dither.h" +/* + * Laplace based filter sharpening. + * + * The w is direct weight used to multiply the result. + */ +int GP_FilterEdgeSharpening(const GP_Context *src, GP_Context *dst, + float w, GP_ProgressCallback *callback);
-#endif /* GP_FILTERS_H */ +#endif /* FILTERS_GP_LAPLACE_H */ diff --git a/include/filters/GP_Filters.h b/libs/filters/GP_Laplace.c similarity index 62% copy from include/filters/GP_Filters.h copy to libs/filters/GP_Laplace.c index d00a852..3de0a97 100644 --- a/include/filters/GP_Filters.h +++ b/libs/filters/GP_Laplace.c @@ -16,44 +16,46 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * * Boston, MA 02110-1301 USA * * * - * Copyright (C) 2009-2010 Jiri "BlueBear" Dluhos * - * jiri.bluebear.dluhos@gmail.com * - * * - * Copyright (C) 2009-2011 Cyril Hrubis metan@ucw.cz * + * Copyright (C) 2009-2012 Cyril Hrubis metan@ucw.cz * * * *****************************************************************************/
-/* - - GP_Context filters. +#include "core/GP_Debug.h" +#include "core/GP_GetPutPixel.h"
- */ +#include "GP_Linear.h"
-#ifndef GP_FILTERS_H -#define GP_FILTERS_H +#include "GP_Laplace.h"
-/* Filter per channel parameter passing interface */ -#include "filters/GP_FilterParam.h" +int GP_FilterLaplace(const GP_Context *src, GP_Context *dst, + GP_ProgressCallback *callback) +{ + GP_DEBUG(1, "Laplace filter %ux%u", src->w, src->h);
-/* Point filters, brightness, contrast ... */ -#include "filters/GP_Point.h" + float kern[3] = {1, -2, 1};
-/* Addition, difference, min, max ... */ -#include "filters/GP_Arithmetic.h" + if (GP_FilterVHLinearConvolution_Raw(src, dst, kern, 3, 1, + kern, 3, 1, callback)) + return 1;
-/* Histograms, ... */ -#include "filters/GP_Stats.h" + return 0; +}
-/* Image rotations (90 180 270 grads) and mirroring */ -#include "filters/GP_Rotate.h" +int GP_FilterEdgeSharpening(const GP_Context *src, GP_Context *dst, + float w, GP_ProgressCallback *callback) +{ + float kern[3] = {0, 1, 0};
-/* Linear convolution based filters (mostly blurs) */ -#include "filters/GP_Linear.h" + GP_DEBUG(1, "Laplace Edge Sharpening filter %ux%u w=%f", + src->w, src->h, w);
-/* Image scaling (resampling) */ -#include "filters/GP_Resize.h" + kern[0] -= 1.00 * w; + kern[1] -= -2.00 * w; + kern[2] -= 1.00 * w;
-/* Bitmap dithering */ -#include "filters/GP_Dither.h" + if (GP_FilterVHLinearConvolution_Raw(src, dst, kern, 3, 1, + kern, 3, 1, callback)) + return 1;
-#endif /* GP_FILTERS_H */ + return 0; +}
-----------------------------------------------------------------------
Summary of changes: include/filters/GP_Filters.h | 3 + .../GP_Backends.h => filters/GP_Laplace.h} | 28 ++++----- libs/{text/GP_Font.c => filters/GP_Laplace.c} | 61 +++++++++----------- 3 files changed, 43 insertions(+), 49 deletions(-) copy include/{backends/GP_Backends.h => filters/GP_Laplace.h} (75%) copy libs/{text/GP_Font.c => filters/GP_Laplace.c} (66%)
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.