[gimp/goat-invasion: 351/608] app: remove gimp_image_transform_temp_buf()



commit 89be2167e47592e5bf26f6f04f3eee66c1a84530
Author: Michael Natterer <mitch gimp org>
Date:   Sat Mar 31 16:35:42 2012 +0200

    app: remove gimp_image_transform_temp_buf()

 app/core/gimpimage.c |   45 ---------------------------------------------
 app/core/gimpimage.h |    8 --------
 2 files changed, 0 insertions(+), 53 deletions(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 4c61430..02b95f4 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -2631,51 +2631,6 @@ gimp_image_inc_instance_count (GimpImage *image)
 }
 
 
-/*  color transforms / utilities  */
-
-TempBuf *
-gimp_image_transform_temp_buf (const GimpImage *dest_image,
-                               GimpImageType    dest_type,
-                               TempBuf         *temp_buf,
-                               gboolean        *new_buf)
-{
-  TempBuf    *ret_buf;
-  const Babl *buf_format;
-  const Babl *ret_format;
-
-  g_return_val_if_fail (GIMP_IMAGE (dest_image), NULL);
-  g_return_val_if_fail (temp_buf != NULL, NULL);
-  g_return_val_if_fail (new_buf != NULL, NULL);
-
-  buf_format = gimp_bpp_to_babl_format (temp_buf->bytes);
-  ret_format = gimp_image_get_format (dest_image, dest_type);
-
-  /*  If the pattern doesn't match the image in terms of color type,
-   *  transform it.  (ie  pattern is RGB, image is indexed)
-   */
-  if (buf_format != ret_format)
-    {
-      ret_buf = temp_buf_new (temp_buf->width, temp_buf->height,
-                              babl_format_get_bytes_per_pixel (ret_format),
-                              0, 0, NULL);
-
-      babl_process (babl_fish (buf_format, ret_format),
-                    temp_buf_get_data (temp_buf),
-                    temp_buf_get_data (ret_buf),
-                    temp_buf->width * temp_buf->height);
-
-      *new_buf = TRUE;
-    }
-  else
-    {
-      ret_buf = temp_buf;
-      *new_buf = FALSE;
-    }
-
-  return ret_buf;
-}
-
-
 /*  parasites  */
 
 const GimpParasite *
diff --git a/app/core/gimpimage.h b/app/core/gimpimage.h
index 2c6cdb1..e9aaaa9 100644
--- a/app/core/gimpimage.h
+++ b/app/core/gimpimage.h
@@ -330,14 +330,6 @@ gint            gimp_image_get_instance_count    (const GimpImage    *image);
 void            gimp_image_inc_instance_count    (GimpImage          *image);
 
 
-/*  color transforms / utilities  */
-
-TempBuf       * gimp_image_transform_temp_buf    (const GimpImage    *dest_image,
-                                                  GimpImageType       dest_type,
-                                                  TempBuf            *temp_buf,
-                                                  gboolean           *new_buf);
-
-
 /*  parasites  */
 
 const GimpParasite * gimp_image_parasite_find    (const GimpImage    *image,



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