[Lazarus] Recent Graphics changes...
marc.weustink at cuperus.nl
Tue Jul 8 09:52:20 CEST 2008
> I turn quickly,
> I load images like this, (size 8192x8192)
> BmpMap: TBitmap;
> Image1: TImage;
> BmpMap.Width: = Map.width * Tiles.Width;
> BmpMap.Height: = Map.height * Tiles.Height;
> MapImage: = BmpMap.CreateIntfImage;
> / / ... image processing
> BmpMap.LoadFromIntfImage (MapImage);
> Image1.Picture.Bitmap.Assign (BmpMap);
> 1) Since the last change LoadFromIntfImage takes +/- 11 seconds, before
> 1 second.
> 2) The TImage is in a ScrollBox, the image disappears (1seconde) when I
> Is this a problem or should be done differently now?
There isn't much changed in LoadFromIntImage, but I need to lookup if
the internal rawimage is shared correctly. In the worst case a pixelcopy
is made, which is not necesary in this case.
one little optimalisation is setting the size like:
BmpMap.SetSize(Map.width * Tiles.Width, Map.height * Tiles.Height);
Another optimalisation would be creating the RawImage directly and not
through a bitmap.
(but all those don't change a bit on loadfromrawimage)
More information about the Lazarus