dest->pub.term_destination = JPEG_Mem_TermDestination;
dest->outfile = NULL;
- dest->buffer = buf;
+ dest->buffer = (unsigned char *) buf;
dest->bufsize = bufsize;
}
if(strlen(imagename) >= MAX_QPATH)
return; // can't add this
- i = Z_Malloc(sizeof(CompressedImageCacheItem));
+ i = (CompressedImageCacheItem*) Z_Malloc(sizeof(CompressedImageCacheItem));
strlcpy(i->imagename, imagename, sizeof(i->imagename));
i->maxsize = maxsize;
i->compressed = compressed;
Image_MipReduce32(imagedata, imagedata, &image_width, &image_height, &one, image_width/2, image_height/2, 1);
}
- newimagedata = Mem_Alloc(tempmempool, image_width * image_height * 3);
+ newimagedata = (unsigned char *) Mem_Alloc(tempmempool, image_width * image_height * 3);
// convert the image from BGRA to RGB
Image_CopyMux(newimagedata, imagedata, image_width, image_height, false, false, false, 3, 4, components);
// try to compress it to JPEG
*buf = Z_Malloc(maxsize);
- *size = JPEG_SaveImage_to_Buffer(*buf, maxsize, image_width, image_height, newimagedata);
+ *size = JPEG_SaveImage_to_Buffer((char *) *buf, maxsize, image_width, image_height, newimagedata);
if(!*size)
{
Z_Free(*buf);