RGB extraction

Hello
I am trying to get RGB value of an HDR image captured with Canon camera of a light source , in (0-255) scale. I used pvalue -o -h $HDR command but the results are not on the desired range (0-255). Any suggestion is appreciated.