[gimp] libgimp: remove gimp_gamma()



commit fe648c87bd5604f73b32222f963e7d0466e981bb
Author: Michael Natterer <mitch gimp org>
Date:   Mon Jun 18 03:06:34 2018 +0200

    libgimp: remove gimp_gamma()

 libgimp/gimp.c             | 21 ---------------------
 libgimp/gimp.def           |  1 -
 libgimp/gimp.h             |  1 -
 plug-ins/common/file-mng.c |  2 +-
 4 files changed, 1 insertion(+), 24 deletions(-)
---
diff --git a/libgimp/gimp.c b/libgimp/gimp.c
index f719b79607..0cb78583e9 100644
--- a/libgimp/gimp.c
+++ b/libgimp/gimp.c
@@ -213,7 +213,6 @@ static gint           _tile_width        = -1;
 static gint           _tile_height       = -1;
 static gint           _shm_ID            = -1;
 static guchar        *_shm_addr          = NULL;
-static const gdouble  _gamma_val         = 2.2;
 static gboolean       _show_help_button  = TRUE;
 static gboolean       _export_profile    = FALSE;
 static gboolean       _export_exif       = FALSE;
@@ -1379,26 +1378,6 @@ gimp_shm_addr (void)
   return _shm_addr;
 }
 
-/**
- * gimp_gamma:
- *
- * Returns the global gamma value GIMP and all its plug-ins should
- * use.
- *
- * This is a constant value given at plug-in configuration time.
- *
- * NOTE: This function will always return 2.2, the gamma value for
- * sRGB. There's currently no way to change this and all operations
- * should assume that pixel data is in the sRGB colorspace.
- *
- * Return value: the gamma value
- **/
-gdouble
-gimp_gamma (void)
-{
-  return _gamma_val;
-}
-
 /**
  * gimp_show_help_button:
  *
diff --git a/libgimp/gimp.def b/libgimp/gimp.def
index cf1ebdf90e..e34be8fe8d 100644
--- a/libgimp/gimp.def
+++ b/libgimp/gimp.def
@@ -276,7 +276,6 @@ EXPORTS
        gimp_fonts_popup
        gimp_fonts_refresh
        gimp_fonts_set_popup
-       gimp_gamma
        gimp_get_color_configuration
        gimp_get_default_comment
        gimp_get_default_unit
diff --git a/libgimp/gimp.h b/libgimp/gimp.h
index 0f90ae502c..52acfb63bd 100644
--- a/libgimp/gimp.h
+++ b/libgimp/gimp.h
@@ -318,7 +318,6 @@ guint          gimp_tile_width           (void) G_GNUC_CONST;
 guint          gimp_tile_height          (void) G_GNUC_CONST;
 gint           gimp_shm_ID               (void) G_GNUC_CONST;
 guchar       * gimp_shm_addr             (void) G_GNUC_CONST;
-gdouble        gimp_gamma                (void) G_GNUC_CONST;
 gboolean       gimp_show_help_button     (void) G_GNUC_CONST;
 gboolean       gimp_export_color_profile (void) G_GNUC_CONST;
 gboolean       gimp_export_exif          (void) G_GNUC_CONST;
diff --git a/plug-ins/common/file-mng.c b/plug-ins/common/file-mng.c
index cff30e1c2a..9fcee8be91 100644
--- a/plug-ins/common/file-mng.c
+++ b/plug-ins/common/file-mng.c
@@ -750,7 +750,7 @@ mng_save_image (const gchar  *filename,
   if (mng_data.gama)
     {
       if (mng_putchunk_gama (handle, MNG_FALSE,
-                             (1.0 / (gimp_gamma ()) * 100000)) != MNG_NOERROR)
+                             (1.0 / 2.2 * 100000)) != MNG_NOERROR)
         {
           g_warning ("Unable to mng_putchunk_gama() in mng_save_image()");
           goto err3;


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