Image color inversion using NPP

I’m new to Cuda NPP library. Trying to invert colors of a 8-bit unsigned RGB image by subtracting from 255. How can this be achieved using NPP? NPP provides a SubC function (nppiSubC_8u_C3IRSfs) which only accepts an 8-bit unsigned constant, else I could have subtracted from -255.

Thanks.

You could create an image that is all 255 and then subtract your image from it using Sub

That worked. Thank you.