For bitmap manipulation you can check this link: http://www.efg2.com/Lab/index.html
Old but great stuff :)
What do you want to do with the image?
BeanzMaster: nice trick that helper, filling with an uniform color is better done with a filldword per scanline though. (but I assume that was just a demonstration ).
Shortcuts is that I avoid a lot of corner cases (like imagewidths not dividable by 4), but on the plus side many simple operations are inlined, and the pixel data block is 32/64 byte aligned which keeps SSE routines simple.
Convert it to gray scale, process it for motion against a reference image, then incorporate it into the reference image.As others have mention, there are some tricks to access color components with TBitmap.
I should note that this image is a copy of the original. The original will be stored and/or displayed if motion is detected, hence no need to display this image.
Note that it does not matter much if you don't diplay the image.
Hi Marcov can you share the fastcode unit movejohunit10 i not found anywhere on web. it's an update of http://fastcode.sourceforge.net/FastcodeFileDownloads/FastcodeMoveUnit.pas i'm right ?
But that is probably a bit outdated, and never fixed, because my current framework is mostly zero copy. (the topdown property)Yes, not probably, but outdated. Anything after SSE2 is not used. That doesn't mean the move is slow. MMX allowed for pretty fast moves and is used in fastcode.
Frog, why are you need a bitmap class? Just load your data into an array and manipulate as you wish. The array can be of dword or of some argb record. This will be fastest (potentially).:D ;D of course...