Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / Draw an image in the wordpad, yes it's possible, and in 16 lines :)

Author
Message
Attreid
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 12th Apr 2003 15:14
it's easy to use :
- choose the file which has to contain the image file
- choose the image
- launch the programm
- open it with the wordpad
- choose a font whose letters has the same size (Arial Alternative Symbol is very good)
- choose a very font size (1 for example )


if file exist("c:\image.txt")=1 then delete file "c:\image.txt"
open to write 1,"c:\image.txt"
load bitmap "C:\Documents and Settings\Tleilax\Mes documents\Mes images\Julie2.JPG",1
set current bitmap 1
for y=1 to bitmap height(1)
string$ = ""
for x=1 to bitmap width(1)
r = rgbr(point(x,y))
g = rgbg(point(x,y))
b = rgbb(point(x,y))
gris = (r+g+b)/3
if gris =
Bu$herie
How many civilians is he going to kill ? he's going to burn in hell, and I hope that his pain will make him inderstand !
FiShFuN4eVeR
21
Years of Service
User Offline
Joined: 2nd Feb 2003
Location: Netherlands
Posted: 12th Apr 2003 20:09
Yes, I know there is a new way on posting codes, I also don't know how to do it, but this isn't the code

If good programmer()=1 then print "Finaly I get to the top "
andrew11
20
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 12th Apr 2003 20:24 Edited at: 12th Apr 2003 20:24
I think he tried to post it in a code box. To post source code, you type it in the box under message box. I think what his program does is convert the picture to ASCII text. It takes each pixel, finds the average of the RGB values, then writes a string based on that. Its good idea.

All programmers are playwrights and all computers are lousy actors." -Anon.
<--- Uh... Um... Oh I forgot
Attreid
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 12th Apr 2003 20:32
Oh no, it didn't work .. I have to rewrite my programm ...
click on the button "source" under my message

Bu$herie
How many civilians is he going to kill ? he's going to burn in hell, and I hope that his pain will make him inderstand !
FiShFuN4eVeR
21
Years of Service
User Offline
Joined: 2nd Feb 2003
Location: Netherlands
Posted: 12th Apr 2003 22:05
Is that DBPRO only, when I try it in DBClassic it says stringoverflow at line 12 :S

If good programmer()=1 then print "Finaly I get to the top "
KamaKase
21
Years of Service
User Offline
Joined: 29th Oct 2002
Location:
Posted: 12th Apr 2003 23:01
Hmmm, alot of people are doing this. Posting they have code. I can't actually see the button...hang on.
Attreid
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 13th Apr 2003 14:14
Fishosaurus, you cannot have more than 255 letters in a string, so you cannot use a picture with a width more than 255 pixels
with several arrays, it should work .. I'll see what I can do for it
for the ones who cannot see the button :


Bu$herie
How many civilians is he going to kill ? he's going to burn in hell, and I hope that his pain will make him inderstand !

Login to post a reply

Server time is: 2024-02-21 01:27:17
Your offset time is: 2024-02-21 01:27:17