From: Trastabuga
Subject: Lisp library to draw text on images?
Date: 
Message-ID: <1173746629.212036.229710@c51g2000cwc.googlegroups.com>
I've been looking for the solution and found the ImageMagick (also
tried the lisp bindings to it). It works but way slow! It takes arout
35 seconds on PIII 650 MHz PC (and 10 sec on Dual Core Intel 2.8 GHz)
to draw 2000x200 image (not even  from Lisp, but plain command line).
This speed is not acceptable, so I am looking for something else,
maybe not so sophisticated as ImageMagick but can draw text fast
enough. Are there any Lisp (or any other) libs for this?

Any suggestions are welcome!
Andrew

From: Ken Tilton
Subject: Re: Lisp library to draw text on images?
Date: 
Message-ID: <mkoJh.40$Za7.29@newsfe12.lga>
Trastabuga wrote:
> I've been looking for the solution and found the ImageMagick (also
> tried the lisp bindings to it). It works but way slow! It takes arout
> 35 seconds on PIII 650 MHz PC (and 10 sec on Dual Core Intel 2.8 GHz)
> to draw 2000x200 image (not even  from Lisp, but plain command line).
> This speed is not acceptable, so I am looking for something else,
> maybe not so sophisticated as ImageMagick but can draw text fast
> enough. Are there any Lisp (or any other) libs for this?
> 
> Any suggestions are welcome!

Not this one, I wager (too many libraries):

Use GraphicsMagick to read the image, OpenGL to get it into a texture, 
FTGL to write the text into the frame, then GraphicsMagick to write the 
OpenGL frame back to disk.

I guess the question is, what is the slow part? If it is the rendering 
-- and I guess it must be -- this should go faster. I think. My Cello 
project has all the bindings and some sample code of all the different 
pieces, tho not combined.

The neat thing is you never have to actually show the frame, so some 
hassles are avoided (it becomes more of a batch utility). I think.

kt

-- 

"As long as algebra is taught in school,
there will be prayer in school." - Cokie Roberts

"Stand firm in your refusal to remain conscious during algebra."
    - Fran Lebowitz

"I'm an algebra liar. I figure two good lies make a positive."
    - Tim Allen

"Algebra is the metaphysics of arithmetic." - John Ray

http://www.theoryyalgebra.com/
From: Edi Weitz
Subject: Re: Lisp library to draw text on images?
Date: 
Message-ID: <uhcsqklkm.fsf@agharta.de>
On 12 Mar 2007 17:43:49 -0700, "Trastabuga" <·········@gmail.com> wrote:

> I've been looking for the solution and found the ImageMagick (also
> tried the lisp bindings to it). It works but way slow! It takes
> arout 35 seconds on PIII 650 MHz PC (and 10 sec on Dual Core Intel
> 2.8 GHz) to draw 2000x200 image (not even from Lisp, but plain
> command line).  This speed is not acceptable, so I am looking for
> something else, maybe not so sophisticated as ImageMagick but can
> draw text fast enough. Are there any Lisp (or any other) libs for
> this?

Have you tried CL-GD?  No idea if it's slower or faster, but probably
worth a try.

See also:

  http://www.cl-user.net/asp/tags/11045
  http://www.cliki.net/graphics%20library

Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: dpapathanasiou
Subject: Re: Lisp library to draw text on images?
Date: 
Message-ID: <1173788713.690151.325890@s48g2000cws.googlegroups.com>
> Have you tried CL-GD?  No idea if it's slower or faster, but probably
> worth a try.
>
> See also:
>
>  http://www.cl-user.net/asp/tags/11045
>  http://www.cliki.net/graphics%20library
>
> Edi.

Edi,

I had no idea there were lisp wrappers for GD -- we'd used GD for a
project by writing small C binaries, which we then invoked with
(ext:run-program) -- in the future, I need to remember to check cl-
user.net first, before writing any home brews like that.

As for the O.P.'s question, GD was extremely fast in our use of it
(simple color blocks & text for histograms), so you might want to try
it.

GD is open source and runs on Linux.
From: Trastabuga
Subject: Re: Lisp library to draw text on images?
Date: 
Message-ID: <1173813541.975328.40230@c51g2000cwc.googlegroups.com>
On Mar 13, 8:25 am, "dpapathanasiou" <···················@gmail.com>
wrote:
> > Have you tried CL-GD?  No idea if it's slower or faster, but probably
> > worth a try.
>
> > See also:
>
> >  http://www.cl-user.net/asp/tags/11045
> >  http://www.cliki.net/graphics%20library
>
> > Edi.
>
> Edi,
>
> I had no idea there were lisp wrappers for GD -- we'd used GD for a
> project by writing small C binaries, which we then invoked with
> (ext:run-program) -- in the future, I need to remember to check cl-
> user.net first, before writing any home brews like that.
>
> As for the O.P.'s question, GD was extremely fast in our use of it
> (simple color blocks & text for histograms), so you might want to try
> it.
>
> GD is open source and runs on Linux.

I tried CL-GD (with libgd) and am very happy to say it's much much
faster! I'd say at least 20 times faster if not more!

Thank you!
Andrew
From: Edi Weitz
Subject: Re: Lisp library to draw text on images?
Date: 
Message-ID: <u1wjtjp31.fsf@agharta.de>
On 13 Mar 2007 05:25:13 -0700, "dpapathanasiou" <···················@gmail.com> wrote:

> we'd used GD for a project by writing small C binaries, which we
> then invoked with (ext:run-program)

