Page 1 of 1

pImage->blob->data not found

Posted: 2012-11-01T07:44:16-07:00
by wood
As there is no MagickCore section, so I post here.

class Bitmap
{
Bitmap(const char* name)
{
data = property<Bitmap, unsigned char*>(this, &Bitmap::getData, NULL);
pImageInfo = AcquireImageInfo();
strcpy(pImageInfo->filename, name);
pImage = ReadImage(pImageInfo, pExceptionInfo);
}

inline unsigned char* getData() const
{
pImage->blob->data; //I cannot access the data
}
};

Does anybody know how to solve it?

Re: pImage->blob->data not found

Posted: 2012-11-01T08:49:47-07:00
by magick
The blob structure associated with each image is private. Instead use ExportImagePixels() to export the image pixels in a variety of formats.

Re: pImage->blob->data not found

Posted: 2012-11-02T23:48:30-07:00
by wood
It works! Thanks!