I mentioned in the last post that I was looking to optimise my approach for automatic cropping of an image. It turns out that using Bitmap.LockBits() and the corresponding UnlockBits() does indeed help, although I haven’t run any actual benchmarks to measure the difference in the two approaches. The disadvantage of this approach is that you’re a bit more down “in the weeds” when it comes to accessing the raw data – you have to support different raw image formats, for instance (and it may well be that I’ve missed some important ones – it’s only really by chance... Read more →