Allegro.cc - Online Community

Allegro.cc Forums » Allegro.cc Comments » Drawing graphics in forum posts?

This thread is locked; no one can reply to it. rss feed Print
Drawing graphics in forum posts?
Sigurdur
Member #1,211
April 2001

I was reading the forums and saw that people often use ASCII graphics to explain ideas. I wondered if it would be usable to have some utility to draw simple graphics when writing posts? Just something in which you could only draw rectangles, lines, circles and some text (and maybe turn on some grid). Just something really simple. But I dunno what would be the best tool for this, Java applet? What do you think??

I'm sorry if this has been suggested 42 times already 8-)

spellcaster
Member #1,493
September 2001
avatar

the best tool would be to use your gfx program of choice, upload it somewhere and link to the graph, or inline the gfx.

--
There are no stupid questions, but there are a lot of inquisitive idiots.

Sakuera
Member #3,222
February 2003
avatar

It could be done, but it would take much diskspace on the server, so its owner wouldn't be happy about it. But... if it's as simple as shapes and text, then some specialistic format could be used, eg.

01 //rectangle tag
10 //x coord
15 //y coord
3 //width
5 //height
02 //text tag
10 //x
10 //y
"Hello" //the text

Marcello
Member #1,860
January 2002
avatar

hehe this would be cool

<img width="100" height="100">
 <pen color="red">
  <rectangle x="1" y="1" width="98" height="98">
 </pen>
 <text x="50" y="50" align="center" valign="middle">Hello</text>
</img>

Marcello

Sakuera
Member #3,222
February 2003
avatar

But you wouldn't edit it as text, so your way would only take more space.

spellcaster
Member #1,493
September 2001
avatar

If you want a text based format, use SVG.

--
There are no stupid questions, but there are a lot of inquisitive idiots.

gnolam
Member #2,030
March 2002
avatar

Sakuera:
Then you'd basically have RIPscrip, the format that was meant to replace ANSI as the format of choice for BBS graphics. Unfortunately, it never managed to get its big breakthrough before the internet killed off all the BBSes... but even though BBSes are dead and buried, RIP still lives (pun intended ;)) on as an art form within the Scene.

[EDIT]
Apparently it was called RIPscrip and not RIPscript... but everyone calls it RIP anyway :)
Oh, and expect a RIP level 0 viewer sometime soon ;D

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

Sigurdur
Member #1,211
April 2001

Spellcaster: Yes, it just felt like a lengthy process to create the image, upload it to a webserver and link to it, and it would not be stored alongside the post for future reference.

Nice idea using scripts, it would be sufficient for such simple diagrams. How do you think it would be possible to implement such script language in the forums so it would be stable and quick on most browsers? Feels like java applets could be heavy if one thread is filled with such diagrams ;) Maybe Javascript?

Marcello
Member #1,860
January 2002
avatar

Php could generate a pretty small png from scripts like those. Dunno what kind of bandwidth hit it'd take though.

Marcello

23yrold3yrold
Member #1,134
March 2001
avatar

Yeah, some people don't have webspace :P Maybe we should restrict this to the Programming Forum; I suspect the first week such a feature debuts, the OT Forum would be full of renditions of Bob ...

Good idea if Matthew can pull it off though.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Andrei Ellman
Member #3,434
April 2003

Question: Is there a program out there that can create ascii drawings using simple graphics primitives (line, box, circle, etc). All we'd need to do then is copy the output and paste it into code-tags when composing the post. The problem with code-tags is that they always apply syntax-highlighting so your ASCII-diagram will have all sorts of funky colours.

AE.

--
Don't let the illegitimates turn you into carbon.

Sigurdur
Member #1,211
April 2001

Andrei: Maybe Matthew can add another tag which doesn't colorize.. although it would look kinda cool.. for a while :)
Anyway, it could be useful so I googled a little bit and found these pages:

Here is one freeware Java ASCII art drawing program, not an applet. :
http://www.jave.de/

Google had some more ASCII art stuff at:
http://directory.google.com/Top/Arts/Visual_Arts/ASCII_Art/Software/

---

About using a script. I was wondering about this with server load. Maybe some caching mechanism would help? The image file (small black/white PNG) would be created from the drawing-script in a cache directory and have a lifetime of say two weeks, then it would be deleted. Always when a post with scripted image is viewed the server first looks if the cached image exists, if not then it would be created again from the drawing-script in the post. After that it would again have the usual lifetime of two weeks.

This would make it easier on the server when the threads are active. When they get inactive the images disappear. But if someone wants to review and old post it would just be generated again.

Marcello: Maybe the PHP script can be programmed for this? I dunno since I have no experience of PHP coding.

Or maybe this is just an overkill? ;D

[Edit: Ouch.. used wrong name for Matthew.. soorry.. I will do 50 situps, promise!]

Marcello
Member #1,860
January 2002
avatar

Sure, most anything is possible.

Marcello

BAF
Member #2,981
December 2002
avatar

php is very much like a programming language i bet you all use, called c. or c++. It is very similar, IMO. :P

jakerohs
Member #485
June 2000
avatar

Try out the Ascii-art plugin for the GIMP. Get the AA plugin from here.
Of course you need to be running Linux so I haven't tried it myself (I'm too lazy to reboot!) but it sounds like fun :)

Go to: