Image constructor throws exception
Posted: 2009-11-06T14:45:59-07:00
Greetings
I am trying to create a new image following the example(s) on the web page documentation:
char* data;
size_t data = columns*rows;
data = (char*) new char[data_size];
Magick::Image image(columns, rows, "RGB", (MagickCore::StorageType)0, data);
I get the error: ImageMagick: unrecognized pixel map 'RGB'
This seems like it should at least create the object. The pixel buffer may not be correct.
Is there a better way to create new images? I want to create some synthetic images to test a signal processing algorithm.
Cheers
Mike
I am trying to create a new image following the example(s) on the web page documentation:
char* data;
size_t data = columns*rows;
data = (char*) new char[data_size];
Magick::Image image(columns, rows, "RGB", (MagickCore::StorageType)0, data);
I get the error: ImageMagick: unrecognized pixel map 'RGB'
This seems like it should at least create the object. The pixel buffer may not be correct.
Is there a better way to create new images? I want to create some synthetic images to test a signal processing algorithm.
Cheers
Mike