[Lazarus] fpimage use of Lazarus

Marco van de Voort marcov at stack.nl
Sat Feb 16 13:34:32 CET 2008


On Sat, Feb 16, 2008 at 11:38:21AM +0100, Mattias Gaertner wrote:

> > tmemoryimages. There might be an extra inheritance level involved.
> > (if img is TMemory then)
> > - tmemoryimage internal representation changes (and won't be always 4
> > bytes per pixel), lowering mem usage somewhat for lower bpp pictures.
> 
> Sounds like what TLazIntfImage is doing. It maps Get/SetColor to a
> memory image pixel format. See graphtype.pp TRawImageDescription for
> supported formats.

Ok, will check it out.

> > For now I'm only playing ad exploring, and even if I start to get
> > serious, it will be a branch at first. So no panic and running for
> > the door please :-)
> > 
> > Does sb know on what fpimage properties lazarus exactly depends? 
> 
> If you mean TFPCustomImage: Almost every property. The Extra*
> properties are used only by some readers/writers that are used by the
> LCL. So this is an indirect dependency.

> TLazIntfImage = class(TFPCustomImage)
>  
> > Are there hidden assumptions on internal format (mostly being it
> > always 32bpp?)
> 
> I didn't even know that fpimage has an internal format.

Depends on what you see as fpimage.  TFPCustomImage is the abstract
ancestor,  TFPMemoryImage the one with actual storage.

In this context one should also see my "which properties" question. If I
expand TFPMemoryImage with scanline (because it has storage), I couldn't use
it in the readers or writers, because then they wouldn't work anymore with
tlazintfimage. So more or less you confirmed my doubts, Lazarus is not using
TFPMemoryImage.

So probably the ancestor class should get a scanline property with some
abstract methods, and TLazIntfImage needs to override that too.





More information about the Lazarus mailing list