From: kramm Date: Sun, 16 May 2004 18:54:10 +0000 (+0000) Subject: fixed ImageShape image size lookup. X-Git-Tag: release-0-6-0~213 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=01288d7ae1be4abc83817cd5d12fb7c5f72beda0 fixed ImageShape image size lookup. --- diff --git a/lib/python/tags.c b/lib/python/tags.c index e642125..a9e8181 100644 --- a/lib/python/tags.c +++ b/lib/python/tags.c @@ -347,6 +347,18 @@ static void image_dealloc(tag_internals_t*self) free(pi->rgba);pi->rgba = 0; } } +static int imagetag_getWidth(PyObject* self) +{ + tag_internals_t*itag = tag_getinternals(self); + image_internal_t*pi = (image_internal_t*)itag->data; + return pi->width; +} +static int imagetag_getHeight(PyObject* self) +{ + tag_internals_t*itag = tag_getinternals(self); + image_internal_t*pi = (image_internal_t*)itag->data; + return pi->height; +} static PyObject* f_DefineImage(PyObject* self, PyObject* args, PyObject* kwargs) { static char *kwlist[] = {"image"}; @@ -420,8 +432,8 @@ static PyObject* f_DefineImageShape(PyObject* self, PyObject* args, PyObject* kw shape_internal_t*ti = (shape_internal_t*)itag->data; ti->shape = 0; /*HACK*/ - int width = image_getWidth(image); - int height = image_getHeight(image); + int width = imagetag_getWidth(image); + int height = imagetag_getHeight(image); int id = tagmap_add(itag->tagmap, image); itag->tag= swf_InsertTag(0, ST_DEFINESHAPE3); swf_SetU16(itag->tag, 0);