Are those measurements of the exact same pixel? Because if so, they don’t make any sense. I see a green value go from 18 to 49 and a blue value from 42 to 49. That would imply different conversion parameters per color channel. Also, if it were a gamma related problem, the value 255 would still be 255 after conversion. Same for 0, which seems to go to 117(!) in your measurements.
Could you perhaps share the code that creates the screenshot? Because this is very fishy.
PS: normally, you’d only need gamma conversion when reading a JPG texture (they tend to be stored in sRGB), which would be done like this:
vec3 linearRGB = pow( texture( uTex, vTexCoord ).rgb, vec3( 2.2 ) );
and then again as the very last step of your shader, just before outputting to the main buffer:
fragColor.rgb = pow( linearRGB, vec3( 1.0 / 2.2 ) );
(in this sample I use a gamma value of 2.2. You could also simplify by using 2, in which case you can multiply the color with itself to linearize it and take the
sqrt of the color to convert it back to non-linear color).