Quick C question
dsr at tao.merseine.nu
dsr at tao.merseine.nu
Wed Nov 16 12:17:36 EST 2005
On Wed, Nov 16, 2005 at 11:25:29AM -0500, Josh ChaitinPollak wrote:
> Don't use multidimensional arrays for image processing. You'll take
> huge speed hits and the compiler won't be able to optimize. Allocate
> a single dimensional N*M array and do the math to get to the pixels
> you need. You'll find it much easier to deal with in the long run.
> Not to mention for loops to deallocate the sub-arrays will get very
> old, very quickly.
And if you're doing more than writing a plugin filter -- go find
a graphics library that appeals to you. Reinventing the wheel is
a really lousy way of spending your time...
-dsr-
More information about the Discuss
mailing list