View Single Post
  #8 (permalink)  
Old 07-01-2008, 10:31 AM
mjcoon mjcoon is offline
Junior Member
 
Join Date: May 2008
Posts: 24
Default

Quote:
Originally Posted by agraham View Post
... The code that does the work looks like
Code:
 *pixel3++ = (byte)((*pixel1++ * oldpercent + *pixel2++ * newpercent) / 100);
and I can't get it any simpler than that
I'm only qualified to comment having been around for a long time and worked in multiple languages... (By way of saying I'm ignorant of this compiler and of PPC processor architecture!)

But elsewhere, a complex expression like that might entail converting its terms to floating point for the calculation and back again if the assignment were to an integer. This would make it much slower than purely integer computation. Could this be implicated in this case?

Regards, Mike.
Reply With Quote