+#include <stdlib.h>
#include <math.h>
#include <memory.h>
#include "jpeg.h"
#include "gfximage.h"
#include "types.h"
-void gfximage_save_jpeg(gfximage_t*img, int quality, const char*filename)
+void gfximage_save_jpeg(gfximage_t*img, const char*filename, int quality)
{
int x,y;
int l = img->width*img->height;
data[s+2] = img->data[t].b;
}
jpeg_save(data, img->width, img->height, quality, filename);
+ free(data);
}
void gfximage_save_png(gfximage_t*image, const char*filename)
image2->height = newheight;
return image2;
}
+
+void gfximage_free(gfximage_t*b)
+{
+ free(b->data);
+ b->data = 0;
+ free(b);
+}
+