As part of my LEGO robotics project, I'm implementing image handling for various boards' frame buffers (EVB and EV3 in the first instance).
Both are working as far as manual testing of rendered images goes, but automated testing has shown up a weird problem. This is best illustrated by looking at the input and golden images for the tests. (small images for debugging - golden images are generated via[1] - png encoding an RGB565 image). https://github.com/ev3go/evb/blob/master/testdata/corner.png https://github.com/ev3go/evb/blob/master/testdata/corner-565.png There are clear defects in the corner-565.png. Zooming you see the same defects. https://github.com/ev3go/evb/blob/master/testdata/black.png https://github.com/ev3go/evb/blob/master/testdata/black-565.png Though doing the direct round trip of an image through an RGB565 gets back the pixels in a state that you would expect, shown here in the playground snippet: https://play.golang.org/p/UCwE4YJk21 Here you can see that this image.RGBA converted to an RGB565 and then png encoded renders correctly: https://play.golang.org/p/bopuF5cLFl But if the same image is read in via a png decode, it renders incorrectly (it shows up white here): https://play.golang.org/p/8Z429vCUIM Any suggestions about what I'm missing here? [1]https://github.com/ev3go/evb/blob/master/lcd_test.go#L49 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.