Fix compilation against ImageMagick 7.X when compiling with --enable-imagemagick

This commit is contained in:
Marco Cawthorne 2021-09-24 23:05:58 +02:00
parent 9abf2a7494
commit 092f93aed5
Signed by: eukara
GPG key ID: C196CD8BA993248A

View file

@ -82,11 +82,11 @@
NSSize res;
if (image->units == PixelsPerCentimeterResolution)
{
res = NSMakeSize(image->x_resolution * 2.54, image->y_resolution * 2.54);
res = NSMakeSize(image->resolution.x * 2.54, image->resolution.y * 2.54);
}
else
{
res = NSMakeSize(image->x_resolution, image->y_resolution);
res = NSMakeSize(image->resolution.x, image->resolution.y);
}
if (res.width > 0 && res.height > 0)
@ -121,7 +121,7 @@
// Set the background color to transparent
// (otherwise SVG's are rendered against a white background by default)
QueryColorDatabase("none", &imageinfo->background_color, exception);
QueryColorCompliance("none", AllCompliance, &imageinfo->background_color, exception);
images = BlobToImage(imageinfo, [data bytes], [data length], exception);