Description
The Gameboy stores tiles as 2 bit-per-pixel 8x8 images, thus 16 bytes. Every two bytes is a complete row with all of the Low-bits of each pixel in the first byte, and all of the High-bits of each pixel in the second.
Input
Input will be exactly 16 bytes, received through Standard IO in one of the following forms:
- Array of bytes or strings
- 16 byte string
Per the Standard IO, these may be in a language convenient form (Deliminated string, on the stack, etc.)
Output
An image, Rendered or Saved, of the Gameboy Tile.
Scale and Aspect Ratio of each pixel is not fixed.
Each 2 bit colour of the Pallet may be anything so long as the Manhattan Distance of the RGB256 representation is atleast 48. Eg. #FFFFFF, #AAAAAA, #555555, #000000. Traditionally, although not a requirement, 00 is the lightest colour, and 11 is the darkest.
Examples
[FF, 00, 7E, FF, 85, 81, 89, 83, 93, 85, A5, 8B, C9, 97, 7E, FF]
A Pokemon Window
[7C, 7C, 00, C6, C6, 00, 00, FE, C6, C6, 00, C6, C6, 00, 00, 00]
The letter A
Final Notes
- Standard Loopholes apply
- An online demo, and more in-depth explanation of the implementation can be found HERE
- This is code-golf, so fewest bytes wins! (The Gameboy only had 65536 bytes of Address Space, after all!)
- Have Fun!
N, 30 characters:b8zK2ApeZt.JBA_sjE"P2 8 8 3"ZN\$\endgroup\$N, 29 chars (≈ 23.87 bytes if you're still doing that):"P2 8 8 3"ZKb8zK2ApeZt.JBA_sj\$\endgroup\$