Computer Science Canada Image to Ascii |
Author: | Saad [ Sat Mar 01, 2008 12:34 am ] |
Post subject: | Image to Ascii |
This program allows you to read in a picture and convert it into ASCII Art. Gradient.txt is sorted by from character for darkest shade to lightest shade. The pixel width is inversely proportional to the size of output, meaning the greater pixel size the smaller the output Saad |
Author: | LaZ3R [ Sat Mar 01, 2008 12:59 am ] |
Post subject: | RE:Image to Ascii |
Very sweet ![]() Code please? ![]() |
Author: | Saad [ Sat Mar 01, 2008 1:19 am ] | ||
Post subject: | Re: Image to Ascii | ||
Strange I thought I added the code, but anyway here it is.
|
Author: | Silinter [ Sun Mar 02, 2008 4:42 pm ] | ||
Post subject: | Re: Image to Ascii | ||
Did anyone pick up the error at
inFileName and outFileName should have an " : * " after it since the name might have a space in it Other then that, great job! The converted pictures look really nice! |
Author: | fishtastic [ Sun Mar 02, 2008 9:36 pm ] |
Post subject: | RE:Image to Ascii |
cool and fun program. remind me of Ascii Art Converter that took me a while to download. var c := r * 0.3 + g * 0.59 + b * .11 this line is interesting. it seems like green darker than red and red is darker than blue. |
Author: | Saad [ Sun Mar 02, 2008 9:42 pm ] |
Post subject: | Re: Image to Ascii |
@ Silenter, Thanks I forgot about the spaces @ Fishtastic, That line is to convert an image to Grayscale. Taken straight from wikipedia Quote: To convert any color to its most approximate level of gray, first one must obtain the values of its red, green and blue (RGB) primaries.
Then, add 30% of the red value, 59% of the green value, and 11% of the blue value, together. Regardless of the scale employed (0.0 to 1.0, 0 to 255, 0% to 100%, etc.), the resultant number is the desired gray value. These percentages are chosen due to the different relative sensitivity of the normal human eye to each of the primary colors (less sensitive to green, more to blue). |