Link to home
Start Free TrialLog in
Avatar of itmaniac
itmaniac

asked on

Converting pixel value (byte) to integer value

i have used the pixelgrabber to grab pixels. When i tried to work on the individual pixel value from the integer array i found the values were actually byte values something like  (-7697782). I tried to type cast these byte values to integer. It works for certain values but for certain values i get only negative value (like -180 for -7697782). How do i convert the pixel array values to numbers within the range 0 to 255. or else how do i get an integer RGB value of a pixel within the range 0 to 255.

Someone help me in this regard.
Grattitudes.
ASKER CERTIFIED SOLUTION
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CleanupPing
CleanupPing

itmaniac:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Delete - No refund

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jimmack
EE Cleanup Volunteer
I would say: Split between TimYates and mayankeagle - their explanations are enough as per the questioner's requirements.
OK.  Thanks Mayank ;-)

Correction posted to cleanup:  Split between TimYates and mayankeagle.
Please go ahead.