I am having a problem with an image processing app I am developing (newbie here). I am trying to extract the value of specific pixels by using the getPixel()
method.
I am having a problem though. The number I get from this method is a huge negative number, something like -1298383. Is this normal? How can I fix it?
Thanks.
I'm not an expert, but to me it looks like you are getting the hexadecimal value. Perhaps you want something more understandable like the value of each RGB layer.
To unpack a pixel into its RGB values you should do something like:
And after changes in each channel you can pack the pixel back.
Sorry if it is not what you are looking for.