I am trying to port this convert command to the MagickWand API:
Code: Select all
convert ~/input.png \( +clone -blur 0x6 \) +swap -compose divide -composite -linear-stretch 15%x0% ~/output.png
Code: Select all
// magick_wand contains the input.png data
MagickWand *blur_wand = CloneMagickWand(magick_wand);
MagickBlurImage(blur_wand, 0.f, 6.f);
MagickSetImageCompose(magick_wand, DivideCompositeOp);
float blackPt = rows * cols * 0.15f;
MagickLinearStretchImage(blur_wand, blackPt, 0.f);
MagickCompositeImage(magick_wand, blur_wand, DivideCompositeOp, 0, 0);
blur_wand = DestroyMagickWand(blur_wand);
I confirmed that the blur and linear stretch both look the same as what is being performed from the convert command, so that makes me suspect the composite command as well.
Any suggestions would be greatly appreciated!