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 4b5f8e14db9cd157d1b3b616726b1c9fb1b3c9b5 (commit) via cb75b76577a6680789268db88f8133d6c5910743 (commit) via 0fe41f6f329aa64d7f7cdefe6666b4140fcf49c9 (commit) via 3c6ce96d9864ad661d99840a571888c2633c1f6f (commit) from ce280e141cd211cffe37af58fe420428740ae7ba (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/4b5f8e14db9cd157d1b3b616726b1c9fb1b3c...
commit 4b5f8e14db9cd157d1b3b616726b1c9fb1b3c9b5 Author: Cyril Hrubis metan@ucw.cz Date: Sat May 26 20:38:53 2012 +0200
py_simple: Fix python example after the API update.
diff --git a/demos/py_simple/rotate90.py b/demos/py_simple/rotate90.py index d93756b..f4f2ad3 100755 --- a/demos/py_simple/rotate90.py +++ b/demos/py_simple/rotate90.py @@ -16,7 +16,7 @@ def main(): # Load Image src = loaders.LoadImage(sys.argv[1], None) # Rotate by 90 degrees - res = filters.FilterRotate90Alloc(src, None) + res = filters.FilterRotate90_Alloc(src, None) # Save Image res.Save(sys.argv[2])
http://repo.or.cz/w/gfxprim.git/commit/cb75b76577a6680789268db88f8133d6c5910...
commit cb75b76577a6680789268db88f8133d6c5910743 Author: Cyril Hrubis metan@ucw.cz Date: Sat May 26 20:35:48 2012 +0200
pywrap: Set GP_FilterSymmetryNames array to immutable.
diff --git a/pylib/gfxprim/filters/filters.i b/pylib/gfxprim/filters/filters.i index 3ee7227..866ea9b 100644 --- a/pylib/gfxprim/filters/filters.i +++ b/pylib/gfxprim/filters/filters.i @@ -24,6 +24,8 @@ %include "GP_Resize.h"
/* Functions returning new allocated context */ +%immutable GP_FilterSymmetryNames; + %include "GP_Rotate.h"
%newobject GP_FilterMirrorH_Alloc;
http://repo.or.cz/w/gfxprim.git/commit/0fe41f6f329aa64d7f7cdefe6666b4140fcf4...
commit 0fe41f6f329aa64d7f7cdefe6666b4140fcf49c9 Author: Cyril Hrubis metan@ucw.cz Date: Sat May 26 20:32:09 2012 +0200
doc: Update Rotate filters docs.
diff --git a/doc/filters.txt b/doc/filters.txt index a751015..fad32b2 100644 --- a/doc/filters.txt +++ b/doc/filters.txt @@ -110,68 +110,83 @@ Rotation and Symmetry filters ------------------------------------------------------------------------------- #include <GP_Filters.h>
-GP_Context *GP_FilterMirrorH(const GP_Context *src, GP_Context *dst, - GP_ProgressCallback *callback); +int GP_FilterMirrorH(const GP_Context *src, GP_Context *dst, + GP_ProgressCallback *callback); + +GP_Context *GP_FilterMirrorH_Alloc(const GP_Context *src, + GP_ProgressCallback *callback); -------------------------------------------------------------------------------
Mirrors context horizontally.
Works 'in-place'.
-The destination has to have the same pixel type and the destination size must -be at least as big as source. +The destination has to have the same pixel type and the size must be at least +as large as source.
[source,c] ------------------------------------------------------------------------------- #include <GP_Filters.h>
-GP_Context *GP_FilterMirrorV(const GP_Context *src, GP_Context *dst, - GP_ProgressCallback *callback); +int GP_FilterMirrorV(const GP_Context *src, GP_Context *dst, + GP_ProgressCallback *callback); + +GP_Context *GP_FilterMirrorV_Alloc(const GP_Context *src, + GP_ProgressCallback *callback); -------------------------------------------------------------------------------
Mirrors context vertically.
Works 'in-place'.
-the destination has to have the same pixel type and the destination size must -be at least as big as source. +The destination has to have the same pixel type and the size must be at least +as large as source.
[source,c] ------------------------------------------------------------------------------- #include <GP_Filters.h>
-GP_Context *GP_FilterRotate90(const GP_Context *src, GP_Context *dst, - GP_ProgressCallback *callback); +int GP_FilterRotate90(const GP_Context *src, GP_Context *dst, + GP_ProgressCallback *callback); + +GP_Context *GP_FilterRotate90_Alloc(const GP_Context *src, + GP_ProgressCallback *callback); -------------------------------------------------------------------------------
Rotate context by 90 degrees.
Doesn't work 'in-place' (yet).
-The destination has to have the same pixel type and destination size must be -big enough to fit rotated context (i.e. W and H are swapped). +The destination has to have the same pixel type and size must be large enough to +fit rotated context (i.e. W and H are swapped).
[source,c] ------------------------------------------------------------------------------- #include <GP_Filters.h>
-GP_Context *GP_FilterRotate180(const GP_Context *src, GP_Context *dst, - GP_ProgressCallback *callback); +int GP_FilterRotate180(const GP_Context *src, GP_Context *dst, + GP_ProgressCallback *callback); + +GP_Context *GP_FilterRotate180_Alloc(const GP_Context *src, + GP_ProgressCallback *callback); -------------------------------------------------------------------------------
Rotate context by 180 degrees.
Doesn't work 'in-place' (yet).
-the destination has to have the same pixel type and the destination size must -be at least as big as source. +The destination has to have the same pixel type and the size must be at least +as large as source.
[source,c] ------------------------------------------------------------------------------- #include <GP_Filters.h>
-GP_Context *GP_FilterRotate270(const GP_Context *src, GP_Context *dst, - GP_ProgressCallback *callback); +int GP_FilterRotate270(const GP_Context *src, GP_Context *dst, + GP_ProgressCallback *callback); + +GP_Context *GP_FilterRotate270_Alloc(const GP_Context *src, + GP_ProgressCallback *callback); -------------------------------------------------------------------------------
Rotate context by 270 degrees. @@ -179,7 +194,7 @@ Rotate context by 270 degrees. Doesn't work 'in-place' (yet).
The destination has to have the same pixel type and destination size must be -big enough to fit rotated context (eg. W and H are swapped). +large enough to fit rotated context (eg. W and H are swapped).
[source,c] ------------------------------------------------------------------------------- @@ -193,9 +208,13 @@ typedef enum GP_FilterSymmetries { GP_MIRROR_V, } GP_FilterSymmetries;
-GP_Context *GP_FilterSymmetry(const GP_Context *src, GP_Context *dst, +GP_Context *GP_FilterSymmetry(const GP_Context *src, GP_FilterSymmetries symmetry, GP_ProgressCallback *callback); + +int GP_FilterSymmetry(const GP_Context *src, GP_Context *dst, + GP_FilterSymmetries symmetry, + GP_ProgressCallback *callback); -------------------------------------------------------------------------------
Catch all function for symmetry filters.
http://repo.or.cz/w/gfxprim.git/commit/3c6ce96d9864ad661d99840a571888c2633c1...
commit 3c6ce96d9864ad661d99840a571888c2633c1f6f Author: Cyril Hrubis metan@ucw.cz Date: Sat May 26 20:31:27 2012 +0200
filters: Update Rotate filters API.
diff --git a/demos/c_simple/filters_symmetry.c b/demos/c_simple/filters_symmetry.c index 3f130a4..c1f5068 100644 --- a/demos/c_simple/filters_symmetry.c +++ b/demos/c_simple/filters_symmetry.c @@ -99,7 +99,7 @@ int main(int argc, char *argv[]) }
/* Apply a symmetry filter */ - res = GP_FilterSymmetryAlloc(src, sym, NULL); + res = GP_FilterSymmetry_Alloc(src, sym, NULL);
/* Save Image */ if (GP_SaveImage(res, argv[optind+1], NULL)) { diff --git a/demos/grinder/grinder.c b/demos/grinder/grinder.c index fe51530..3da5037 100644 --- a/demos/grinder/grinder.c +++ b/demos/grinder/grinder.c @@ -227,13 +227,13 @@ static GP_RetCode rotate(GP_Context **c, const char *params)
switch (rot) { case 0: - res = GP_FilterRotate90Alloc(*c, progress_callback); + res = GP_FilterRotate90_Alloc(*c, progress_callback); break; case 1: - res = GP_FilterRotate180Alloc(*c, progress_callback); + res = GP_FilterRotate180_Alloc(*c, progress_callback); break; case 2: - res = GP_FilterRotate270Alloc(*c, progress_callback); + res = GP_FilterRotate270_Alloc(*c, progress_callback); break; } diff --git a/demos/spiv/spiv.c b/demos/spiv/spiv.c index c6b086e..77c3bc4 100644 --- a/demos/spiv/spiv.c +++ b/demos/spiv/spiv.c @@ -255,15 +255,15 @@ static void *image_loader(void *ptr) break; case 90: callback.priv = "Rotating image (90)"; - img = GP_FilterRotate90Alloc(ret, &callback); + img = GP_FilterRotate90_Alloc(ret, &callback); break; case 180: callback.priv = "Rotating image (180)"; - img = GP_FilterRotate180Alloc(ret, &callback); + img = GP_FilterRotate180_Alloc(ret, &callback); break; case 270: callback.priv = "Rotating image (270)"; - img = GP_FilterRotate270Alloc(ret, &callback); + img = GP_FilterRotate270_Alloc(ret, &callback); break; }
diff --git a/include/filters/GP_Rotate.h b/include/filters/GP_Rotate.h index 0957010..7c39ced 100644 --- a/include/filters/GP_Rotate.h +++ b/include/filters/GP_Rotate.h @@ -49,9 +49,9 @@ int GP_FilterMirrorH_Raw(const GP_Context *src, GP_Context *dst, * * The filter works 'in-place' which means that src and dst * may be very same context. Note that when aborting in-place operation - * the image buffer gets into an inconsitent state. + * the image buffer gets into an inconsistent state. * - * Retruns zero on success, non-zero if operation was aborted. + * Returns zero on success, non-zero if operation was aborted. */ int GP_FilterMirrorH(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback); @@ -62,8 +62,8 @@ int GP_FilterMirrorH(const GP_Context *src, GP_Context *dst, * Returns pointer to newly allocated context, or NULL if malloc() has failed * or operation was aborted from withing a callback. */ -GP_Context *GP_FilterMirrorHAlloc(const GP_Context *src, - GP_ProgressCallback *callback); +GP_Context *GP_FilterMirrorH_Alloc(const GP_Context *src, + GP_ProgressCallback *callback);
/* * Mirror vertically @@ -82,9 +82,9 @@ int GP_FilterMirrorV_Raw(const GP_Context *src, GP_Context *dst, * * The filter works 'in-place' which means that src and dst * may be very same context. Note that when aborting in-place operation - * the image buffer gets into an inconsitent state. + * the image buffer gets into an inconsistent state. * - * Retruns zero on success, non-zero if operation was aborted. + * Returns zero on success, non-zero if operation was aborted. */ int GP_FilterMirrorV(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback); @@ -95,8 +95,8 @@ int GP_FilterMirrorV(const GP_Context *src, GP_Context *dst, * Returns pointer to newly allocated context, or NULL if malloc() has failed * or operation was aborted from withing a callback. */ -GP_Context *GP_FilterMirrorVAlloc(const GP_Context *src, - GP_ProgressCallback *callback); +GP_Context *GP_FilterMirrorV_Alloc(const GP_Context *src, + GP_ProgressCallback *callback);
/* * Rotate context by 90, 180 and 270. @@ -123,20 +123,20 @@ int GP_FilterRotate270_Raw(const GP_Context *src, GP_Context *dst, int GP_FilterRotate90(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback);
-GP_Context *GP_FilterRotate90Alloc(const GP_Context *src, - GP_ProgressCallback *callback); +GP_Context *GP_FilterRotate90_Alloc(const GP_Context *src, + GP_ProgressCallback *callback);
int GP_FilterRotate180(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback);
-GP_Context *GP_FilterRotate180Alloc(const GP_Context *src, +GP_Context *GP_FilterRotate180_Alloc(const GP_Context *src, GP_ProgressCallback *callback);
int GP_FilterRotate270(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback);
-GP_Context *GP_FilterRotate270Alloc(const GP_Context *src, - GP_ProgressCallback *callback); +GP_Context *GP_FilterRotate270_Alloc(const GP_Context *src, + GP_ProgressCallback *callback);
/* * Calls a symmetry filter on bitmap. @@ -168,12 +168,12 @@ extern const char **GP_FilterSymmetryNames; */ int GP_FilterSymmetryByName(const char *symmetry);
-GP_Context *GP_FilterSymmetryAlloc(const GP_Context *src, - GP_FilterSymmetries symmetry, - GP_ProgressCallback *callback); - int GP_FilterSymmetry(const GP_Context *src, GP_Context *dst, GP_FilterSymmetries symmetry, GP_ProgressCallback *callback);
+GP_Context *GP_FilterSymmetry_Alloc(const GP_Context *src, + GP_FilterSymmetries symmetry, + GP_ProgressCallback *callback); + #endif /* FILTERS_GP_ROTATE_H */ diff --git a/libs/filters/GP_Rotate.c b/libs/filters/GP_Rotate.c index d758535..7bfa309 100644 --- a/libs/filters/GP_Rotate.c +++ b/libs/filters/GP_Rotate.c @@ -84,8 +84,8 @@ int GP_FilterMirrorH(const GP_Context *src, GP_Context *dst, return 0; }
-GP_Context *GP_FilterMirrorHAlloc(const GP_Context *src, - GP_ProgressCallback *callback) +GP_Context *GP_FilterMirrorH_Alloc(const GP_Context *src, + GP_ProgressCallback *callback) { GP_Context *res; @@ -118,8 +118,8 @@ int GP_FilterMirrorV(const GP_Context *src, GP_Context *dst, return 0; }
-GP_Context *GP_FilterMirrorVAlloc(const GP_Context *src, - GP_ProgressCallback *callback) +GP_Context *GP_FilterMirrorV_Alloc(const GP_Context *src, + GP_ProgressCallback *callback) { GP_Context *res; @@ -163,8 +163,8 @@ int GP_FilterRotate90(const GP_Context *src, GP_Context *dst, return 0; }
-GP_Context *GP_FilterRotate90Alloc(const GP_Context *src, - GP_ProgressCallback *callback) +GP_Context *GP_FilterRotate90_Alloc(const GP_Context *src, + GP_ProgressCallback *callback) { GP_Context *res; @@ -198,8 +198,8 @@ int GP_FilterRotate180(const GP_Context *src, GP_Context *dst, return 0; }
-GP_Context *GP_FilterRotate180Alloc(const GP_Context *src, - GP_ProgressCallback *callback) +GP_Context *GP_FilterRotate180_Alloc(const GP_Context *src, + GP_ProgressCallback *callback) { GP_Context *res; @@ -233,8 +233,8 @@ int GP_FilterRotate270(const GP_Context *src, GP_Context *dst, return 0; }
-GP_Context *GP_FilterRotate270Alloc(const GP_Context *src, - GP_ProgressCallback *callback) +GP_Context *GP_FilterRotate270_Alloc(const GP_Context *src, + GP_ProgressCallback *callback) { GP_Context *res; @@ -274,21 +274,21 @@ int GP_FilterSymmetryByName(const char *symmetry) return -1; }
-GP_Context *GP_FilterSymmetryAlloc(const GP_Context *src, - GP_FilterSymmetries symmetry, - GP_ProgressCallback *callback) +GP_Context *GP_FilterSymmetry_Alloc(const GP_Context *src, + GP_FilterSymmetries symmetry, + GP_ProgressCallback *callback) { switch (symmetry) { case GP_ROTATE_90: - return GP_FilterRotate90Alloc(src, callback); + return GP_FilterRotate90_Alloc(src, callback); case GP_ROTATE_180: - return GP_FilterRotate180Alloc(src, callback); + return GP_FilterRotate180_Alloc(src, callback); case GP_ROTATE_270: - return GP_FilterRotate270Alloc(src, callback); + return GP_FilterRotate270_Alloc(src, callback); case GP_MIRROR_H: - return GP_FilterMirrorHAlloc(src, callback); + return GP_FilterMirrorH_Alloc(src, callback); case GP_MIRROR_V: - return GP_FilterMirrorVAlloc(src, callback); + return GP_FilterMirrorV_Alloc(src, callback); default: GP_DEBUG(1, "Invalid symmetry %i", (int) symmetry); return NULL; diff --git a/pylib/gfxprim/filters/filters.i b/pylib/gfxprim/filters/filters.i index 11a2426..3ee7227 100644 --- a/pylib/gfxprim/filters/filters.i +++ b/pylib/gfxprim/filters/filters.i @@ -26,15 +26,13 @@ /* Functions returning new allocated context */ %include "GP_Rotate.h"
-%newobject GP_FilterMirrorHAlloc; -%newobject GP_FilterMirrorVAlloc; -%newobject GP_FilterRotate90Alloc; -%newobject GP_FilterRotate180Alloc; -%newobject GP_FilterRotate270Alloc; -%newobject GP_FilterSymmetryAlloc; +%newobject GP_FilterMirrorH_Alloc; +%newobject GP_FilterMirrorV_Alloc; +%newobject GP_FilterRotate90_Alloc; +%newobject GP_FilterRotate180_Alloc; +%newobject GP_FilterRotate270_Alloc; +%newobject GP_FilterSymmetry_Alloc;
- -/* Dithering */ %include "GP_Dither.h"
%newobject GP_FilterFloydSteinberg_RGB888_Alloc;
-----------------------------------------------------------------------
Summary of changes: demos/c_simple/filters_symmetry.c | 2 +- demos/grinder/grinder.c | 6 ++-- demos/py_simple/rotate90.py | 2 +- demos/spiv/spiv.c | 6 ++-- doc/filters.txt | 59 ++++++++++++++++++++++++------------ include/filters/GP_Rotate.h | 34 ++++++++++---------- libs/filters/GP_Rotate.c | 36 +++++++++++----------- pylib/gfxprim/filters/filters.i | 16 +++++----- 8 files changed, 90 insertions(+), 71 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.