[Lazarus] Lazarus under windows vista

ArĂ­ Ricardo Ody ari.ody at japinfo.com.br
Sun Aug 10 17:22:57 CEST 2008


>
>
> >     one little optimalisation is setting the size like:
> >
> >       BmpMap.SetSize(Map.width * Tiles.Width, Map.height * Tiles.Height);
> >
> >
> > Thanks for this,
> >
> >
> >
> >     Another optimalisation would be creating the RawImage directly and
> not
> >     through a bitmap.
> >
> >
> > Impossible, if the image is too big there is a mistake ( Failed to
> > create handles )
>
> A bitmap has to create the handles anyway, so if it fails for a
> TLazIntfImage it would for tbitmap too.
>
> >   MapImage:= TLazIntfImage.Create(Map.width * Tiles.Width, Map.height *
> > Tiles.Height);
>
> Thats what I meant.
>
>
I changed strategy and I don't load whole picture, I charge what is seen and
with DoubleBuffered is great ;)

I have found a solution for the handles probleme, like this :
  PreviewImage:= TLazIntfImage.Create(0, 0);
  PreviewImage.DataDescription:=GetDescriptionFromDevice(0, 0, 0);
  PreviewImage.SetSize(PreviewWidth*32, PreviewHeight*32);

This dont work:
 PreviewImage:= TLazIntfImage.Create(PreviewWidth*32, PreviewHeight*32);

I do not know if is good, but it works :-)

PS: My program uses lots of memory, around 20 mb !

Thanks Marc,

-- 
Laurent.

"If debugging is the art of removing bugs, then programming must be the art
of creating!"

My Components: http://wiki.lazarus.freepascal.org/Wile64
French Forum : http://lazforum-fr.tuxfamily.org/index.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20080809/c6308871/attachment-0007.html>


More information about the Lazarus mailing list