pImage->blob->data not found

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
wood
Posts: 2
Joined: 2012-11-01T07:38:26-07:00
Authentication code: 67789

pImage->blob->data not found

Post 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?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: pImage->blob->data not found

Post by magick »

The blob structure associated with each image is private. Instead use ExportImagePixels() to export the image pixels in a variety of formats.
wood
Posts: 2
Joined: 2012-11-01T07:38:26-07:00
Authentication code: 67789

Re: pImage->blob->data not found

Post by wood »

It works! Thanks!
Post Reply