C#の高速化チュートリアル (Bitmap操作)

Windows Mobile Team Blogに、C#の高速化に関するチュートリアルがUPされていました。

Today’s lesson is fast bitmap manipulation. Trying to alter pixels on an image is an intensive operation due to the problems associated with accessing managed memory. It’s just plain slow. This won’t be a big concern if all you are doing is drawing an image to a graphics object – but when you want to run a per-pixel filter on an image you quickly hit a performance bottleneck.


For this tutorial lets create a few classes that will let us invert the pixels on an image. The first thing we need to do is create a faster bitmap class. I’m going to make a class called FastBitmap, but I can’t subclass from Bitmap since it’s sealed. Oh no! Relax … we can fix this. Let’s create a class that contains a member variable that is a bitmap.

例によって、私はよくわかりませんが・・。高速にBitmap操作を行うためのチュートリアルのようです。