PseudoClass image creation
Posted: 2007-06-21T08:07:20-07:00
I'm trying to create a colormapped image but I'm getting an exception and I don't know how to solve it.
I have the color indices and the colormap in memory and I just want to copy those to an Magick::Image object.
Here's my code:
Image image;
// Initialize image fields
image.size(Geometry(30, 30));
image.colorSpace(RGBColorspace);
image.classType(PseudoClass); <- This throws an exception
If I have a TrueColor image and set classType to DirectClass, everything works. The problem is only when I'm trying to create a colormapped image.
What's the correct way to do this?
All I wanted to do is to copy my indices and colormap to a Magick::Image and then do some transformations.
Any help would be greatly appreciated.
FS
I have the color indices and the colormap in memory and I just want to copy those to an Magick::Image object.
Here's my code:
Image image;
// Initialize image fields
image.size(Geometry(30, 30));
image.colorSpace(RGBColorspace);
image.classType(PseudoClass); <- This throws an exception
If I have a TrueColor image and set classType to DirectClass, everything works. The problem is only when I'm trying to create a colormapped image.
What's the correct way to do this?
All I wanted to do is to copy my indices and colormap to a Magick::Image and then do some transformations.
Any help would be greatly appreciated.
FS