I'm doing some image processing for my work, and currently we write out a file, do some operations with convert, and then send it back to another program. To make this faster I decided to interface directly with the MagickWand API. things are going great so far.
Unfortunately I am having trouble getting the same output as I was before - though it looks to me I am using the same command
The command we use currently:
Code: Select all
convert \( -composite -compose Difference $output_dir/Masks/$setname/Background.png input.png \) \( -contrast-stretch 90%x0% \) \( -threshold 30% \) output.png
Code: Select all
MagickCompositeImage(mask, background, DifferenceCompositeOp, 0, 0);
MagickContrastStretchImage(mask, 0.90, 0);
MagickThresholdImage(mask, 0.30);
Any Advice or obvious mistakes?
Thanks
Calvin