options[MaxTextExtent],
postscript_filename[MaxTextExtent];
- const char
- *option;
-
const DelegateInfo
*delegate_info;
flags;
PointInfo
- delta;
+ delta,
+ resolution;
RectangleInfo
page;
(void) ParseAbsoluteGeometry(PSPageGeometry,&page);
if (image_info->page != (char *) NULL)
(void) ParseAbsoluteGeometry(image_info->page,&page);
- page.width=(size_t) ceil((double) (page.width*image->resolution.x/delta.x)-
- 0.5);
- page.height=(size_t) ceil((double) (page.height*image->resolution.y/delta.y)-
- 0.5);
+ resolution=image->resolution;
+ page.width=(size_t) ceil((double) (page.width*resolution.x/delta.x)-0.5);
+ page.height=(size_t) ceil((double) (page.height*resolution.y/delta.y)-0.5);
/*
Determine page geometry from the Postscript bounding box.
*/
hires_bounds.x1,hires_bounds.y1);
(void) SetImageProperty(image,"ps:HiResBoundingBox",geometry,exception);
page.width=(size_t) ceil((double) ((hires_bounds.x2-hires_bounds.x1)*
- image->resolution.x/delta.x)-0.5);
+ resolution.x/delta.x)-0.5);
page.height=(size_t) ceil((double) ((hires_bounds.y2-hires_bounds.y1)*
- image->resolution.y/delta.y)-0.5);
+ resolution.y/delta.y)-0.5);
}
(void) CloseBlob(image);
- if (IsRGBColorspace(image_info->colorspace) != MagickFalse)
+ if (IssRGBCompatibleColorspace(image_info->colorspace) != MagickFalse)
cmyk=MagickFalse;
/*
Create Ghostscript control file.
return((Image *) NULL);
}
*options='\0';
- (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",
- image->resolution.x,image->resolution.y);
+ (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",resolution.x,
+ resolution.y);
(void) FormatLocaleString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
page.width,(double) page.height);
read_info=CloneImageInfo(image_info);
if (read_info->scenes != (char *) NULL)
*read_info->scenes='\0';
}
- option=GetImageOption(image_info,"ps:use-cropbox");
- if ((option != (const char *) NULL) && (IsMagickTrue(option) != MagickFalse))
+ if (IfMagickTrue(IsStringTrue(GetImageOption(image_info,"ps:use-cropbox"))))
(void) ConcatenateMagickString(options,"-dEPSCrop ",MaxTextExtent);
(void) CopyMagickString(filename,read_info->filename,MaxTextExtent);
(void) AcquireUniqueFilename(filename);
read_info->filename,exception);
if (IsPostscriptRendered(read_info->filename) == MagickFalse)
break;
+ read_info->blob=NULL;
+ read_info->length=0;
next=ReadImage(read_info,exception);
(void) RelinquishUniqueFileResource(read_info->filename);
if (next == (Image *) NULL)
/*
Scale relative to dots-per-inch.
*/
- if ((IsRGBColorspace(image->colorspace) == MagickFalse) &&
- (image->colorspace != CMYKColorspace))
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,sRGBColorspace,exception);
delta.x=DefaultResolution;
delta.y=DefaultResolution;