[lazarus] TImage

FoodTechnologist Vasily.Volchenko at mstu.edu.ru
Sat Mar 10 04:00:46 EST 2001




Mattias Gaertner ÐÉÛÅÔ:

> 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
>
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>     archives at http://www.miraclec.com/list_archives/lazarus

I think, pixmap may be quite good solution as it is text file. But... I don't
know its structure enough to provide conversion (even worse than bmp
sturcture). As for streaming TBitmap, my idea was to leave all as is: bitmap
(at that time it was WinBMP) is bitmap,
pixmap is pixmap (why should we do such conversion without any reason?). Then
(may be even with operator overloading) we can provide conversion procedures.


The problem is (status on 7.03.01) that TPicture isn't usefull. Besides,
somebody added
fmFileDenyWrite in graphic.inc, but in FPC it is not supported (see FPC 1.0.5
on your site). Where is TImage component? It must be in extctrls. My images
unit, course, can't work with modified TPicture (but it can be corrected, I
think).
May be, it is reasonable to make patches system, as, for example, for wine (not
daily snapshot, it is too often, may be, once a week or two). Somebody (for
example, me) can't use cvs (as for me, I have internet access on University
computer, while FPC is on my home computer, where it is neither Internet via
modem, nor even telephone).
And, (may be, it is not up to date), we must have quick painting procedure, may
be, canvas.pixels.

Post-graduate Vasily






More information about the Lazarus mailing list