Hi,
I am playing with PSJR and want to scan an image pixel-by-pixel, process the pixel value and then create a new image with the processed pixel values.
I am using this to read line to read the pixel values from the source image:
target_img.setSample( parseFloat( r_value ), x, y, 0);
target_img.setSample( parseFloat( g_value ) ), x, y, 1);
target_img.setSample( parseFloat( b_value ), x, y, 2);
I am reading the source image pixel value using the line:
source_img.sample(x,y)
BUT......this only returns a single value like 0.12549019607843137, so my question is how do I get the distinct R, G and B values using the sample() method as there is no way to specify which channel the sample is refering to, or exactly is this value for an RGB image.
I have looked in the documentation, on the web and in other scripts but cannot find the answer, I am probably approaching the problem from the wrong direction so any help would be appreciated.
Thanks in advance.....