<<< Home << Web < Arithmetic Top Bottom < Prev Next >

Image Arithmetic
Multiplication

Multiplication is done using the following formula:

  (a,b,c) * (x,y,z) = ( (a*x)/d + i , (b*y)/d + i , (c*y)/d + i)

Each multiplication result can range from 0 through 65025 (255 * 255). You will usually want to use a fairly large divisor - say, between 75 and 200 - to bring the values down to something reasonable. I usually start with a value of 100 and then try several additional values to pick the best result.

Any value larger than 255 can be clipped or unclipped. When clipped, it is set to 255. When unclipped, it is set to the remainder after dividing by 256. With the other arithmetic functions, you usually get the best results using clipping. With multiplication, you often get a better result by not using clipping.


<<< Home << Web < Arithmetic Top Bottom < Prev Next >