Magick++ does not create expected background color
Posted: 2010-03-22T14:59:17-07:00
As far as I can tell from the documentation the following code should produce a black image, with the red pixel in the center.
However the image produced has a light grey background color, RGB(205,205,205).
I'm sure I'm missing something here.... but why is the background not black, as specified in the constructor to the image object?
Thanks in advance, Rich
Code: Select all
// create image with dimensions of 320x200 pixels, set background color to black
Magick::Image image( Magick::Geometry( 320, 200 ), Magick::Color( 0,0,0 ) );
// set pixel roughly in middle to red
image.pixelColor( 160, 100, Magick::Color( "red" ) );
// write out as png image
image.write( "test.png" );
I'm sure I'm missing something here.... but why is the background not black, as specified in the constructor to the image object?
Thanks in advance, Rich