Page 1 of 1

processing keeping the alpha channel

Posted: 2012-08-18T17:21:55-07:00
by fmw42
Using this image at http://i50.tinypic.com/110ke9i.png in IM 6.7.9.0 Q16 Mac OSX Snow Leopard

This works fine:

convert 110ke9i.png -background black -alpha background \
\( -clone 0 -alpha off -median 7x7 \) \
\( -clone 0 -alpha extract \) \
-delete 0 -alpha off -compose copy_opacity -composite 110ke9i_new.png

But neither of these seem to work. They seem to lose the alpha channel. What am I missing or misunderstanding?

convert 110ke9i.png -background black -alpha background -alpha off -median 7x7 -alpha on 110ke9i_new2.png

convert 110ke9i.png -background black -alpha background -channel rgb -median 7x7 -channel rgba -alpha on 110ke9i_new2.png

Re: processing keeping the alpha channel

Posted: 2012-08-18T17:58:53-07:00
by magick
You'll need to add -channel rgba before the -median option plus a patch is needed. Look for it in ImageMagick 6.7.9-1 Beta, available sometime tomorrow.

Re: processing keeping the alpha channel

Posted: 2012-08-18T18:01:42-07:00
by fmw42
magick wrote:You'll need to add -channel rgba before the -median option plus a patch is needed. Look for it in ImageMagick 6.7.9-1 Beta, available sometime tomorrow.
No rush.

Why the need for -channel rgba as I do not want to filter the alpha channel? So I thought I either needed to turn off alpha or restrict the median to -channel rgb

Also I note that I get the same bad result from -statistic median 7x7.