mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
Merge branch 'master' of github.com:gnustep/libs-gui
This commit is contained in:
commit
6101f124b8
1 changed files with 12 additions and 0 deletions
|
@ -82,11 +82,19 @@
|
|||
NSSize res;
|
||||
if (image->units == PixelsPerCentimeterResolution)
|
||||
{
|
||||
#if (MagickLibVersion >= 0x700)
|
||||
res = NSMakeSize(image->resolution.x * 2.54, image->resolution.y * 2.54);
|
||||
#else
|
||||
res = NSMakeSize(image->x_resolution * 2.54, image->y_resolution * 2.54);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#if (MagickLibVersion >= 0x700)
|
||||
res = NSMakeSize(image->resolution.x, image->resolution.y);
|
||||
#else
|
||||
res = NSMakeSize(image->x_resolution, image->y_resolution);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (res.width > 0 && res.height > 0)
|
||||
|
@ -121,7 +129,11 @@
|
|||
|
||||
// Set the background color to transparent
|
||||
// (otherwise SVG's are rendered against a white background by default)
|
||||
#if (MagickLibVersion >= 0x700)
|
||||
QueryColorCompliance("none", AllCompliance, &imageinfo->background_color, exception);
|
||||
#else
|
||||
QueryColorDatabase("none", &imageinfo->background_color, exception);
|
||||
#endif
|
||||
|
||||
images = BlobToImage(imageinfo, [data bytes], [data length], exception);
|
||||
|
||||
|
|
Loading…
Reference in a new issue