Use this command to optimize the palette or display range of a gray scale image. The optimization provides the maximum contrast between the brightest and darkest pixels in the image or currently selected area.
If the image is an 8-bit one, the optimization will be applied to its palette. If the image is a high-depth one, its display range will be set to the maximum and minimum values of pixels in the image.
Note that this command doesn't change the pixel values in the image, but only its appearance.