Page 1 of 1

IM7 Creating User Channels with Channel FX

Posted: 2014-01-09T04:57:35-07:00
by Alan Hadley
I would like to give the user of my program a chance to add user channels to an image by specifying the number they need. So I am building a Channel FX command string in C++ and I have discovered an oddity, am I doing something wrong, is this by design or is it a bug? My code looks like this:-

char s[256]="",s1[16];
strcpy_s(s,256,"r|g|b|a");
int i;
if(user_channels>24) user_channels=24;
for(i=0; i<user_channels; i++)
{
if(i==0) sprintf_s(s1,16,"|a=>%d",i+8);
else {
if(i<5) continue;
sprintf_s(s1,16,"|a=>%d",i+4);
}
strcat_s(s,s1);
}

This is more complex than it needs to be because adding one extra channel with "...|a=>8" always adds five. Adding one more using "...|a=>8|a>9" adds one more channel making six in all. This means I can not add 1, 2, 3 or 4 user channels, 5 is the minimum.

Also is there a simple way of creating thes user channels initialized to a constant "...|8=0" does not add a new channel.

Alan Hadley

Re: IM7 Creating User Channels with Channel FX

Posted: 2014-01-09T05:22:39-07:00
by magick
ImageMagick 6 series is limited to 5 channels. ImageMagick 7 series permits up to 32 channels. ImageMagick 7 is in beta right now and probably won't be released for several more years.

Re: IM7 Creating User Channels with Channel FX

Posted: 2014-01-09T07:07:56-07:00
by Alan Hadley
Yes I noticed that the probable release date was getting further into the future, no problem. I have not released my prog for testing to anyone yet and when I eventually do I will emphasise that it and IM are not ready for final release, I hope to synchronize its official release with that of IM.

In the mean time is this still the best place to post comments about the Beta version of IM? I am using the Core interface.

Alan

Re: IM7 Creating User Channels with Channel FX

Posted: 2014-01-09T07:45:17-07:00
by magick
Posting about IMv7 here is fine. We'll need to investigate your issue further and get back to you.