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