-channel

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

-channel

Post by GreenKoopa »

-channel applies to -fx, but not -poly or -average. Is there reason?

Code: Select all

convert -size 500x500 xc:#F00 xc:#0FF -channel B -average ave.png
convert -size 500x500 xc:#F00 xc:#0FF -channel B -poly "0.5,1 0.5,1" poly.png
convert -size 500x500 xc:#F00 xc:#0FF -channel B -fx "(u+v)/2" fx.png
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -channel

Post by fmw42 »

use -channel b -separate for those other cases
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

Re: -channel

Post by GreenKoopa »

Sure, I could do this:

Code: Select all

convert -size 500x500 xc:#F00 xc:#0FF   ( -clone 0-1 -average ) -delete 1 -compose Copy_Blue -composite x.png
So -fx and -level supporting -channel is unnecessary. But it sure is convenient, so why the difference?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -channel

Post by fmw42 »

As far a I know only some functions support the channel flag. Most were retrofit at needed. I don't think the channel flag was a part of IM 6 originally except in connection with -separate.

But the IM developers can explain further or correct me if needed.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: -channel

Post by magick »

Many of the image filters support -channel in ImageMagick version 6. Channels are fully integrated into version 7, meaning any image filter, where it makes sense, supports a channel mask.
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

Re: -channel

Post by GreenKoopa »

Thank you for the past history and future roadmap. All of your efforts are much appreciated!
Post Reply