Rick_LANL wrote:mscha wrote:Rick_LANL wrote:This image is different (compared with, say, 10 newpix ago; haven't loaded any from overnight). After loading the pixel data into Matlab, instead of the was-black-now-gray values approaching 255, now the was-black pixels have value 3, and the background is 8. Displaying the image without scaling gives a black image, not a white one. So He changed up the data instead of just scaling the black as before, now counting upon browser properties to produce a white image.
That's probably some automated optimization. Since we only have a few shades of grey left (250-255, plus 0 for the border), the image can be (and is) stored with pixel depth 4 (allows 16 colors) instead of 8 (allows 256 colors).
Interesting. But surprising, since the border is 0 and the background is/was 255, so at 4 bits, dynamic range is lost. Doesn't matter for this image, but since I'm used to treating an image as a collection of scientific data, it seems odd to throw information away like that.
Edit (to avoid double posting): there are 9 pixel values in the image (Matlab loads it as 0,1,...,8). Border is 0, foreground is 3, background is 8, values between 3 and 8 are antialiasing at the edges, 1 and 2 are in the corners of the border.
Remember, 4 bits is 16 values, 24, more than enough for that.
Added: Ah, I think maybe I misunderstood your misunderstanding. The 16 values can be any in the range 0-255; they don't have to be evenly spaced.