int width = *_width = cinfo.output_width;
int height = *_height = cinfo.output_height;
- *dest = malloc(width*height*4);
+ *dest = (unsigned char*)malloc(width*height*4);
int y;
for (y=0;y<height;y++) {
jpeg_finish_decompress(&cinfo);
jpeg_destroy_decompress(&cinfo);
+ fclose(fi);
return 1;
}