diff --git a/ChangeLog b/ChangeLog index 21a42669b1..9ed10f0045 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-09-19 Sven Neumann + + * plug-ins/common/postscript.c (ps_open): applied a patch by Peter + Kirchgessner that solves a problem with the recognition of the + bounding box. Fixes bug #152829. + 2004-09-19 Sven Neumann * libgimpcolor/gimprgb-parse.c (gimp_rgb_parse_hex): fixed gtk-doc diff --git a/plug-ins/common/postscript.c b/plug-ins/common/postscript.c index 44fb0c4f86..0603217d2c 100644 --- a/plug-ins/common/postscript.c +++ b/plug-ins/common/postscript.c @@ -66,10 +66,11 @@ * V 1.15 PK, 04-Oct-2002: Be more accurate with using BoundingBox * V 1.16 PK, 22-Jan-2004: Don't use popen(), use g_spawn_async_with_pipes() * or g_spawn_sync(). + * V 1.17 PK, 19-Sep-2004: Fix problem with interpretation of bounding box */ -#define VERSIO 1.16 -static char dversio[] = "v1.16 22-Jan-2004"; -static char ident[] = "@(#) GIMP PostScript/PDF file-plugin v1.16 22-Jan-2004"; +#define VERSIO 1.17 +static char dversio[] = "v1.17 19-Sep-2004"; +static char ident[] = "@(#) GIMP PostScript/PDF file-plugin v1.17 19-Sep-2004"; #include "config.h" @@ -1416,10 +1417,14 @@ ps_open (const gchar *filename, { *llx = (int)((x0/72.0) * resolution + 0.0001); *lly = (int)((y0/72.0) * resolution + 0.0001); - *urx = (int)((x1/72.0) * resolution + 0.5); - *ury = (int)((y1/72.0) * resolution + 0.5); - width = *urx; - height = *ury; + /* Use upper bbox values as image size */ + width = (int)((x1/72.0) * resolution + 0.5); + height = (int)((y1/72.0) * resolution + 0.5); + /* Pixel coordinates must be one less */ + *urx = width - 1; + *ury = height - 1; + if (*urx < *llx) *urx = *llx; + if (*ury < *lly) *ury = *lly; } } }