-
Sampleimage measurement of many pixels
Hello
I need to create a 10×10 matrix of numbers, each one representing the brightness of a greyscale pixel underneath it. The 10×10 pixels appear in the comp massively enlarged (in fact it’s a 900×900 pixel photoshop image made by enlarging a 10×10 image with nearest neighbour).
I can easily create a text layer with a sampleimage expression and a point control to display the red value of the underlying layer (as I mentioned, it’s a greyscale image underneath so I’m only interested in one of the RGB values). But the tricky bit is how can I replicate this easily to do all 100 pixels? Has anyone had experience of maybe using particle playground’s grid/text functions plus an expression?
I suspect I may just end up with 100 layers made manually. Not elegant, but I’d probably spend more time figuring out how to do it using expressions. Unless somebody out there has a magic suggestion?!
Thanks,
Paulred=thisComp.layer("big greyscale image").sampleImage(effect("Point Control")("Point"),[.5, .5])[0];Math.round(red*255)
