Parcourir la source

Mise à jour de la méthode saturation en repassant le résultat en RGB

synave il y a 2 ans
Parent
commit
48ccfdfb6b
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      HDRip/all_processings.cpp

+ 6 - 0
HDRip/all_processings.cpp

@@ -85,6 +85,8 @@ float* lightnessMask(float* data, unsigned int width, unsigned int height, bool
 
   img.lightnessMask(lms, lmb, lmm, lmw, lmh);
 
+  img.non_linear_to_linear();
+
   float* ret = new float[width * height * 3];
   memcpy(ret, img.data, width * height * 3 * sizeof(float));
 
@@ -99,6 +101,10 @@ float* saturation(float* data, unsigned int width, unsigned int height, float sa
 
   img.saturation(saturation);
 
+  float* dataRGB = Conversion::LCH_to_sRGB(img.data, width * height);
+  free(img.data);
+  img.data = dataRGB;
+
   float* ret = new float[width * height * 3];
   memcpy(ret, img.data, width * height * 3 * sizeof(float));