using convert on a PS file, generated by GMT (Global Mapping Tool), in JPG/PNG i see strange lines. I've done some test using different software to convert the PS and the problem doesn't occour (so, i think, is a convert bug).
The PS file
Bugged conversion
convert image-by-GMT.ps -trim -density 300x300 -flatten using-convert.png
convert image-by-GMT.ps -trim -density 300x300 -flatten using-convert.jpg
Correct conversion
pstoimg -type png -antialias -aaliastext -out using-pstoimg.png image-by-GMT.ps
gs -sDEVICE=jpeg -sOutputFile="using-gs.jpeg" - < image-by-GMT.ps
using gimp to png (via GUI)
P.s.: I was using the same script on an old Debian stable (7.4) and it was working perfectly.
$ cat /etc/debian_version:
Code: Select all
9.5
Code: Select all
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
Code used to reproduce the error
Code: Select all
#!/bin/sh
SOURCE_PS=image-by-GMT.ps
gmt psbasemap -R4/20/36/48 -JM17c -Lf6.673/36.759/42.840/100.000+lkm -P -K > $SOURCE_PS
gmt pscoast -R4/20/36/48 -JM17c -S225/243/255 -Df -N1 -W0.25p -B2.5g2.5 -O >> $SOURCE_PS
pstoimg -type png -antialias -aaliastext -out using-pstoimg.png $SOURCE_PS
convert $SOURCE_PS -trim -density 300x300 -flatten using-convert.png
convert $SOURCE_PS -trim -density 300x300 -flatten using-convert.jpg
gs -sDEVICE=jpeg -sOutputFile="using-gs.jpeg" - < $SOURCE_PS
Diego