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
processing keeping the alpha channel
Re: processing keeping the alpha channel
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: processing keeping the alpha channel
No rush.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.
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.