Do you get incoming bits of the image? Can you access a block of memory to store the image?
Each pixel is 0 or 1. This is the simplest way to do computer graphics.
String 8 bits together and you have a binary number from 0 to 255.
Store the value in one byte of memory.
You can do grayscale by assigning a few bits per pixel. Example, if you use 4 bits then value of each pixel ranges from 0 to 15.
Or assign a byte (8 bits) per pixel. Value of a pixel ranges from 0 to 255.
Color is red-green-blue. Then a pixel might use 3 bytes. One byte each for R, G, B.
Your amount of memory determines how big an image you can store.
When you want to display the image you peek each byte, read the value, and turn screen pixels on or off accordingly.
Different graphics formats have different header information at the beginning. From that point it gets real complicated.