Merge pull request #915 from cgohlke/patch-3

Fix segfault in TestFileJpeg.test_quality_keep on win-amd64
This commit is contained in:
wiredfool 2014-09-22 17:36:26 -07:00
commit bf22cdebd1

View File

@ -151,7 +151,7 @@ ImagingJpegEncode(Imaging im, ImagingCodecState state, UINT8* buf, int bytes)
if (context->quality > 0) {
quality = context->quality;
}
for (i = 0; i < sizeof(context->qtables)/sizeof(unsigned int); i++) {
for (i = 0; i < sizeof(context->qtables)/sizeof(unsigned int *); i++) {
// TODO: Should add support for none baseline
jpeg_add_quant_table(&context->cinfo, i, context->qtables[i],
quality, TRUE);