[Shake-dev] Problem converting ps files to jpg [SEC=UNCLASSIFIED]
Bruce Worden
cbworden at caltech.edu
Sun Jan 9 18:04:46 UTC 2011
HI Trevor,
There is an alternate solution. Go back to using ImageMagick's
'convert' program, then edit <shake_home>/src/genexlib/JpgMaps.pm.
Around line 100 you will find:
if ($main::convert =~ /gm/) {
$command= "PATH=\$PATH:$main::convertpath; export PATH; "
. "$main::convert -colorspace RGB -quality $quality
$crop "
. "$ps $jpg";
} else {
$command= "PATH=\$PATH:$main::convertpath; export PATH; "
. "$main::convert -colorspace RGB -quality $quality
$crop "
. "$ps $jpg";
# . "-density 144 -resize 50% +antialias $ps $jpg";
Comment out the second to last line, and un-comment the last line.
Save and do a 'make'. This usually helps with the ugly text, but some
systems gag on the command.
Bruce
On Jan 6, 2011, at 3:22 PM, <Trevor.Allen at ga.gov.au> <Trevor.Allen at ga.gov.au
> wrote:
> Thanks Bruce,
>
> I tried implementing graphicsmagick last night, but it didn’t appear
> to make any difference. On the contrary, it actually made the
> situation worse. I could open the jpgs using gm display, but they
> would not open in Preview or the web browser. In any case, when I
> did open them, the quality wasn’t any better anyway. So I’ll
> probably revert back to ImageMagick.
>
> There were a few graphicsmagick configuration issues that I tried
> fixing (i.e., it couldn’t find ghostscript initially), but there may
> be more that I didn’t check. I’ll try again tonight, but I’m not
> hopeful.
>
> I guess it’d be no fun if it were too easy! ;o)
>
> T
> From: Bruce Worden [mailto:cbworden at caltech.edu]
> Sent: Friday, 7 January 2011 3:40 AM
> To: Allen Trevor
> Subject: Re: [Shake-dev] Problem converting ps files to jpg
> [SEC=UNCLASSIFIED]
>
> Hi Trevor,
>
> As Gabe said, using graphicsmagick and setting the "convert"
> parameter in genex.conf to something like:
>
> convert : /usr/local/bin/gm convert
>
> can help with the problem.
>
> In general, I've never figured out why some users on some systems
> have this problem and others don't.
> It appears to be caused by some combinations of OS, GhostScrips,
> ImageMagick and/or the libraries
> that it uses to make JPEGs. We have tried various command line
> options for convert, some of which
> solve the problem on some systems, but they also have a tendency to
> not work on other systems. So
> far we have not found a fully general solution, but if someone comes
> up with one, I'd be happy to
> include it. As it stands, using graphicsmagick seems the best
> alternative.
>
> Bruce
>
> On Jan 5, 2011, at 2:46 PM, <Trevor.Allen at ga.gov.au> wrote:
>
>
> Hi all,
>
> Firstly, happy New Year to all!
>
> Now to the problem. I’ve just installed V3.5 locally on my mac and
> am using the “convert” function from ImageMagick-6.6.5. The code
> runs through properly and the ps files look perfect. However, in
> the conversion process the resulting jpg files appear quite blocky
> and are quite poor in resolution. I’ve tried adjusting the jpg
> compression quality factor in genex.config, but all this does is
> change the file size. My colleagues in Indonesia are experiencing
> the same problem and I have attached an example of one of their
> ShakeMaps.
>
> Has anyone else experienced this? If so, any thoughts on how to fix
> the problem would be appreciated!
>
> Thanks,
> Trev
>
> --
> Trevor Allen
> Earthquake Seismologist
> Risk and Impact Analysis & Earth Monitoring Groups
> Geospatial & Earth Monitoring Division
> Geoscience Australia
>
> T +61 2 6249 9359 | F +61 2 6249 9986
> Physical Address: Cnr Jerrabomberra Ave & Hindmarsh Drv Symonston
> ACT 2609 Australia
> Postal Address: GPO Box 378 Canberra ACT 2601 Australia
>
> <intensity.jpg>
> _______________________________________________
> Shake-dev mailing list
> Shake-dev at geohazards.usgs.gov
> https://geohazards.usgs.gov/mailman/listinfo/shake-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://geohazards.usgs.gov/pipermail/shake-dev/attachments/20110109/568d5467/attachment-0001.html>
More information about the Shake-dev
mailing list