[gimp] plug-ins: clean a bit commented-out code.



commit 8de34f704d3058bb966f039c0b4467f51edf5075
Author: Jehan <jehan girinstud io>
Date:   Sat Mar 10 03:12:55 2018 +0100

    plug-ins: clean a bit commented-out code.
    
    These are remnants from the old Jasper implementation and should have
    been deleted days ago.

 plug-ins/common/file-jp2-load.c |   54 +++-----------------------------------
 1 files changed, 5 insertions(+), 49 deletions(-)
---
diff --git a/plug-ins/common/file-jp2-load.c b/plug-ins/common/file-jp2-load.c
index 778b1ad..70aeb08 100644
--- a/plug-ins/common/file-jp2-load.c
+++ b/plug-ins/common/file-jp2-load.c
@@ -836,7 +836,7 @@ load_image (const gchar       *filename,
   opj_codec_t       *codec;
   opj_dparameters_t  parameters;
   opj_image_t       *image;
-  GimpColorProfile  *profile = NULL;
+  GimpColorProfile  *profile;
   gint32             image_ID;
   gint32             layer_ID;
   GimpImageType      image_type;
@@ -850,9 +850,10 @@ load_image (const gchar       *filename,
   guchar            *pixels;
   gint               components[4];
 
-  stream = NULL;
-  codec = NULL;
-  image = NULL;
+  stream   = NULL;
+  codec    = NULL;
+  image    = NULL;
+  profile  = NULL;
   image_ID = -1;
 
   gimp_progress_init_printf (_("Opening '%s'"),
@@ -1028,14 +1029,6 @@ load_image (const gchar       *filename,
         }
     }
 
-  /* FIXME */
-/*  base_type = GIMP_GRAY;
-  base_type = GIMP_RGB;
-  image_type = GIMP_GRAYA_IMAGE;
-  image_type = GIMP_GRAY_IMAGE;
-  image_type = GIMP_RGBA_IMAGE;
-  image_type = GIMP_RGB_IMAGE;
-*/
   width = image->comps[0].w;
   height = image->comps[0].h;
 
@@ -1089,43 +1082,6 @@ load_image (const gchar       *filename,
                          NULL, pixels, GEGL_AUTO_ROWSTRIDE);
     }
 
-#if 0
-  matrix = jas_matrix_create (1, width);
-
-  for (i = 0; i < height; i++)
-    {
-      for (j = 0; j < num_components; j++)
-        {
-          const int channel_prec = 8;
-
-          jas_image_readcmpt (image, components[j], 0, i, width, 1, matrix);
-
-          if (jas_image_cmptprec (image, components[j]) >= channel_prec)
-            {
-              int shift = MAX (jas_image_cmptprec (image, components[j]) - channel_prec, 0);
-
-              for (k = 0; k < width; k++)
-                {
-                  pixels[k * num_components + j] = jas_matrix_get (matrix, 0, k) >> shift;
-                }
-            }
-          else
-            {
-              int mul = 1 << (channel_prec - jas_image_cmptprec (image, components[j]));
-
-              for (k = 0; k < width; k++)
-                {
-                  pixels[k * num_components + j] = jas_matrix_get (matrix, 0, k) * mul;
-                }
-
-            }
-        }
-
-      gegl_buffer_set (buffer, GEGL_RECTANGLE (0, i, width, 1), 0,
-                       NULL, pixels, GEGL_AUTO_ROWSTRIDE);
-    }
-#endif
-
   free (pixels);
 
   g_object_unref (buffer);


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