base: model-gray: remove special case for black transparent premul
authorØyvind Kolås <pippin@gimp.org>
Fri, 31 Aug 2018 09:18:05 +0000 (11:18 +0200)
committerØyvind Kolås <pippin@gimp.org>
Fri, 31 Aug 2018 09:18:05 +0000 (11:18 +0200)
babl/base/model-gray.c

index 5286fd5d672d50405c448e55099ad7efa5ca9732..0cae83787d1eae8bddf05e33a6bae270b5634f10 100644 (file)
@@ -1237,8 +1237,6 @@ rgba_to_gray_alpha_premultiplied_float (Babl   *conversion,
           alpha = BABL_ALPHA_FLOOR;
          else if (alpha >= -BABL_ALPHA_FLOOR)
            alpha = -BABL_ALPHA_FLOOR;
-        if (red == 0.0f && green == 0.0f && blue == 0.0f)
-           alpha = 0.0f;
       }
 
       luminance = red * RGB_LUMINANCE_RED +
@@ -1356,8 +1354,6 @@ rgba2gray_nonlinear_premultiplied_float (Babl *conversion,
           alpha = BABL_ALPHA_FLOOR;
         else if (alpha >= -BABL_ALPHA_FLOOR)
           alpha = -BABL_ALPHA_FLOOR;
-        if (red == 0.0f && green == 0.0f && blue == 0.0f)
-          alpha = 0.0f;
       }
 
       luminance = red * RGB_LUMINANCE_RED +