|
|
Darren New wrote:
> I would think there's relatively little need to be slow in a program
> like this, where it's all manipulation of fundamental structures. As in,
> I would think the speed of a program like this in .NET wouldn't
> necessarily be any slower than a similar program in plain C, unless the
> JIT is just really bad.
But, that's sort of my point. :) You don't need to be down to the wire
to get fast performance out of the system.
> Was there really any reason to use the unsafe pointers?
>
There was. There are 2 ways to access the bitmap data. One by using the
setpixel and getpixel functions. This is very slow. essentially every
access to the pixel data requires a conversion to and from a color
structure.
The other way is to access the buffer directly, hence the unsafe pointers.
Post a reply to this message
|
|