gray value, magick++

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mrjvak

gray value, magick++

Post by mrjvak » 2006-06-17T08:54:34-07:00

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

Post Reply