You are not logged in.
http://lunatic.no/ol/img2aschtml.php online tool is addictive
Hope it'll be useful for someone wanting to have some ASCII pics
Offline
You're right. It is addicting:
Offline
I think finally I'll make myself an avatar!
Offline
Seeing Allan's avatar so big somehow made me want to check Samurai Champloo lol. Just checked the first episode and I liked it!
Offline
@anonymous_user: Interesting choice of images...
Is there any significance in the fact that you are at the top of that pile (he says studiously avoiding any references to trinities)?
Offline
Seeing Allan's avatar so big somehow made me want to check Samurai Champloo lol. Just checked the first episode and I liked it!
You've finally attained Nirvana!
"You know what I found? Right in the kernel, in the heart of the operating system, I found a developer's comment that said, `Does this belong here?`" -- Simon Lok about Linux kernel in 2005
Reflections on the Strange and the not so Strange
http://skinwalker.wordpress.com
Offline
cool site
I did my avatar
Offline
willxtreme, that ASCII picture is very nice.
Offline
GETBACKERS!!!! I knew your avatar somehow looked familiar I've checked the first episode of that anime weeks ago and liked it too lol but I gotta see the rest of it as well as Samurai Champloo!
Offline
GETBACKERS!!!! I knew your avatar somehow looked familiar I've checked the first episode of that anime weeks ago and liked it too lol but I gotta see the rest of it as well as Samurai Champloo!
GB is a kickass show! Loved it as a kid and still rewatch sometimes. The fight scenes are very energetic and crazily addictive.
Last edited by sHyLoCk (2010-01-23 03:51:35)
Offline
Looks like the server is having trouble now. This is what happens when I try to convert an image to ascii:
Warning: fopen(tempfil.fil) [function.fopen]: failed to open stream: Permission denied in /var/www/lunatic.no/html/ol/img2aschtml.php on line 196
Warning: fputs(): supplied argument is not a valid stream resource in /var/www/lunatic.no/html/ol/img2aschtml.php on line 197
Warning: fclose(): supplied argument is not a valid stream resource in /var/www/lunatic.no/html/ol/img2aschtml.php on line 198
Invalid imageformat!
How's my programming? Call 1-800-DEV-NULL
Offline
Oh yeah it always does that if you try to open from online source. Your best bet is to upload from your HD
Offline
Offline
edit
Last edited by vampt3k (2011-05-22 19:44:41)
Offline
Awesome tool! Here's what came out for my avatar.
[edited for thumbnailness + another picture]
<-- the fullview image looks a lot better than its thumbnail for this one (it's my recent wallpaper)
Last edited by ShadowKyogre (2010-02-21 20:06:11)
For every problem, there is a solution that is:
Clean
Simple and most of all...wrong!
Github page
Offline
Everyone, please use thumbnails with links.
Offline
This is really cool. Is there not an app that does this?
That way I can work offline?
Thanks.
aview seems to be able to do the same thing, testing it now (will edit when I have tested). you can get it from aur.
Aview works, but I cant seem to get it to use colours, so everything is black and white.
Last edited by Neheb (2010-02-21 20:28:12)
Offline
This is really cool. Is there not an app that does this?
That way I can work offline?
Thanks.
Of course xyne have done something similar: http://xyne.archlinux.ca/info/tiv
Now its only a matter of time before this thread gets fully xyned.
Offline
libcaca comes with img2txt which does this kind of thing. But I guess each tool does it differently.
E.g. This is the output of img2txt for he Arch logo in the terminal...
%t
88;8
tX S8
t S88:8
t8 8t@t@@
%X88:@;@.88
%8.8.8.8t@ 88
S8 8%888t8 8t88
8@@@ 8t8.8 8.8
8t8 S88888888 88
8:@88X8888888@8X8XX8@
X@8888 888888 8;888 888
888888888888 888888.@X @@
8@888888X:888@8X8t;8 @;8888
888888 ;8;@ ;%8X%%8 8X8@:;:tX
888888.8.@:t888:8@8 S%X %@@;8:S
8.88.@ S..%88X88@8:88:%tX8.8@88:8
t :8. ;@8.8;; %@:X88 %t8.St@
t.@; 8.888:8@ tt8;888.@X8 8
t.X.88 XS8%8; S8 X88:@8:8tXS
t8..@;8tX8 ;S8 t8@8:88 :%8.t@
8. ;8;8X:@@8@;8 t.SS8 tX;S888t;
X.88 8;tS@.;%88. t8888;@:@@ 8.
tX t88888.888:;;8 t.8@ :S8.tX @%;8
8.8:@8:8;8@SS88@ X8.8.8@ t@.;@8%@
%.;@:%@.88X 8t%8;8;%t8
t.8t;@8 S8:%;88
t.X 88X8@
8 8
Of course, the original is with colors
Last edited by lolilolicon (2010-02-26 08:59:06)
This silver ladybug at line 28...
Offline
http://www.100mb.nl/
not truly ASCII art but also looking great to me.
This morning i stumbled across this site. You can just upload an image and it looks pretty nice @ www.asciify.net
very nice ASCII image
moderator edit: Welcome to the forums. The image is too large. I have replaced it with a link for you. Please read Forum Etiquette: Pasting Pictures and Code and screenshot posting rules. Thanks. --fsckd
Last edited by fsckd (2012-07-20 16:23:30)
Offline
Last edited by ivoarch (2012-07-20 16:45:17)
Offline
here is my old unmodified code.
I'm not ascii guru, excuse me for ugly dithering
#!/usr/bin/python
#encoding: utf-8
""" Konvertor obrázků na textový soubor nebo obrázek z textu
"""
try:
from PIL import Image, ImageDraw, ImageFont
except ImportError:
print("You need PIL module instaled.")
raise SystemExit
DITHER = {'4col' : '@#Hh',
'8col' : '@@##HHhh',
'16col' : '####xxx===---...',
'32col' : '@@@@####8888cccc****----.... ',
'192col': '@@@@@@@@@########MMMMBBBBHHHHHAAAAA&&&&GGGhhhh999333XXXX22222555SSSSiiiiisssssrrrrrrr;;;;;;;;;::::::::,,,,,,,,......... '
}
COLORS = []
TEXTIMAGE = []
class Pic2txt(object):
def __init__(self, filename, fontsize, chars, dither):
self.filename = filename
self.fontsize = fontsize
self.nrchars = chars
self.dither = dither
self.font = ImageFont.truetype('Terminus.ttf', self.fontsize)
self.__conv2text()
self.__text2pic()
def __open_picture(self):
''' nahraje zvoleny obrázek '''
image = Image.open(self.filename).convert('L')
'''
ted si muzu vybrat nejakou konverzi do sedych barev.
muzu konvertovat tak ze nastavim konverzi na 'L'
nebo pouzit nektery z RGB kanalu
'''
return image
def __conv2text(self):
''' konvertuje obrazek na text '''
pic = self.__open_picture()
width, height = pic.size
image = pic.load()
skip = int(width / self.nrchars)
module = '192col'
for y in xrange(0, height, skip):
col = []
txt = []
for x in xrange(0, width, skip):
value = int(image[x, y])
col.append(value)
txt.append(DITHER[module][value / (256 / len(DITHER[module]))])
TEXTIMAGE.append(txt)
COLORS.append(col)
def __text2pic(self, normal=False, inverse=False):
''' konvertuje textpic na png obrazek '''
ifont = ImageFont.truetype('Terminus.ttf', self.fontsize)
if inverse:
color = 'black'
else:
color = 'white'
image = Image.new('L', (len(TEXTIMAGE[0]*self.fontsize), len(TEXTIMAGE)*self.fontsize), color)
draw = ImageDraw.Draw(image)
for radka, line in enumerate(TEXTIMAGE):
for sloupec, char in enumerate(''.join(line)):
color = COLORS[radka][sloupec]
if inverse:
color = 255 - color
if normal:
color = 'black'
draw.text((sloupec*self.fontsize, radka*self.fontsize), char, font=ifont, fill=color)
image.save('pokus192col.png')
if __name__ == '__main__':
app = Pic2txt('jolie.jpg', 6, 200, 4)
Offline