What is the correct way to access the function BlackThresholdImage() in a c++ application?
I'm starting to use Magick++, which does not appear to have this function. I can see the function in magick\threshold.cpp, but am unsure of the correct method of accessing this function.
Googling around has not enlightened me, the function does not appear to be in the image class, or in the magick:: namespace, so rather than start hacking it in, I figured it's worth asking in here.
Thanks in advance, Rich
BlackThresholdImage() use in c++ application
Re: BlackThresholdImage() use in c++ application
Not all MagickCore methods are supported with Magick++, instead you can access MagickCore methods in Magick++ with the MagickCore namespace, e.g. MagickCore::BlackThresholdImage().
Re: BlackThresholdImage() use in c++ application
Eureka!
When using MagicCore functions on Magick++ image objects are any precautions needed to make the image object aware that the underlying image may have changed? From the looks of things, so long as I call modifyImage() before using the MagickCore function I should be fine?
Thank you!
When using MagicCore functions on Magick++ image objects are any precautions needed to make the image object aware that the underlying image may have changed? From the looks of things, so long as I call modifyImage() before using the MagickCore function I should be fine?
Code: Select all
Magick::Image test_image;
// .. load up image here
image_test.modifyImage();
MagickCore::BlackThresholdImage( test_image.image(), "25%" );
Thank you!
Last edited by rich2449 on 2010-03-18T12:27:40-07:00, edited 1 time in total.
Re: BlackThresholdImage() use in c++ application
It wouldn't hurt to call modifyImage() but I believe modifyImage() was introduced before we had a robust implementation of reference counted image objects.
Re: BlackThresholdImage() use in c++ application
Thank you!
I agree, from the looks of the code calling modifyImage() should be the only function required.
Thank you again, this is great software!
I agree, from the looks of the code calling modifyImage() should be the only function required.
Thank you again, this is great software!