I need help to optimize a simple, but at the moment slow graphics routine. It is a routine that takes two TBitmap32 objects, and applies the alpha layer on one of them as a mask on the other one.
You will need to have Graphics32 library to complete the task!
It is VERY important that the function of the routine is not changed - the optimizing must be done inside and not outside the function.
I have uploaded a test project (D2007) that contains both the routine (alone in a unit called [login to view URL], named ApplyMask) and a project that calculates the time the function uses. When running with default settings the function masks 720x576 pixels, and on my machine that takes approx. 27 milliseconds. It needs to be AT LEAST 10 times faster than it is now!
It is important that it will work with any position, just as the example is now (try move the sliders). But the speed test should be done when X=0 and Y=0 (that is the worst case scenario, when the whole image needs to be masked).
Again, it needs to be at least 10 times faster than it is now...
We require the full ownership of the sourcecode, and it should work with Delphi 2007.
Hi, I expert in graphics algorithms. alpha blending and so on. I even have written my own graphics routines for my needs. It is written purely in delphi language and I think it performs quite good. I have the necessary knowledge in this job. I can help optimize your routine. Pls let me do it...