[gegl] tiff-load: remove special cases for cmyk



commit 5e4cbbc5c6427da97ff16068411aa9fea4d014eb
Author: Øyvind Kolås <pippin gimp org>
Date:   Thu Nov 29 14:15:37 2018 +0100

    tiff-load: remove special cases for cmyk
    
    We're directly using babl's pixel formats where appropriate for
    TIFF CMYK, instead of inverting some.

 operations/external/tiff-load.c | 38 --------------------------------------
 1 file changed, 38 deletions(-)
---
diff --git a/operations/external/tiff-load.c b/operations/external/tiff-load.c
index 78c51f370..8dc21788c 100644
--- a/operations/external/tiff-load.c
+++ b/operations/external/tiff-load.c
@@ -606,30 +606,9 @@ load_contiguous(GeglOperation *operation,
   guint32 tile_height = 1;
   guchar *buffer;
   gint x, y;
-  const Babl *format = p->format;
-  const Babl *type = babl_format_get_type (format, 0);
-
-  gint is_cmyk = babl_space_is_cmyk (format);
-  gint bytes_per_pixel = babl_format_get_bytes_per_pixel (format);
-  gint components = babl_format_get_n_components (format);
-  gint bytes_per_component = 1;
-  int ccomponents = components;
 
   g_return_val_if_fail(p->tiff != NULL, -1);
 
-  if (type == babl_type ("u16"))
-    bytes_per_component = 2;
-
-  if (is_cmyk)
-  {
-    if (components == 5) ccomponents = 4;
-  }
-  else
-  {
-    if (components == 4) ccomponents = 3;
-    if (components == 2) ccomponents = 1;
-  }
-
   if (!TIFFIsTiled(p->tiff))
       buffer = g_try_new(guchar, TIFFScanlineSize(p->tiff));
   else
@@ -653,23 +632,6 @@ load_contiguous(GeglOperation *operation,
           else
             TIFFReadScanline(p->tiff, buffer, y, 0);
 
-          if (is_cmyk)
-          {
-/*
-   cmy
-   cmyk
-   cmykA
-   camayakaA
-
-   CMY
-   CMYK
-   CMYKA
-   CaMaYaKaA
-
-*/
-
-
-          }
           gegl_buffer_set(output, &tile, 0, p->format,
                           (guchar *) buffer,
                           GEGL_AUTO_ROWSTRIDE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]