Image arithmetic