====== Enhancement – Invert ====== Invert turns black to white, and white to black. {{ :basic_level:enhancement:image1.png?nolink&400 |An image before Invert}} {{ :basic_level:enhancement:image1_invert.png?nolink&400 |The same image after Invert}} ===== How the values change ===== ^ Image type ^ Output ^ | 8-bit integer | 255 − value | | 16-bit integer | 65535 − value | | 32-bit integer | 4294967295 − value | | floating point | −value | //For example, in an 8-bit image a dark gray of 35 becomes a light gray of 220, and black (0) becomes white (255). In a floating-point image, 0.5678 becomes −0.5678.// ===== Choosing bands ===== By default, all bands are inverted. Select **some** to choose the bands, and list their numbers separated by spaces or semicolons (;). //For example, to invert only the red and blue bands of an RGB color image, enter ''0;2'' (band 0 is red, 1 is green and 2 is blue). In a 19-band floating-point PCA image, ''1;3;6;8'' inverts only those four bands; all 19 bands are still passed on.// ===== Inverting part of an image ===== If you enter a "window", only the part of the image inside it is inverted. Otherwise the whole image is inverted. See [[basic_level:readimage:window_arguments|Window Arguments]]. Invert works on byte, integer or floating-point images, and the output is the same type as the input.