Commits

rude committed 4c9e0c6

Fix some pointer type conversion errors in MSVC.

Comments (0)

Files changed (2)

src/modules/image/magpie/JPEGHandler.cpp

 		throw love::Exception("Out of memory.");
 	}
 
+	unsigned long jpegSize = tjsize;
+
 	int status = tjCompress2(compressor,
 	                         img.data,
 	                         img.width, 0, img.height,
 	                         TJPF_RGBA,
-	                         &encodedimage.data, &encodedimage.size,
+	                         &encodedimage.data, &jpegSize,
 	                         TJSAMP_444, COMPRESS_QUALITY, TJFLAG_NOREALLOC);
 
 	if (status < 0)
 		throw love::Exception("Could not encode jpeg image: %s", tjGetErrorStr());
 	}
 
+	encodedimage.size = jpegSize;
+
 	return encodedimage;
 }
 

src/modules/image/magpie/PNGHandler.cpp

 {
 	int status = Z_OK;
 
-	size_t outdataSize = insize;
+	uLongf outdataSize = insize;
 	size_t sizeMultiplier = 0;
 	unsigned char *outdata = nullptr;