[gimp/gimp-2-10] libgimp: forgot to deprecate gimp_gamma()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] libgimp: forgot to deprecate gimp_gamma()
- Date: Mon, 18 Jun 2018 01:00:45 +0000 (UTC)
commit 1663e6371755fdb28c83f62467e9dd2a93c051e0
Author: Michael Natterer <mitch gimp org>
Date: Mon Jun 18 02:59:24 2018 +0200
libgimp: forgot to deprecate gimp_gamma()
libgimp/gimp.c | 13 ++++++++-----
libgimp/gimp.h | 3 ++-
plug-ins/common/file-mng.c | 2 +-
3 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/libgimp/gimp.c b/libgimp/gimp.c
index 1f8d62309f..13e0b975cb 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_tool_tips = TRUE;
static gboolean _show_help_button = TRUE;
static gboolean _export_profile = FALSE;
@@ -1364,18 +1363,22 @@ gimp_shm_addr (void)
* Returns the global gamma value GIMP and all its plug-ins should
* use.
*
- * This is a constant value given at plug-in configuration time.
+ * This is a constant value.
*
* 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.
+ * sRGB. If you need the actual gamma value of a drawable, look at its
+ * format.
+ *
+ * See also: gimp_drawable_get_format().
+ *
+ * @Deprecated: 2.8.4
*
* Return value: the gamma value
**/
gdouble
gimp_gamma (void)
{
- return _gamma_val;
+ return 2.2;
}
/**
diff --git a/libgimp/gimp.h b/libgimp/gimp.h
index 3b73ac474d..19e0f12232 100644
--- a/libgimp/gimp.h
+++ b/libgimp/gimp.h
@@ -327,7 +327,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_tool_tips (void) G_GNUC_CONST;
gboolean gimp_show_help_button (void) G_GNUC_CONST;
gboolean gimp_export_color_profile (void) G_GNUC_CONST;
@@ -345,6 +344,8 @@ const gchar * gimp_icon_theme_dir (void) G_GNUC_CONST;
const gchar * gimp_get_progname (void) G_GNUC_CONST;
+GIMP_DEPRECATED
+gdouble gimp_gamma (void) G_GNUC_CONST;
GIMP_DEPRECATED
gboolean gimp_install_cmap (void) G_GNUC_CONST;
GIMP_DEPRECATED
diff --git a/plug-ins/common/file-mng.c b/plug-ins/common/file-mng.c
index 6d4f8b9e10..7b1a753df6 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]