BOOL fipImage::adjustGamma(double gamma) { if(_dib) { _bHasChanged = TRUE; return FreeImage_AdjustGamma(_dib, gamma); } return FALSE; }
/** * A value of 1.0 leaves the image alone, less than one darkens it, and greater than one lightens it. * The function returns TRUE on success. It returns FALSE when no image is loaded or gamma is less than or equal * to zero or when the bitdepth of the source dib cannot be handled. * @param pGamma Gamma quality. */ bool IND_Image::setGamma(double pGamma) { // No image loaded if (!isImageLoaded()) return false; return FreeImage_AdjustGamma(getFreeImageHandle(), pGamma) != 0; }