buffor size if 1024.Your mistake is in believing that buffor[ ] and bitmap[ ] are the same. They are not the same and they are not compatible.
buffor[ ] has one byte for each pixel. Each pixel can have any one of 256 colours.
bitmap[ ] has one byte for eight pixels. Each pixel is one bit and can have only two colours, white or black.
The picture is 128x64 which in total is 8 192, now each byte has 8 bits we have in result 1024. The bitmap size is 1024 so each byte has 8 pixels, it also happens that buffor size is also 1024.
The way the buffor stores the information is also shown in post #15, which only shows that the byte is copied.
In other hand the SetPixel is very used for writing char character I won't deny because for 6x8 font used from github link, uses the 2 byte - 1 char thing and not typical 1 byte 1 char (don;t ask me why I don't know). And it has to be decoded from 2 byte into 1 byte and then sent to the buffor so the SetPixel works well there. But in DrawBitmap it is just copy and paste.
For colors it would make sense that 1 byte is just a color for 1 pixel but in the povided code it just copy and paste from provided byte to the buffor byte.
