MagickCore ingnores quality param
Posted: 2009-01-19T14:53:56-07:00
Hi,
I'm using MagickCore API in my application. The following code that resizes a jpeg image blob and applies quality was working perfectly well in 6.4.2 version. After I've upgraded API to 6.4.8 the quality param doesn't seem to be respected anymore.
Is behavior I expect has changed and I should request desired jpeg quality other way or this is a bug?
Many thanks,
Eugene.
I'm using MagickCore API in my application. The following code that resizes a jpeg image blob and applies quality was working perfectly well in 6.4.2 version. After I've upgraded API to 6.4.8 the quality param doesn't seem to be respected anymore.
Code: Select all
Image *image;
ImageInfo *imageInfo;
ExceptionInfo *ex = AcquireExceptionInfo();
imageInfo = CloneImageInfo((ImageInfo *) NULL);
strcpy(imageInfo->magick, format);
imageInfo->quality = quality;
image = BlobToImage(imageInfo, blob_ptr, blob_len, ex);
if (ex->severity != UndefinedException) CatchException(ex);
if (image == (Image *) NULL) {
return -1;
}
Image *out_img = ResizeImage(image, width, height, filter, blur, ex);
size_t imageLen;
unsigned char * outblob = ImageToBlob(imageInfo, out_img, &imageLen, ex);
if (ex->severity != UndefinedException) CatchException(ex);
if (NULL == outblob) {
return 1;
}
outblob = (unsigned char *) RelinquishMagickMemory(outblob);
Many thanks,
Eugene.