Code: Select all
Magick::Image *imagePtr = new Magick::Image( "images/horse.jpg" );
Magick::Pixels view( *imagePtr );
Magick::Quantum *pixels = view.get( 0, 0, imagePtr->columns(), imagePtr->rows() );
unsigned int r = 255 * QuantumScale * ( *( pixels + 0 ) );
Code: Select all
const Magick::Quantum *pixels = view.getConst( 0, 0, imagePtr->columns(), imagePtr->rows() );
unsigned int r = 255 * QuantumScale * ( *( pixels + 0 ) );
ImageMagick 7.0.5-2 Q16 x86_64 2017-03-11