my incudes :
Code: Select all
#include <Magick++.h>
#include <MagickCore.h>
#include <string>
#include <iostream>
#include <list>
Code: Select all
std::string backGround = "xc:#ffffff";
Magick::Image img_d;
MagickCore::Image *_Image_d;
img_d.size("100x100");
img_d.texture( backGround );
const MagickCore::ChannelType channel=MagickCore::RGBChannels;
double l_doubles[] = {
30,10, 1,0,0,
10,80, 0,0, 1,
70,60, 0,1,0,
80,20, 1,0,0
};
Magick::Image img_e;
img_e = MagickCore::SparseColorImage(img_d.image(),channel ,MagickCore::VoronoiColorInterpolate, 20,l_doubles ,exception);
img_e.display( );
2) I get a blank picture when I display, I don't understand wth...
3) about the ChannelType what is the DefaultChannels, what happens when using UndefinedChannel. In my case I tried to changed the channel. Example, by using this
Code: Select all
const MagickCore::ChannelType channel=MagickCore::AllChannels ;
I think this API isn't up to date :a.out: magick/display.c:1657: DisplayImages: Assertion `images != (Image *) ((void *)0)' failed.
Abandon
http://www.imagemagick.org/api/MagickCo ... a3d9e3034a
because I watched the code of IM on my computer (downloaded last night) SparseColorImage need the ChannelType...
you have a lot of documentation full of examples about the uses of IM, and nothing about the uses of MagickCore...
I started with Magick++, but now I don't understand what's the reason to use Magick++ I still calling MagickCore. so what can does Magick++ that MagicCore can't ?