}
}
+ rfx_free(scanline);
swf_SetJPEGBitsFinish(out);
jpeg_finish_decompress(&cinfo);
fclose(f);
#ifdef HAVE_ZLIB
if(offset) {
- U32 datalen = cinfo.output_width*cinfo.output_height;
+ uLongf datalen = cinfo.output_width*cinfo.output_height;
U8* alphadata = (U8*)rfx_alloc(datalen);
int error;
tag->len = oldtaglen;
RGBA *swf_DefineLosslessBitsTagToImage(TAG * tag, int *dwidth, int *dheight)
{
int id, format, height, width, pos;
- U32 datalen, datalen2;
+ uLongf datalen, datalen2;
int error;
int bpp = 1;
int cols = 0;
swf_SetJPEGBits2(tag2, width, height, mem, quality);
}
- if(tag1 && tag1->len < tag2->len) {
+ if(quality>100 || (tag1 && tag1->len < tag2->len)) {
/* use the zlib version- it's smaller */
tag1->prev = tag;
if(tag) tag->next = tag1;