Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-05

TBitmap.Canvas.Pixel

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Felipe Monteiro de Carvalho

Hello,

In the past it was said that setting each pixel individually with TBitmap.Canvas.Pixel (for an offscreen bitmap) is slow, because the image data is stored by the windowing library, and you need a lot of calls to this library to set the pixels.

After the TBitmap remodeling where is the image data stored? It seams to me that it is stored locally now, althought the code is quite complex, so I may be wrong. In this case, there would be no reason it being so much slower then TLazIntfImage, but it still is in my tests with Carbon! Any ideas what is the cause of slowness now? Also remembering that Carbon doesn't have the problems of X11 like Gtk.

thanks,

Felipe Monteiro de Carvalho

Reply by email

Marc Weustink
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 12 lines
Hello, In the past it was said that setting each pixel individually with TBitmap.Canvas.Pixel (for an offscreen bitmap) is slow, because the image data is stored by the windowing library, and you need a lot of calls to this library to set the pixels. After the TBitmap remodeling where is the image data stored? It seams to me that it is stored locally now, althought the code is quite complex, so I may be wrong. In this case, there would be no reason it being so much slower then TLazIntfImage, but it still is in my tests with Carbon! Any ideas what is the cause of slowness now?

Maybe it is still not stored locally ? (I need to look at the code my self, I cant remember)

Marc

Reply by email