コード例 #1
0
BOOL fipImage::adjustBrightnessContrastGamma(double brightness, double contrast, double gamma) {
	if(_dib) {
		_bHasChanged = TRUE;

		return FreeImage_AdjustColors(_dib, brightness, contrast, gamma, FALSE);
	}
	return FALSE;
}
コード例 #2
0
/**
 * Adjusts an image's brightness, contrast and gamma as well as it may optionally
 * invert the image within a single operation. If more than one of these image display properties
 * need to be adjusted, using this function should be preferred over calling each adjustment
 * function separately. That's particularly true for huge images or if performance is an issue.
 * return false if no image is loaded or if the image manipulation otherwise fails.
 * @param pBrightness					Brightness.
 * @param pContrast					Contrast.
 * @param pGamma					Gamma quality.
 * @param pNegative					Negative filter on / off.
 */
bool IND_Image::adjustColors(double pBrightness, double pContrast, double pGamma, bool pNegative) {
	// No image loaded
	if (!isImageLoaded()) return false;

	return FreeImage_AdjustColors(getFreeImageHandle(), pBrightness, pContrast, pGamma, pNegative) != 0;
}