Qbasicnews.com
September 20, 2020, 08:22:57 PM
 Welcome, Guest. Please login or register. 1 Hour 1 Day 1 Week 1 Month Forever Login with username, password and session length
 Home Help Search Login Register
 Pages: [1]
 Author Topic: ASCII images  (Read 5855 times)
Nixon
Member

Posts: 41

 « on: December 27, 2006, 11:23:50 PM »

I got bored and made imags look worse by using ASCII graphics to replace the pixels. Doesn't make much sense but anyway, I want to see who can make the best picture to ASCII converter, you can use what every colors on the ASCII characters(unless you want more of a challenge), but you can use only ASCII characters. So um, go code.

heres my simple example

Code:

'ASCII blockiness

screen 19,32

filename\$ = ""

sleep

for x = 1 to 800 step 8
for y = 1 to 560 step 16
col = 0
red1 = 0
green1 = 0
blue1 = 0
red2 = 0
green2 = 0
blue2 = 0
for a = 1 to 8
for b = 1 to 16
col = point(a+x-1,b+y-1)
if b < 9 then
red1 = red1 + ((col SHR 16) AND &hFF)
green1 = green1 + ((col SHR 8) AND &hFF)
blue1 = blue1 + (col SHR 32 AND &hFF)
elseif b > 8 then
red2 = red2 + ((col SHR 16) AND &hFF)
green2 = green2 + ((col SHR 8) AND &hFF)
blue2 = blue2 + (col SHR 32 AND &hFF)
end if
next
next

col1 = rgb(red1/(8*8),green1/(8*8),blue1/(8*8))
col2 = rgb(red2/(8*8),green2/(8*8),blue2/(8*8))
locate (y/8+1)/2,x/8+1
if col1 <> col2 then
color col2,col1
print chr\$(220)
else
color col1
print chr\$(219)
end if

next
next

sleep
 Logged
E.K.Virtanen
Senior Member

Posts: 166

 « Reply #1 on: December 30, 2006, 07:42:22 PM »

I wana try this some day when i have time. But i love the idea.
 Logged

url=http://www.ascii-world.com]ASCII-World.com[/url]
Yeah, nick changed from lurah, but bullshit's are the same.
 Pages: [1]