You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by @AnsleyManke on 23 Jan 2004 22:00 UTC
Report by Dan Hodson, <dan@met.reading.ac.uk> 1/22/2004
Hi,
I've come across what appears to be a small bug in gksm2ps Mod 1.06
(I think this is the version distributed with Ferret 5.53?).
It concerns the BoundingBox that gksm2ps calculates when converting
to a postscript file.
If I run the following ferret script:
! NOAA/PMEL TMAP
! Program FERRET
! Version 5.22 - 07/27/00
! 22-Jan-04 17:55
use coads_climatology
set mode meta landscape.plt
shade SST[l=1]
cancel mode metafile
exit
and then do:
gksm2ps -R -o landscape.ps landscape.plt
and inspect the ps file:
%!PS-Adobe-1.0
%%Title: landscape.ps
%%Creator: gksm2ps Mod 1.06 / XPPLP Profile F 1.0 [oX]
%%CreationDate: 18:12:43 Thursday, 22 January 2004
%%BoundingBox: 62 18 729 593
It appears that the last two values in the BoundingBox are in the
wrong order.
If I modify the first line of landscape.ps to read
%!PS-Adobe-1.0 EPSF-1.2
and then do:
ghostview landscape.ps
Then the image is cropped incorrectly.
If I now swap the last two coordinates the BoundingBox
in landscape.ps
%!PS-Adobe-1.0 EPSF-1.2
%%Title: landscape.ps
%%Creator: gksm2ps Mod 1.06 / XPPLP Profile F 1.0 [oX]
%%CreationDate: 18:12:43 Thursday, 22 January 2004
%%BoundingBox: 62 18 593 729
and then do:
ghostview landscape.ps
Then the BoundinBox fits perfectly.
This doesn't always happen. For instance if I run this
script:
! NOAA/PMEL TMAP
! Program FERRET
! Version 5.22 - 07/27/00
! 22-Jan-04 17:55
set window/aspect=1.32
use coads_climatology
set mode meta portrait.plt
shade SST[l=1]
cancel mode metafile
exit
and then do:
gksm2ps -R -o portrait.ps portrait.plt
modify the first line of portrait.ps to read:
%!PS-Adobe-1.0 EPSF-1.2
and do:
ghostview portrait.ps
Then the BoundingBox is correct.
Is this a known issue?
This only became an issue when I attempted to convert ps
files produced using gksm2ps into gif files using the
imagemagick convert tool. This uses the BoundingBox to
work out the extent of the image when rendering postscript
to a bitmap - consequently it crops it incorrectly.
There is a worked-around; by converting to eps using ps2epsi
which appears to recalculate the BoundingBox, and then using
the epsi file. But I thought you might like to know anyway!
Cheers,
Dan
Dan Hodson CGAM, Department of Meteorology
tel: +44/0 118 378 7901 University of Reading
fax: +44/0 118 378 8905 Earley Gate, PO Box 243
www: www.met.rdg.ac.uk/~dan Reading, RG6 6BB, UK
Reported by @AnsleyManke on 23 Jan 2004 22:00 UTC
Report by Dan Hodson, <dan
@met
.reading.ac.uk> 1/22/2004Hi,
! NOAA/PMEL TMAP
! Program FERRET
! Version 5.22 - 07/27/00
! 22-Jan-04 17:55
use coads_climatology
set mode meta landscape.plt
shade SST[l=1]
cancel mode metafile
exit
%!PS-Adobe-1.0
%%Title: landscape.ps
%%Creator: gksm2ps Mod 1.06 / XPPLP Profile F 1.0 [oX]
%%CreationDate: 18:12:43 Thursday, 22 January 2004
%%BoundingBox: 62 18 729 593
%!PS-Adobe-1.0 EPSF-1.2
%!PS-Adobe-1.0 EPSF-1.2
%%Title: landscape.ps
%%Creator: gksm2ps Mod 1.06 / XPPLP Profile F 1.0 [oX]
%%CreationDate: 18:12:43 Thursday, 22 January 2004
%%BoundingBox: 62 18 593 729
! NOAA/PMEL TMAP
! Program FERRET
! Version 5.22 - 07/27/00
! 22-Jan-04 17:55
set window/aspect=1.32
use coads_climatology
set mode meta portrait.plt
shade SST[l=1]
cancel mode metafile
exit
%!PS-Adobe-1.0 EPSF-1.2
Dan Hodson CGAM, Department of Meteorology
tel: +44/0 118 378 7901 University of Reading
fax: +44/0 118 378 8905 Earley Gate, PO Box 243
www: www.met.rdg.ac.uk/~dan Reading, RG6 6BB, UK
Migrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/770
The text was updated successfully, but these errors were encountered: