From: Ruby Quiz Date: 2005-10-07T22:01:55+09:00 Subject: [QUIZ] Text Image (#50) The three rules of Ruby Quiz: 1. Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. 2. Support Ruby Quiz by submitting ideas as often as you can: http://www.rubyquiz.com/ 3. Enjoy! -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= This week's Ruby Quiz is to create a tool that will allow you to preview an image file at the command-line in pure text. Your program will need to read in an image, in whatever format you want to support, and respond with a text representation of the image that fits in the terminal. For example, given the image: http://rubyquiz.com/images/Ducky.png Your program might respond with something like: ........--**####**::::::::::::........ ......--##oooooo\\**::::::::.......... ......**oo==oooo\\\\::::.............. ....--\\oooooooo\\$$**::.............. ....**&&$$oooo\\$$$$%%................ ....**\\oooo\\<<<<$$##................ ....!!<<<<<<<<<<\\\\##..........:::::: ....::%%<<<<<<<<\\$$^^....::**++**.... ....^^%%<<<<<<<<$$$$##**""==++++==**** ....**oo<<<<<<$$<<<<\\oo==++++++=="""" ..!!==oo<<<<<<<<$$$$oo====++++==oo#### ^^====oo\\<<$$\\oooooo==++======oo**** **++++====oooo====++++======oooo\\^^^^ ++====++++========++======oooooo**.... ""====++++==========oooooooooo##--.... ""==================oooooooooo^^...... !!oo==oo======oooooooooo\\##^^::...... ..""oooooooooooooooo\\oo""^^.......... ..::**====oooooooooo==**::............ ....::^^**""""""""!!..--::............ ....::^^**""""""""!!..--::............ Go for as much accuracy as you can possibly squeeze out of it.