Author: tack
Date: Sun May 27 23:21:14 2007
New Revision: 2692
Modified:
trunk/evas/src/image.c
Log:
Don't require stride when passing null to data_set
Modified: trunk/evas/src/image.c
==============================================================================
--- trunk/evas/src/image.c (original)
+++ trunk/evas/src/image.c Sun May 27 23:21:14 2007
@@ -324,7 +324,9 @@
if (PyNumber_Check(buffer)) {
int cspace = evas_object_image_colorspace_get(self->object);
- if (cspace == EVAS_COLORSPACE_YCBCR422P601_PL || cspace ==
EVAS_COLORSPACE_YCBCR422P709_PL) {
+ is_write_buffer = 1;
+ data = (void *) PyLong_AsLong(buffer);
+ if (data && (cspace == EVAS_COLORSPACE_YCBCR422P601_PL || cspace ==
EVAS_COLORSPACE_YCBCR422P709_PL)) {
int w, h;
if (!PyNumber_Check(stride)) {
PyErr_SetString(PyExc_ValueError, "stride parameter is not an
integer");
@@ -332,10 +334,6 @@
}
evas_object_image_size_get(self->object, &w, &h);
data = _yuv_planes_to_rows(buffer, w, h, PyLong_AsLong(stride));
- is_write_buffer = 1;
- } else {
- is_write_buffer = 1;
- data = (void *) PyLong_AsLong(buffer);
}
} else {
result = PyObject_AsWriteBuffer(buffer, &data, &len);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog