tags:

views:

338

answers:

2

For a web project I need the possibility to generate jpg and animated gif images very fast. As server platform I will use Linux and the NekoVM (behind a apache via mod_tora). As there is no library for image generation for haXe and neko I am about to write a own one.

Neko itself is written in c, and you can simply extend the VM writing shared libraries with c. At the moment we playing arround with libGD, which offers all the features we need (resizing, sampling, copying images, adding text, save as jpeg or animated gif) and of course a lot of stuff we don't need.

At the moment this works great, but it seems to be a little bit slow. Is there another popular open library that I could try to use for my purposes (and that is maybe faster)?

+2  A: 

Have you tried Magick++ and/or MagickCore?

Your next best bet is to run NekoVM under pprof to figure out which function(s) are the most costly in libGD, and try to avoid or optimize your use of those by changing your calling code.

slacy
Magick++ is a C++ api, which I don't like to use, because of portability reasion and ImageMagick is in general a little bit "overkill" for things I need to do.
Hippo
@Hippo ImageMagick has wide variety of APIs tho choose from http://www.imagemagick.org/www/api.htmlAs for "overkill" -- it's a lot faster then GD.
vartec
A: 

There is imlib2, I doubt that it support animated gif's.

quinmars
sounds interesting, but quick look at the api shows, that it does not have support for animated gifs :-(
Hippo