Yuk!

> in the future, I need to remember to check cl- user.net first,
> before writing any home brews like that.

Right... :)

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Johan Ur Riise
Subject: Re: Lisp library to draw text on images?
Date: 
Message-ID: <87tzwqez8s.fsf@morr.riise-data.net>
"Trastabuga" <·········@gmail.com> writes:

> I've been looking for the solution and found the ImageMagick (also
> tried the lisp bindings to it). It works but way slow! It takes arout
> 35 seconds on PIII 650 MHz PC (and 10 sec on Dual Core Intel 2.8 GHz)
> to draw 2000x200 image (not even  from Lisp, but plain command line).
> This speed is not acceptable, so I am looking for something else,
> maybe not so sophisticated as ImageMagick but can draw text fast
> enough. Are there any Lisp (or any other) libs for this?
> 
> Any suggestions are welcome!

Take a look at embedded svg - scalable vector graphics.
From: Trastabuga
Subject: Re: Lisp library to draw text on images?
Date: 
Message-ID: <1173750046.619280.69600@p10g2000cwp.googlegroups.com>
On Mar 12, 7:57 pm, Johan Ur Riise <····@riise-data.no> wrote:
> "Trastabuga" <·········@gmail.com> writes:
> > I've been looking for the solution and found the ImageMagick (also
> > tried the lisp bindings to it). It works but way slow! It takes arout
> > 35 seconds on PIII 650 MHz PC (and 10 sec on Dual Core Intel 2.8 GHz)
> > to draw 2000x200 image (not even  from Lisp, but plain command line).
> > This speed is not acceptable, so I am looking for something else,
> > maybe not so sophisticated as ImageMagick but can draw text fast
> > enough. Are there any Lisp (or any other) libs for this?
>
> > Any suggestions are welcome!
>
> Take a look at embedded svg - scalable vector graphics.


Johan, do you mean the eSVG from http://esvg.ultimodule.com ? I've had
a quick look. Seems like Linux is not on the list of supported
platforms, probably if it can run under Java it should be platform
independent...

Thank you,
Andrew
From: Johan Ur Riise
Subject: Re: Lisp library to draw text on images?
Date: 
Message-ID: <87ps7bfpgr.fsf@morr.riise-data.net>
"Trastabuga" <·········@gmail.com> writes:

> On Mar 12, 7:57 pm, Johan Ur Riise <····@riise-data.no> wrote:
> > "Trastabuga" <·········@gmail.com> writes:
> > > I've been looking for the solution and found the ImageMagick (also
> > > tried the lisp bindings to it). It works but way slow! It takes arout
> > > 35 seconds on PIII 650 MHz PC (and 10 sec on Dual Core Intel 2.8 GHz)
> > > to draw 2000x200 image (not even  from Lisp, but plain command line).
> > > This speed is not acceptable, so I am looking for something else,
> > > maybe not so sophisticated as ImageMagick but can draw text fast
> > > enough. Are there any Lisp (or any other) libs for this?
> >
> > > Any suggestions are welcome!
> >
> > Take a look at embedded svg - scalable vector graphics.
> 
> 
> Johan, do you mean the eSVG from http://esvg.ultimodule.com ? I've had
> a quick look. Seems like Linux is not on the list of supported
> platforms, probably if it can run under Java it should be platform
> independent...
> 
What I meant is that with svg, you do not have to create images. In stead,
you create the graphic primitives in xml form, and let the user's 
browser create the actual bitmap on his screen. Obviously this is only
for web-applications. 
From: John Thingstad
Subject: Re: Lisp library to draw text on images?
Date: 
Message-ID: <op.to7ab3u2pqzri1@pandora.upc.no>
On Wed, 14 Mar 2007 23:08:20 +0100, Johan Ur Riise <·····@riise-data.no>  
wrote:

>>
> What I meant is that with svg, you do not have to create images. In  
> stead,
> you create the graphic primitives in xml form, and let the user's
> browser create the actual bitmap on his screen. Obviously this is only
> for web-applications.

Buggy in some implementations though.
IE just has a problem with it. I found a worm that took advantage of
hole just last week. From Day 0 software.
(Day zero attack is a term used by crackers for a exploit that has never  
been
done before and thus there is no protection against it)

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
From: Johan Ur Riise
Subject: Re: Lisp library to draw text on images?
Date: 
Message-ID: <87lkhyfaqb.fsf@morr.riise-data.net>
"John Thingstad" <··············@chello.no> writes:

> On Wed, 14 Mar 2007 23:08:20 +0100, Johan Ur Riise
> <·····@riise-data.no>  wrote:
> 
> >>
> > What I meant is that with svg, you do not have to create images. In
> > stead,
> > you create the graphic primitives in xml form, and let the user's
> > browser create the actual bitmap on his screen. Obviously this is only
> > for web-applications.
> 
> Buggy in some implementations though.
> IE just has a problem with it. I found a worm that took advantage of
> hole just last week. From Day 0 software.
> (Day zero attack is a term used by crackers for a exploit that has
> never  been
> done before and thus there is no protection against it)

May be svg will turn out to have the same type og problems that java,
flash and other technologies that execute in the browser have:
security, performance, compatibility. Anyway, I just experimented with
creating some simple graphs, and this is really simple seen from the
server side. No files to create, no sister process sitting there to
create images on demand. For small graphs, say up to 10 rectangles or
lines and a few texts, it does not ask for to much processor time on
the client side. It is MESS (Make it Even Simpler, Stupid).