Page 1 of 1

gray value, magick++

Posted: 2006-06-17T08:54:34-07:00
by mrjvak
Hi,
Why don't I get values between 0-255 in:

Image test_image;
test_image.read( "DSC_0005_test.JPG" );

test_image.type( GrayscaleType );

const PixelPacket* pixel_cache= test_image.getConstPixels( x, y, width(), height());

double value = pixel_cache[ c+(r*tpl_geo.width())].red ); <=== !

many thanks for advice!!
Joakim