Arithmetic operations on images