Pixel conversion test case

I was seeing bad endian conversions with the current code, so I added a test case to verify that pixel conversions are being correctly performed. Allowed me to pinpoint the bug and fix it.