ofImage has getPixels() which will return everything, but I wanted to just get one pixel, without creating a new temporary pixels list to copy into for then getting that one pixel.
What do you think about adding this?
unsigned char ofImage::getPixelNum(int num){
if (IMG->isValid()){
return (unsigned char)IMG->pixels[num];
} else {
return NULL;
}
}
The trouble is, with colour and alpha images, there are more values per pixel, but thats down to the coder to pull in the right pixel values.