Page 1 of 1

transparent switch ignored when converting ps to png

Posted: 2012-05-30T13:41:43-07:00
by krfoot
Hi there,

I've run into a problem with convert that seems to be specific to the version of Image Magick I'm running on my machine. I'm running Fedora 15:

Linux kerfoot-lin 2.6.40.4-5.fc15.x86_64 #1 SMP Tue Aug 30 14:38:32 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

and Image Magick version:

kerfoot-lin: tiles > convert -version
Version: ImageMagick 6.6.5-10 2011-11-03 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP

I've got a http://marine.rutgers.edu/~kerfoot/pub/ ... T000000.ps file that I need to convert to png and to set the tranparent color to black. I'm using the following to do this:

> convert -trim -transparent "#000" rtofs_sshgsfc_20120530T000000.ps rtofs_sshgsfc_20120530T000000_clear.png

However, the transparency is ignored. Here's the result:
Image

The exact same command works fine on another machine I'm using with the following setup:

OS:
Linux arctic 2.6.18-238.19.1.el5xen #1 SMP Fri Jul 15 08:16:59 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
Image Magick:
Version: ImageMagick 6.2.8 10/20/10 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC

Here's the result:
Image
Any ideas on what's going on here?

thanks,
krfoot

Re: transparent switch ignored when converting ps to png

Posted: 2012-05-30T15:16:13-07:00
by fmw42
It is probably a bug in the version of IM you are using. PNG underwent some changes and improvements, but until they were all worked out there could have been bugs. Try upgrading. Your command works just fine for me on IM 6.7.7.3 Q16 Mac OSX Snow Leopard as:


convert rtofs_sshgsfc_20120530T000000.ps -trim -transparent "#000" result.png

Note the correct, IM 6 syntax, though that probably is not the issue.

see
http://www.imagemagick.org/Usage/basics/#cmdline