Author: dmeyer
Date: Thu May 25 16:39:05 2006
New Revision: 1538
Modified:
trunk/imlib2/src/image.c
trunk/imlib2/src/image.py
Log:
add blur and sharpen image
Modified: trunk/imlib2/src/image.c
==============================================================================
--- trunk/imlib2/src/image.c (original)
+++ trunk/imlib2/src/image.c Thu May 25 16:39:05 2006
@@ -240,6 +240,35 @@
return Py_None;
}
+
+PyObject *Image_PyObject__blur(PyObject *self, PyObject *args)
+{
+ int radius;
+
+ if (!PyArg_ParseTuple(args, "i", &radius))
+ return NULL;
+
+ imlib_context_set_image(((Image_PyObject *)self)->image);
+ imlib_image_blur(radius);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+
+PyObject *Image_PyObject__sharpen(PyObject *self, PyObject *args)
+{
+ int radius;
+
+ if (!PyArg_ParseTuple(args, "i", &radius))
+ return NULL;
+
+ imlib_context_set_image(((Image_PyObject *)self)->image);
+ imlib_image_sharpen(radius);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+
PyObject *Image_PyObject__clone(PyObject *self, PyObject *args)
{
Imlib_Image *image;
@@ -557,6 +586,8 @@
{ "rotate", Image_PyObject__rotate, METH_VARARGS },
{ "orientate", Image_PyObject__orientate, METH_VARARGS },
{ "flip", Image_PyObject__flip, METH_VARARGS },
+ { "blur", Image_PyObject__blur, METH_VARARGS },
+ { "sharpen", Image_PyObject__sharpen, METH_VARARGS },
{ "blend", Image_PyObject__blend, METH_VARARGS },
{ "set_alpha", Image_PyObject__set_alpha, METH_VARARGS },
{ "get_raw_data", Image_PyObject__get_raw_data, METH_VARARGS },
Modified: trunk/imlib2/src/image.py
==============================================================================
--- trunk/imlib2/src/image.py (original)
+++ trunk/imlib2/src/image.py Thu May 25 16:39:05 2006
@@ -232,6 +232,26 @@
self._changed()
+ def blurr(self, radius):
+ """
+ Blur the image
+
+ Returns: None.
+ """
+ self._image.blurr(radius)
+ self._changed()
+
+
+ def sharpen(self, radius):
+ """
+ Blur the image
+
+ Returns: None.
+ """
+ self._image.sharpen(radius)
+ self._changed()
+
+
def scale_preserve_aspect(self, (w, h)):
"""
Scales the image while retaining the original aspect ratio and return
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog