Unusual Colours
Posted: Sun Oct 24, 2010 4:57 pm
Challenge is at: http://www.hacker.org/challenge/chal.php?id=207
I'm writing a PNG reader at the moment, and I was wondering if I had the Background right on the picture clrs.png which makes up this challenge. The Background chunk consists of one byte, 0x00, which (because the colour type is 3, indicating referenced colour) references the Palette colour at index 0. This, as I read it, is the colour RGB=0,0,0 which is black. I know that the renderer doesn't actually have to use this background colour (it's an ancillary chunk), but it just looks like it should be some sort of white colour (such as the one at index 2 which is RGB 247,247,247).
Or is it that the text is represented by the background? I'm a bit confused - please help!
I'm writing a PNG reader at the moment, and I was wondering if I had the Background right on the picture clrs.png which makes up this challenge. The Background chunk consists of one byte, 0x00, which (because the colour type is 3, indicating referenced colour) references the Palette colour at index 0. This, as I read it, is the colour RGB=0,0,0 which is black. I know that the renderer doesn't actually have to use this background colour (it's an ancillary chunk), but it just looks like it should be some sort of white colour (such as the one at index 2 which is RGB 247,247,247).
Or is it that the text is represented by the background? I'm a bit confused - please help!