[Thread Prev][Thread Next][Index]
Re: [ferret_users] vertical and horizontal lines in ps images
Hi Nuncio,
I had trouble with this before but found a work-around. Here is some info...
http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2009/msg00601.html
Basically, what worked for me was to convert the metafile to postscript then I used Imagemagick's "convert" command which has an antialias flag that will remove the lines. I had to use a very high resolution to retain the quality of the original postscript in the conversion. Here is a shell script I wrote to do some of these things. You could edit it to meet your needs. Note that without the "convert" command, this will not work.
#! /bin/tcsh
ferret -unmapped -script fourier.jnl
set file = `echo *.plt | cut -d"." -f1 `
gksm2ps -p portrait -o $file.ps $file.plt
# script to increase line weights of Ferret output
sed 's_3.000000 lw_6.000000 lw_g' < $file.ps >! foo; \mv foo $file.ps
sed 's_2.000000 lw_4.000000 lw_g' < $file.ps >! foo; \mv foo $file.ps
sed 's_1.000000 lw_2.000000 lw_g' < $file.ps >! foo; \mv foo $file.ps
#I converted the .ps files to .pdf in here, you could try with just .ps, though
foreach fig (`ls -1 *.pdf`)
set file = `echo $fig | cut -d"." -f1 `
convert -density 1500x1500 +antialias $file.pdf $file.png #this is the key line
#could go back to .pdf or .ps here
end
Steve
----- Original Message -----
From: nuncio@xxxxxxxxx
Date: Friday, February 19, 2010 5:26 pm
Subject: [ferret_users] vertical and horizontal lines in ps images
To: ferret <ferret_users@xxxxxxxx>
> Hi users,
> I converted the metafile.plt to ps images using gksm2ps
> command, the resulting image when opened in gv shows numerous, thin
> vertical and horizontal white lines. Is it possible to remove this?
> thanks
> nuncio
>
=======================================================
Stephen R. Guimond
Graduate Research Assistant
Florida State University
Center for Ocean-Atmospheric Prediction Studies (COAPS)
=======================================================
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement