[lazarus] TImage
Mattias Gaertner
nc-gaertnma at netcologne.de
Fri Mar 9 11:02:37 EST 2001
On 2001.03.09 16:17:35 +0100 Marc Weustink wrote:
> IMO we should not work with platform dependent bitmaps. There should be
> no
> platform code in the LCL. (Where it is not it is only for temporary
> usage).
>
> Why not with the bitmapbits only with a header with some info. (I know
> this
> looks like a bitmap or a pixmap structure). In any case we have to
> convert
> the info from and to a (Win)Bitmap or a (X)Pixmap (or a (X)Image).
>
> I didn't follow the recent developments on the Image, but as far as I can
> remember, Delphi doesn't store the actual bitmap, so why do we ?
Ok, more clearly:
There will be no platform dependent code in the LCL. The image will not be
stored by the LCL. That is the reason why I suggested to load a bitmap and
convert it directly to the interface dependent format, so that the LCL
needs only to store a handle and not the pixels themselves.
The TBitmap.LoadFromStream should only load the stream, checks the header
and gives the raw pixel data plus some information about colors and size to
a procedure in the interfaces, which converts it to the best format and
returns a handle. The converter from bitmap to GDKPixmap will be located in
the gtk interfaces.
What we need are two procedures in each interface to convert a bitmap to a
interface-format and back.
Mattias
More information about the Lazarus
mailing list