Author |
Topic  |
|
Chopinke
Hungary
2 Posts |
Posted - Oct 30 2014 : 21:48:55
|
Hi,
I have a multi-threaded application where in the thread class I use regular VCL.Grapics.TBitmap:
1) Load BMP 2) Load a smaller BMP 3) Draw or StretchDraw the smaller BMP onto the larger BMP.
Now it seems when there are actually more threads are running the StretchDraw doesn’t do its task, it has to do with the GDI kernel call, maybe that’s not thread-safe. I tried Canvas.Lock but the results are still not satisfying.
My question is that the IEBitmap: - Is it thread-safe? - Does it is Windows GDI+? - Does it have its own in-memory properties, like Canvas with Draw, StretchDraw and TextOut? - I also still need the scaline property, is it available?
Thanks,
Chopin |
|
Chopinke
Hungary
2 Posts |
Posted - Oct 30 2014 : 23:03:13
|
I checked TIEBitmap.DrawToTIEBitmap, it would be good for my task to draw a smaller bitmap onto the larger bitmap. Is this thread-safe? Is this the TIE implementation and not the original Canvas implementation?
By trhead-safe I mean that both smaller and larger bitmaps are created inside the thread, but in regular TBitmap there are problems with Canvas.StretchDraw, sometimes it simply does nothing.
Thanks,
Chopin |
 |
|
nwscomps
  
190 Posts |
Posted - Nov 03 2014 : 07:05:07
|
My answer may not be complete or completely accurate. Xequite should be able to give you more exact information.
TIEBitmap should be thread safe according to my experience, when it does not use the GDI internally. I perform all kind of operations with TIEBitmap in multiple threads, with no problem.
TIEBitmap does have the scanline property to access the pixels at low level As for the canvas property and the related methods, unless it was changed recently, it still relies on a TBitmap encapsulation.
But you should be easily able to replace canvas.draw and stretchdraw with the equivalent native methods of TIEBitmap
Francesco Savastano Nwscomps.com Add-ons for the ImageEn Library |
 |
|
|
Topic  |
|
|
|