[lazarus] started porting Delphi PNG unit to FPC/Lazarus

Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Mon Jun 30 14:41:16 EDT 2003




On Mon, 30 Jun 2003, Stefan Weber wrote:

> 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.

Hehe :-)

Check out the latest FCL. Use -dP and see the image directory.
That is the basis we'll be working with. It's up for improvements, but the
basics are laid out.

Michael.






More information about the Lazarus mailing list