This project has moved. For the latest updates, please go here.

Maby problem with Composite

Dec 1, 2015 at 4:15 PM
Edited Dec 1, 2015 at 4:16 PM
Hi all,

It's my first post because it's my first project.

I must change color for image on one website. I user .NET c#.

I want convert this command :
convert 'test.jpg' \( -clone 0 -fill 'red' -colorize 100% \)  \( -clone 0 -modulate 100,0,100 -solarize 50% -level 0,50% -evaluate multiply 0.2 \) -compose overlay -composite 'myOutput.jpg'
It's work fine for me cmd line.

If I convert this line in C#:
var image = new MagickImage("test.jpg");

var clone0_1 = image.Clone();
var clone0_0 = image.Clone();

clone0_0.Colorize(new MagickColor(Color.Red), new Percentage(100));

clone0_1.Modulate(new Percentage(100), new Percentage(0), new Percentage(100));
clone0_1.Solarize(new Percentage(50));
clone0_1.Level(new Percentage(0), new Percentage(50));
clone0_1.Evaluate(Channels.Default, EvaluateOperator.Multiply, 0.20);

image.Composite(clone0_0, CompositeOperator.Overlay);
image.Composite(clone0_1, CompositeOperator.Overlay);

image.Write("myOutput.jpg");
... I don't have the same output. I don't understand why.

Can you help me please ?

Thanks you very much

Stc
Coordinator
Dec 1, 2015 at 9:39 PM
Your output is probably from an ImageMagick 6 version of convert. Magick.NET uses ImageMagick 7 and it seems that this is bugged in IM7. I am getting a 'reddish' image with ImageMagick 7. We will have to track down the bug in IM7 and get back to you when this has been fixed.
Dec 2, 2015 at 8:30 AM
Hi,

+1 for you.

Exactly, I use convert >version 6.7.3-4 and Magick.Net is version 7.0

I wait the correction.

Thanks you very much
Coordinator
Dec 4, 2015 at 10:08 AM
It might take a while before we get back to you. We are currently swamped at work.