Thanks for the extremely detailed tutorial about how to learn C++ by making ASCII art! I am sure this will help lots of beginners who know nothing about C++ at all :)
EDIT: oh, my brain inserted a "through" between "C++" and "ACSII" in the title, nevermind...
I'm slightly confused as to why a function called 'diamond' draws a picture of tweety pie. You could've told me the function name and given me a million attempts to guess what it does, not once would I have guessed that.
I was at work doing school work at first and then finally understood functions. At first i was foolin with my diamond proggy i had and eventually made this ascii art and the name stayed the same. Its c++ related because i used it in a sense of a function to call the art. and its the lounge so i thought i could show some fun with ascii art. just fun and games with what i recently learned.
An extremely easy route with the image to ascii is to output characters based on the rows of the image, and only output a character if the opacity of that pixel is 255 (or transparency is 0), I actually did this a couple weeks ago!
You will still need the relevant image library in dissecting the image file. I believe jpg,gif,png etc format mandate certain headers (correct?) inside the image file. Once you get past that part, the rest would be reading array of bytes and yes ultifinitus way is feasible.
@ultifinitus,
Surely if the opacity is < 255 you should output a space? You could also use a different character for different opacities.
@sohguanh,
You don't particularly need to support every image type and all you need from the file header is the width, height and colour depth of the image.