modulate problems

Jan 23, 2014 at 8:54 PM
using Magick.NET-

just starting to test, other methods I've tested so far working fine but simple:

Modulate(new Percentage(100), new Percentage(100), new Percentage(100));

always results in black image, no matter what percentages used...using simple 24bit rgb jpg and png and bmp for testing, always same result.

and second question, is there a .command method I'm not seeing for passing imagemagick commands (-modulate 120,50,100) for methods that might not yet be implemented?

Thanks in advance and for getting this lib into the .net world.
Jan 24, 2014 at 7:42 AM
Can you add a link to the image you are using? If you don't want to publicly post this feel free to contact me through CodePlex. And can you also post a command line example? The '-modulate' command is the Modulate method.
Jan 24, 2014 at 1:24 PM
Here is quick sample code that fails for me:
MagickImage magickImage = new MagickImage(@"c:\thumb.bmp");
            magickImage.Modulate(new Percentage(90), new Percentage(100), new Percentage(100));
here is link to file used in this example:
Jan 24, 2014 at 7:40 PM
This is a bug in Magick.NET that will be fixed in the next release. You can use the following workaround that will stop working after the next release:
using (MagickImage magickImage = new MagickImage(@"c:\thumb.bmp"))
  // Assumption is the mother of all ...
  magickImage.Modulate(new Percentage(9000), new Percentage(10000), new Percentage(10000)); 
Jan 24, 2014 at 7:41 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jan 24, 2014 at 7:52 PM
Thanks for quick reply, as I continue poking around should I assume until this next release that any methods that use percentage types will be same or is this with just this method? I'll probably pass larger vals when testing to be sure if I run across another method (i.e. BrightnessContrast(percentage,percentage) before I post to be certain.
Thanks again for quick response, so far impressed with what I've tested. Good job.
Jan 24, 2014 at 7:58 PM
Edited Jan 24, 2014 at 8:47 PM
This is just a bug in the Modulate method, you should not pass larger values to other methods. It is of course possible that I made this mistake twice so please report it when you find another problem.