Calculating the scaling between the value and the number of pixels.