Unrecognized pixel map
Posted: 2009-08-28T01:24:54-07:00
Hi all, this is my first post in this forum, and i am a newbe of image magick.
I'm using magick++ in order to get image data from a buffer in memory, but i get an exception "Unrecognized pixel map".
Fllow my code:
In the ctor of Image class i got the exception explaied before;
Anyone can help me?
Best regards
I'm using magick++ in order to get image data from a buffer in memory, but i get an exception "Unrecognized pixel map".
Fllow my code:
Code: Select all
unsigned long imageSize;
char* imageData=NULL;
unsigned long width, height;
int bitCount;
bitCount = 24;
width = 100
height = 100;
imageSize = (((width*bitCount) + 31)/32*4)*height;
imageData = new char[imageSize];
//a blank image
memset(imageData,255,sizeof(char));
std::string map("RGB");
Magick::Image image(width,height,map,MagickCore::IntegerPixel ,(void *)imageData); <-- execption throws here
In the ctor of Image class i got the exception explaied before;
Anyone can help me?
Best regards