Added parameter to invert rgb channels for tinting images