ENH: defined image subtraction function