% January 2008 %
% %
% %
-% Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
register char
*p;
- register long
+ register ssize_t
c;
SegmentInfo
ssize_t
count;
- unsigned long
+ size_t
height,
width;
/*
Set XPS render geometry.
*/
- width=(unsigned long) (bounds.x2-bounds.x1+0.5);
- height=(unsigned long) (bounds.y2-bounds.y1+0.5);
+ width=(size_t) floor(bounds.x2-bounds.x1+0.5);
+ height=(size_t) floor(bounds.y2-bounds.y1+0.5);
if (width > page.width)
page.width=width;
if (height > page.height)
(void) ParseAbsoluteGeometry(PSPageGeometry,&page);
if (image_info->page != (char *) NULL)
(void) ParseAbsoluteGeometry(image_info->page,&page);
- (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu",
- page.width,page.height);
+ (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g",(double)
+ page.width,(double) page.height);
if (image_info->monochrome != MagickFalse)
delegate_info=GetDelegateInfo("xps:mono",(char *) NULL,exception);
else
(void) ParseAbsoluteGeometry(PSPageGeometry,&page);
if (image_info->page != (char *) NULL)
(void) ParseAbsoluteGeometry(image_info->page,&page);
- page.width=(unsigned long) (page.width*image->y_resolution/delta.x+0.5);
- page.height=(unsigned long) (page.height*image->y_resolution/delta.y+0.5);
- (void) FormatMagickString(options,MaxTextExtent,"-g%lux%lu ",
- page.width,page.height);
+ page.width=(size_t) floor(page.width*image->y_resolution/delta.x+0.5);
+ page.height=(size_t) floor(page.height*image->y_resolution/delta.y+
+ 0.5);
+ (void) FormatMagickString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
+ page.width,(double) page.height);
image=DestroyImage(image);
read_info=CloneImageInfo(image_info);
*read_info->magick='\0';
if (read_info->number_scenes != 0)
{
if (read_info->number_scenes != 1)
- (void) FormatMagickString(options,MaxTextExtent,"-dLastPage=%lu",
- read_info->scene+read_info->number_scenes);
+ (void) FormatMagickString(options,MaxTextExtent,"-dLastPage=%.20g",
+ (double) (read_info->scene+read_info->number_scenes));
else
(void) FormatMagickString(options,MaxTextExtent,
- "-dFirstPage=%lu -dLastPage=%lu",read_info->scene+1,read_info->scene+
- read_info->number_scenes);
+ "-dFirstPage=%.20g -dLastPage=%.20g",(double) read_info->scene+1,
+ (double) (read_info->scene+read_info->number_scenes));
read_info->number_scenes=0;
if (read_info->scenes != (char *) NULL)
*read_info->scenes='\0';
read_info->antialias != MagickFalse ? 4 : 1,
read_info->antialias != MagickFalse ? 4 : 1,density,options,
read_info->filename,input_filename);
- status=SystemCommand(read_info->verbose,command) != 0 ? MagickTrue :
- MagickFalse;
+ status=SystemCommand(MagickFalse,read_info->verbose,command,exception) != 0 ?
+ MagickTrue : MagickFalse;
image=ReadImage(read_info,exception);
(void) RelinquishUniqueFileResource(read_info->filename);
(void) RelinquishUniqueFileResource(input_filename);
%
% The format of the RegisterXPSImage method is:
%
-% unsigned long RegisterXPSImage(void)
+% size_t RegisterXPSImage(void)
%
*/
-ModuleExport unsigned long RegisterXPSImage(void)
+ModuleExport size_t RegisterXPSImage(void)
{
MagickInfo
*entry;