I mean you can open it in Paint, pick color, edit color and read the number.
As for what that number means: depends on the camera response. Should be proportional to power, but if there's any log or gamma correction going on, it'll be different.
Yes, digital graphics are gamma coded to increase dynamic range per byte. This could be decoded and accounted for, but there is a bigger problem.
Cameras apply a nonlinear "tone curve" which squashes everything "too dark" or "too bright" into the few lowest/highest values available in the output format and maps the middle somewhat linearly or maybe not entirely so. The only truly linear format suitable for comparative measurements is so-called "raw", which is a camera-specific, unprocessed sequence of readouts from the digitizing ADC.