How to invert a gray image with respect to the full intensity interval [0,1] ?

Hi all,
I have a problem inverting gray images. I have image [0.027, 0.259, 0.729, 0.969] as an example. I need it as a result [0.973, 0.741, 0.271, 0.031], but the negate command gives me this [0.941,0.710,0.243,0.000]. In fact, I need to invert the intensity (brightness). Does the negate command accept a base value?
Thanks for your help.

Yes :

 negate:
      base_value |
      (no arg)

    Negate image values.

    Default value: 'base_value=(undefined)'.

So,

negate 1 

is probably what you are looking for.

2 Likes

Thank you. Now I understand what exactly is the base value.