Create Images on a SD Card

Hello guys,
my question is whether it's possible to create any kind of image (png, raw, jpg or another format) with the arduino and then save it on an attached SD card.
So for example I want to make an image with 12x12 pixels, tell the arduino which pixels are red/blue/green and then save that created picture on the card.
I searched a lot on the Internet but haven't found anything yet..
Thanks for your help !
Greetings,
Max

my question is whether it's possible to create any kind of image

Yes it is possible. However restrictions apply e.g. some compressionschemes might be too complex

Check - BMP file format - Wikipedia - and - Writing an array to a BMP file - C++ Forum

should get you started.