AFAIK TBitmap are thread safe if you only work on your canvas. Synchronize is required if you are sending GDI messages and need a screen refresh, but from my experiment using TBitmap.Canvas is just a wrapper around a thread-safe Windows API. If you are processing a bitmap using pixel arithmetic (using, for example, Scanline ), one unique bitmap per stream, you can do this in the background.
But I suspect that using TBitmap not the most efficient way. Try http://graphics32.org or http://aggpas.org , which is a very fast way to work with bitmaps.
If you can, as imago suggested, the best way to process your input stream is to take advantage of the direct X-stream process.
For a thread-safe process, if each thread is going to consume 100% of its core (which is very likely for the image process), it is usually assumed that you are better off creating NumOfCPU-1 threads for your processing. For example, you can create a pool of threads and then let them use bitmaps from the input stream.
source share