Article

From:
To:
Arnold Reinders
Subject:
Re: How threadsafe is TBitmap
Newsgroup:
embarcadero.public.delphi.graphics

Re: How threadsafe is TBitmap

> Yes, you have to lock it if you use it in a thread.

Actually you don't have to lock it, if you make sure no canvas is accessed while
your threads are executed. So your main thread should be blocked during your 
operation (for example using WaitForMultipleObjects). But it's no problem to 
have any number of threads working on one or more bitmaps without locking, if 
you are only accessing the memory given by the scanline property.

-- Jens Gruschel http://www.pegtop.net
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Fri, 15 Nov 2024 16:40:21 UTC
Copyright © 2009-2024
HREF Tools Corp.