Just ask. Example:
....,..
...:ND.
...MMOM.
...MM$7M. .
..8MMM7M?.
..DMMMM8N,.
..DMMMMMM..
..MMMMMM...
..7MMMM= .
.,.MMMM.
...MMMM.
. ,NMM7M....
.MNMM+M .
.......MMN7M?$$.. ...
......NMM+DM?+M......
.....~MM+?DN??M:....
....,M+O??DD??=M.....
....MND?+?O8????M....
....M+M+++?$???+D8...
.. I7?++???M?+??+M...
..,M?????7+++?????M++....
..ZM?+7MMMMM8+??+NMMMM$
,.M+?MMMMMMMMM?7MMMNNMMM....
,NZ?+MMMMMMMMM=+M:MMMMMM ...
.MMMNMDMMMMMMMMNMNMMMMMM....
:N=???MMMMMMMM+?+MMMMMM. ..
O=++?++MNMMMM=??+M~ZMIM$....
.. N+++?+?=+~++++?MMI??7MMM....
M7+++?=MMMZ??+?+?I+?++=NM. .
. N7?++?+???M=?+??+????++=M..,
.IM?+?+??+?DM=+??+?OM=???$M..
.M=?=?+=+?ODMN++=ZM+???+MMN........
.$M???M?=+M=???I?+???8MN+?DM..... .
..N+=M?MNMD+++++++?+?+=????M......
..$M?IM????+++++?NM???++????M+.....
...M=+M=?+?+?++???MD???+??+?~M7...
...~7?=M+?++?++?++I8M??+++??+?DM...
....M~?=M++?++???+??+M+???++??++M.
.....M??+M++?+?++?+??=MD?+???++?+M, .
.... .M?+?M=?++???+?+=++MZ+??+?+++8. .
...M+?+M++??+?++??++?MM==+??+++D=.....
,M~??7M?=+?++??+????D8+?=??+??M=...
...M?++?MD++??++??+???+MZ=+?+?++NM..
...~O++++DM+????+???++++8Z+=++++?MM ..
.....MN?+++8MZ++??+?????+??M?+?+?++MM..
.. ...MZ+??=?ZM??+???+++??++8MO+?++?IMM...
.. ....$M7?+???+$M++++++++++??+?MMZ+??+MM=...
.. ......MM++?+?+?OMM+++++?++???++?MMMMMMMMMD
.........NM?++?+?+~DMN?+???+??+??+MMMMMMMMM
.$M$?????+??7DMMZ+=???~MMMMMMMMMM
.. ....DM7??+??++???+~+~MMMMMMMMMMM
.........,ZMMNNZ7ZZ7$MMMMMMMMMI
... ..............,..... ... ...
....................... .....It is banana
I'll make siggy sized ASCII too.
Offline
kimmy123 wrote:
Can you do http://2.bp.blogspot.com/_j-5leje8ehE/T … achine.jpg?
It might not turn out well... I programmed my own generator in C++
Offline
Necromaster wrote:
kimmy123 wrote:
Can you do http://2.bp.blogspot.com/_j-5leje8ehE/T … achine.jpg?
It might not turn out well... I programmed my own generator in C++
Awesome! Can you copy and paste the code?
Offline
Can you do a sig sized awesome face?
Just wanna see how well your program works.
Offline
johndo77 wrote:
Necromaster wrote:
kimmy123 wrote:
Can you do http://2.bp.blogspot.com/_j-5leje8ehE/T … achine.jpg?
It might not turn out well... I programmed my own generator in C++
Awesome! Can you copy and paste the code?
It only does BMP though... I added some comments in.
// Primitive BMP to ASCII art generator
// Reads source.bmp and outputs art.txt
// Source must be 24-bit .bmp
#include <iostream.h>
#include <windows.h>
#define MAX_SHADES 10
BITMAPFILEHEADER bfh;
BITMAPINFOHEADER bih;
RGBTRIPLE *image;
DWORD written;
HANDLE hfile;
int imagesize;
char shades[MAX_SHADES] = {'#','$','O','=','+','|','-','^','.',' '};
char return1 = 0x0D;
char return2 = 0x0A;
int needle = 0;
int average_color = 0;
int main()
{
// Open a channel to source file
hfile = CreateFile("source.bmp",GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,NULL,NULL);
// Read header
ReadFile(hfile,&bfh,sizeof(bfh),&written,NULL);
ReadFile(hfile,&bih,sizeof(bih),&written,NULL);
// Read image
imagesize = bih.biSizeImage;
image = new RGBTRIPLE[imagesize];
ReadFile(hfile,image,imagesize*sizeof(RGBTRIPLE),&written,NULL);
// Close source file
CloseHandle(hfile);
// Open channel to output
hfile = CreateFile("art.txt",GENERIC_WRITE,NULL,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
// Keeping in mind the image is upside down, convert and write it
// It down-samples the image a bit in res too
for(int y = bih.biHeight-1;y >= 0;y--)
{
for(int x = 0;x < bih.biWidth;x++)
{
// Get the average color
average_color = (image[x+y*bih.biWidth].rgbtBlue+image[x+y*bih.biWidth].rgbtRed+image[x+y*bih.biWidth].rgbtGreen)/3;
// Convert to a shade of 8
average_color /= (256/MAX_SHADES);
if(average_color >= MAX_SHADES)
average_color -= 1;
// Output
WriteFile(hfile,&shades[average_color],1,&written,NULL);
//WriteFile(hfile,&shades[average_color],1,&written,NULL);
}
WriteFile(hfile,&return1,1,&written,NULL);
WriteFile(hfile,&return2,1,&written,NULL);
}
// Close handle to output
CloseHandle(hfile);
return 0;
}Offline