[lazarus] started porting Delphi PNG unit to FPC/Lazarus
Stefan Weber
w-e-b-e-r at web.de
Mon Jun 30 12:19:59 EDT 2003
Matthias wrote:
>
> On Sun, 29 Jun 2003 14:58:13 +0200 (CEST)
> Michael.VanCanneyt at wisa.be wrote:
>
> > On Sun, 29 Jun 2003, Stefan Weber wrote:
> >
> > > Michael.VanCanneyt at wisa.be wrote:
> > > >
> > > > On Sat, 28 Jun 2003, Stefan Weber wrote:
> > > >>I've started porting the native Delphi PNG sources available at
> > > >>http://pngdelphi.sourceforge.net/pngimage143.zip.
> > > >> ...
> > > >
> > > > We're working on a solution in the FCL itself. It includes a PNG and
> > > > XPM reader/writer, with support for all PNG features.
> > >
> > > When will it be available? Does it provide a TGraphic descendant for the
> > > LCL?
> >
> > I have sent all code to Mattias Gaertner, and I am waiting for his
> > comments on how we should continue. At the moment, he is best placed to
> > answer your question.
>
> I'm currently reading and testing a few things to form an opinion.
>
> In general:
> The FCL will support device/platform independent graphics.
ok.
> The LCL will support device/platform dependent graphics.
Do you mean gtk/gtk2/qt/win32/... specific?
> I think, speed is very important and so we need the possibility to load
> graphics with less mappings/conversions as possible. For instance an image
> should not be loaded with calls to SetPixel.
Of course not.
> And I guess, we can't simply
> emulate the VCL and their win32 bitmaps.
I think it would make sense to have a TDIB (device independent bitmap)
that stores images as RGB(+Alpha) arrays with 24bit depth and a DPI
setting to start with.
This could later be extented to support 1bit, 8bit and other depths.
Palette formats are not so important these days.
The TDIB would go in the FCL as well as low level image file format
implentations like BMP, XPM, PNG, JPG, TIFF, GIF, ... whatever.
It would be nice to be able to plug-in image format implementations
so that for example one could have PNG via libpng or via native Pascal
implementation.
They should descent from a common abstract image class like TGraphic.
This would require TGraphic to be moved to the FCL.
All image format implementations must be able to assign from/to the
TDIB format performing conversion if necessary.
Maybe for the LCL TDIB could be integrated with TBitmapImage in
order to be able to share DIB's amoung several components?
Device dependent bitmaps are only useful to save memory and
provide for fast GUI redrawing on non-true-color-displays,
aren't they?
-Stefan
____________________________________________________________________________
Jetzt bei WEB.DE FreeMail anmelden = 1qm Regenwald schuetzen! Helfen
Sie mit! Nutzen Sie den Serien-Testsieger. http://user.web.de/Regenwald
More information about the Lazarus
mailing list