How can I do the same as the following command line command in Perl using the ImageMagick API?
convert scotland.jpg[1x1+0+0] -depth 8 txt:
The result should look similar to this:
# ImageMagick pixel enumeration: 1,1,255,rgb
0,0: ( 48, 50, 47) #30322F rgb(48,50,47)
I found an explanation in Perl & Image::Magick, getting color values by pixel and lifted/changed the code. This works for me:
As said by brian in his answer to the linked question, you may need to reduce the depth. See the other question for details.