From a80ee0ee1a083b4991d12ed4c07b7c7c5890f329 Mon Sep 17 00:00:00 2001 From: Cristy Date: Fri, 3 Mar 2017 12:43:24 -0500 Subject: [PATCH] https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31506 --- MagickCore/enhance.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c index 1a0280d99..529c4643b 100644 --- a/MagickCore/enhance.c +++ b/MagickCore/enhance.c @@ -2948,10 +2948,6 @@ static inline void ModulateHCL(const double percent_hue, */ ConvertRGBToHCL(*red,*green,*blue,&hue,&chroma,&luma); hue+=0.5*(0.01*percent_hue-1.0); - while (hue < 0.0) - hue+=1.0; - while (hue > 1.0) - hue-=1.0; chroma*=0.01*percent_chroma; luma*=0.01*percent_luma; ConvertHCLToRGB(hue,chroma,luma,red,green,blue); @@ -2971,10 +2967,6 @@ static inline void ModulateHCLp(const double percent_hue, */ ConvertRGBToHCLp(*red,*green,*blue,&hue,&chroma,&luma); hue+=0.5*(0.01*percent_hue-1.0); - while (hue < 0.0) - hue+=1.0; - while (hue > 1.0) - hue-=1.0; chroma*=0.01*percent_chroma; luma*=0.01*percent_luma; ConvertHCLpToRGB(hue,chroma,luma,red,green,blue); @@ -2994,10 +2986,6 @@ static inline void ModulateHSB(const double percent_hue, */ ConvertRGBToHSB(*red,*green,*blue,&hue,&saturation,&brightness); hue+=0.5*(0.01*percent_hue-1.0); - while (hue < 0.0) - hue+=1.0; - while (hue > 1.0) - hue-=1.0; saturation*=0.01*percent_saturation; brightness*=0.01*percent_brightness; ConvertHSBToRGB(hue,saturation,brightness,red,green,blue); @@ -3017,10 +3005,6 @@ static inline void ModulateHSI(const double percent_hue, */ ConvertRGBToHSI(*red,*green,*blue,&hue,&saturation,&intensity); hue+=0.5*(0.01*percent_hue-1.0); - while (hue < 0.0) - hue+=1.0; - while (hue > 1.0) - hue-=1.0; saturation*=0.01*percent_saturation; intensity*=0.01*percent_intensity; ConvertHSIToRGB(hue,saturation,intensity,red,green,blue); @@ -3040,10 +3024,6 @@ static inline void ModulateHSL(const double percent_hue, */ ConvertRGBToHSL(*red,*green,*blue,&hue,&saturation,&lightness); hue+=0.5*(0.01*percent_hue-1.0); - while (hue < 0.0) - hue+=1.0; - while (hue >= 1.0) - hue-=1.0; saturation*=0.01*percent_saturation; lightness*=0.01*percent_lightness; ConvertHSLToRGB(hue,saturation,lightness,red,green,blue); @@ -3063,10 +3043,6 @@ static inline void ModulateHSV(const double percent_hue, */ ConvertRGBToHSV(*red,*green,*blue,&hue,&saturation,&value); hue+=0.5*(0.01*percent_hue-1.0); - while (hue < 0.0) - hue+=1.0; - while (hue >= 1.0) - hue-=1.0; saturation*=0.01*percent_saturation; value*=0.01*percent_value; ConvertHSVToRGB(hue,saturation,value,red,green,blue); @@ -3086,10 +3062,6 @@ static inline void ModulateHWB(const double percent_hue, */ ConvertRGBToHWB(*red,*green,*blue,&hue,&whiteness,&blackness); hue+=0.5*(0.01*percent_hue-1.0); - while (hue < 0.0) - hue+=1.0; - while (hue >= 1.0) - hue-=1.0; blackness*=0.01*percent_blackness; whiteness*=0.01*percent_whiteness; ConvertHWBToRGB(hue,whiteness,blackness,red,green,blue); @@ -3111,10 +3083,6 @@ static inline void ModulateLCHab(const double percent_luma, luma*=0.01*percent_luma; chroma*=0.01*percent_chroma; hue+=0.5*(0.01*percent_hue-1.0); - while (hue < 0.0) - hue+=1.0; - while (hue >= 1.0) - hue-=1.0; ConvertLCHabToRGB(luma,chroma,hue,red,green,blue); } @@ -3134,10 +3102,6 @@ static inline void ModulateLCHuv(const double percent_luma, luma*=0.01*percent_luma; chroma*=0.01*percent_chroma; hue+=0.5*(0.01*percent_hue-1.0); - while (hue < 0.0) - hue+=1.0; - while (hue >= 1.0) - hue-=1.0; ConvertLCHuvToRGB(luma,chroma,hue,red,green,blue); } -- 2.40.0