saulgoode wrote:
You can use a vector of vectors.
(define array (make-vector height (make-vector width 0)))
Thank you, that might do the job, will try it out
saulgoode wrote:
However, you should double-check your general approach. Is it possible to process the data a bit at a time, leaving the actual data "stored" in the original drawable or a copy? A channel is an extremely efficient means of storing the data, though accessing is rather slow.
To give an idea what I’m doing, for each pixel in a B&W image (excepting the edge pixels), the surrounding 8 pixels values are added then divided by 8 to get the average, this average is then compared against the value of the centre pixel which is manipulated as desired, a sort of de-noise script.
I did try processing the data in (blocks of nine pixels) but as every pixel has to have the data from each bounding pixel brought from the PB it was 4 times slower than getting each value from the PB once and setting it into a large array, then using the data in the array to perform the maths before storing the result in a second drawable.
Thanks again, will look into vector of vectors, new territory for me
Steve