From c39e3d60dbc930c10a6020600d280d7cab6dfb8b Mon Sep 17 00:00:00 2001 From: cristy Date: Thu, 14 Oct 2010 16:52:01 +0000 Subject: [PATCH] --- ChangeLog | 3 +++ coders/ps.c | 17 +++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 777271765..756fb2655 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2010-10-14 6.6.5-1 Cristy + * Ignore PS bounding box offsets if -page is set. + 2010-10-12 6.6.5-0 Anthony Thyssen * Added "filter:sigma" expert setting defining the 'sigma' for the Gaussian filter only. This is similar in action to 'blur' but only for Gaussians, diff --git a/coders/ps.c b/coders/ps.c index 82eeac815..e723ec5a3 100644 --- a/coders/ps.c +++ b/coders/ps.c @@ -341,8 +341,7 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception) geometry[MaxTextExtent], input_filename[MaxTextExtent], options[MaxTextExtent], - postscript_filename[MaxTextExtent], - translate_geometry[MaxTextExtent]; + postscript_filename[MaxTextExtent]; const char *option; @@ -689,10 +688,16 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception) "dup wcheck {3 1 roll put} {pop def} ifelse} {def} ifelse\n" "<>setpagedevice\n",MaxTextExtent); count=write(file,command,(unsigned int) strlen(command)); - (void) FormatMagickString(translate_geometry,MaxTextExtent, - "%g %g translate\n",-bounds.x1,-bounds.y1); - count=write(file,translate_geometry,(unsigned int) - strlen(translate_geometry)); + if (image_info->page == (char *) NULL) + { + char + translate_geometry[MaxTextExtent]; + + (void) FormatMagickString(translate_geometry,MaxTextExtent, + "%g %g translate\n",-bounds.x1,-bounds.y1); + count=write(file,translate_geometry,(unsigned int) + strlen(translate_geometry)); + } file=close(file)-1; /* Render Postscript with the Ghostscript delegate. -- 2.40.0