X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fgfximage.c;h=661f9cd9db2a7981b63f3638f36b3079a00d6813;hp=b47031fb7d9619403173dc09ad228b1c8b0fb865;hb=879d0eec420fe0fd5ddcd56c8fe62b82a6744edd;hpb=d633804d334e77de50e9da7fe656ad58e52aad28 diff --git a/lib/gfximage.c b/lib/gfximage.c index b47031f..661f9cd 100644 --- a/lib/gfximage.c +++ b/lib/gfximage.c @@ -7,6 +7,15 @@ #include "gfximage.h" #include "types.h" +gfximage_t*gfximage_new(int width, int height) +{ + gfximage_t*i = rfx_calloc(sizeof(gfximage_t)); + i->data = rfx_calloc(width*height*4); + i->width = width; + i->height = height; + return i; +} + void gfximage_save_jpeg(gfximage_t*img, const char*filename, int quality) { int x,y; @@ -155,10 +164,10 @@ void blurImage(gfxcolor_t*src, int width, int height, int r) for(y=0;y> 16; d[x].a = a >> 16; } - for(x=width-range;x> 16; yy += width; } - for(y=0;ywidth; int height = image->height;