1) "but I'd like to know what's going on first before I resort to that"
It is not a 'last resort' kind of thing to use a library to handle stuff like this. Dealing with image file formats is not simple. If you want to know how a specific file format works, google it: "bmp file format", "png file format", "gif file format", etc. Very few formats are so simple that you can justify the time to write all your own image handlers -- especially as you could easily make a mistake and write files that don't properly conform.
If it is a matter of learning how it works, that is one thing. Go for it.
If it is a matter of just writing software that uses different image formats, use libraries. The PNG file format uses the
zlib compression library, which you would have to also rewrite (and probably fail to do correctly). Why not avoid the grief and just link to the proper libraries?
2) "cout << image returns a reference, but a reference to what?"
"Was experimenting around and wanted to see if I could recreate an image in the console."
The console is for text, not images. Your "image" object is an
ifstream, meaning that the pointer you get when you 'cout << it' is the address of the
ifstream object itself. Probably.
That said, it
is possible to draw directly on the Windows Console window -- just don't expect Windows to make any effort to preserve the image. Over at
Daniweb, member
vegaseat has done similar things to your efforts.
Here he cheats by creating a new window and drawing the image to it:
http://www.daniweb.com/software-development/c/code/216431
(I don't necessarily agree with his techniques for finding the console...)
Here he draws directly on the console window itself:
http://www.daniweb.com/software-development/cpp/code/216474
Anyway, hope this helps.