Welcome, Guest. Please login or register.
April 17, 2014, 09:48:17 AM
Home Help Search Login Register
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base

Qbasicnews.com  |  QbasicNews.Com  |  Challenges  |  Topic: ASCII images « previous next »
Pages: [1] Print
Author Topic: ASCII images  (Read 2935 times)
Nixon
Member
*
Posts: 41



WWW
ASCII images
« 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$ = ""

bload 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



WWW
ASCII images
« 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] Print 
Qbasicnews.com  |  QbasicNews.Com  |  Challenges  |  Topic: ASCII images « previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines
SMF Theme © Gaia
Valid XHTML 1.0! Valid CSS!