X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Freaders%2Fimage.c;h=7457a4e9c74f360c7be2c9b6c139508dff6cc416;hb=bdad407fb79c2f7be9f3603694ebdeadc645b52d;hp=449111a7a55da41949ac1bc78a99d2bdca62ceef;hpb=c84e08337609bda7053eda5ed5f3545502607e1d;p=swftools.git diff --git a/lib/readers/image.c b/lib/readers/image.c index 449111a..7457a4e 100644 --- a/lib/readers/image.c +++ b/lib/readers/image.c @@ -80,12 +80,14 @@ void imagepage_rendersection(gfxpage_t*page, gfxdevice_t*output, gfxcoord_t x, g void image_doc_destroy(gfxdocument_t*gfx) { image_doc_internal_t*i= (image_doc_internal_t*)gfx->internal; - // ... + + free(i->img.data);i->img.data = 0; + free(gfx->internal);gfx->internal=0; free(gfx);gfx=0; } -void image_doc_set_parameter(gfxdocument_t*gfx, const char*name, const char*value) +void image_doc_setparameter(gfxdocument_t*gfx, const char*name, const char*value) { image_doc_internal_t*i= (image_doc_internal_t*)gfx->internal; } @@ -111,7 +113,7 @@ gfxpage_t* image_doc_getpage(gfxdocument_t*doc, int page) return image_page; } -static void image_set_parameter(gfxsource_t*src, const char*name, const char*value) +static void image_setparameter(gfxsource_t*src, const char*name, const char*value) { msg(" (gfxsource_image) setting parameter %s to \"%s\"", name, value); } @@ -141,7 +143,7 @@ static gfxdocument_t*image_open(gfxsource_t*src, const char*filename) image_doc->internal = i; image_doc->get = 0; image_doc->destroy = image_doc_destroy; - image_doc->set_parameter = image_doc_set_parameter; + image_doc->setparameter = image_doc_setparameter; image_doc->getpage = image_doc_getpage; return image_doc; @@ -151,7 +153,8 @@ gfxsource_t*gfxsource_image_create() { gfxsource_t*src = (gfxsource_t*)malloc(sizeof(gfxsource_t)); memset(src, 0, sizeof(gfxsource_t)); - src->set_parameter = image_set_parameter; + src->setparameter = image_setparameter; src->open = image_open; return src; } +