You need to use canvas instead of scanline if you want to do that. I would suggest calculating the scanline offset manually instead of using the scanline property. Just be sure to check it's pixelFormat
Really,
Should do the trick. Is that REALLY so much harder than calling scanline? I doubt it.Code:p:=pointer(longword(bmp.canvas)+desiredScanLine*bmp.width*4);
Oh, and I REALLY suggest using longword instead of integer on these types of operations, you never know when the sign bit is going to mess with you.
honestly, the mere existance of the scanline method in tbitmap is probably why I stopped using it -- it makes image loads take longer setting up all those pointers.
Bookmarks