[Lazarus] Get JPEG from TAChart in CGI app

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Mar 21 13:36:28 CET 2011


On Mon, 21 Mar 2011 21:49:38 +1000
Alexander Klenin <klenin at gmail.com> wrote:

> On Mon, Mar 21, 2011 at 21:04, Mattias Gaertner
> <nc-gaertnma at netcologne.de> wrote:
> > On Mon, 21 Mar 2011 11:25:12 +0100 (CET)
> > michael.vancanneyt at wisa.be wrote:
> >
> > Why?
> > AFAIK in cgi you can not use the hardware acceleration.
> 
> Because color manupulation in 16-bit depth may be slower than in 8-bit,
> and because even withouh acceleration, OS drawing functions may be much
> better optimized then FPPCanvas ones.

Maybe, maybe not.
In case of gtk I doubt that *many* functions are much faster.
In my measurements the difference between 16 vs 8bit was not
big. It made a big difference if your bitmap is 16bit. I recommend to
not use the default fp memory image. Writing a 8bit is easy. It would
be nice if fpimage would provide some other memory image
implementations. For example 8bit RGB, RGBA and
Grayscale.

 
> > Since you are the second to blame the LCL, let's try the most simple gtk program:
> ...
> >  gtk_init(nil, nil);
> 
> Well, of course. The question is -- should LCL call gtk_init even if
> no gtk functions are called?

Yes, because it is has to parse the command line arguments.
It is the way how a gtk program works. If you don't want a gtk program,
then you must not use the LCL gtk interface.


> Maybe initializing gtk_pixbuf would be enough for TBitmap?

Maybe fpimage is enough for TBitmap.


Mattias




More information about the Lazarus mailing list