[gimp] app: remove gimp_image_transform_rgb()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove gimp_image_transform_rgb()
- Date: Wed, 2 May 2012 16:24:07 +0000 (UTC)
commit 50d7242b8754b2e940799832641b9e0ec92ad8da
Author: Michael Natterer <mitch gimp org>
Date: Fri Mar 30 15:28:46 2012 +0200
app: remove gimp_image_transform_rgb()
and use gimp_rgba_get_pixel() instead.
app/core/gimpimage.c | 21 ---------------------
app/core/gimpimage.h | 4 ----
app/paint/gimppaintbrush.c | 5 +++--
3 files changed, 3 insertions(+), 27 deletions(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index c6575f3..4c61430 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -2633,27 +2633,6 @@ gimp_image_inc_instance_count (GimpImage *image)
/* color transforms / utilities */
-void
-gimp_image_transform_rgb (const GimpImage *dest_image,
- GimpImageType dest_type,
- const GimpRGB *rgb,
- guchar *color)
-{
- const Babl *dest_format;
- guchar col[4];
-
- g_return_if_fail (GIMP_IS_IMAGE (dest_image));
- g_return_if_fail (rgb != NULL);
- g_return_if_fail (color != NULL);
-
- dest_format = gimp_image_get_format_with_alpha (dest_image, dest_type);
-
- gimp_rgba_get_uchar (rgb, &col[0], &col[1], &col[2], &col[3]);
-
- babl_process (babl_fish (babl_format ("R'G'B'A u8"), dest_format),
- col, color, 1);
-}
-
TempBuf *
gimp_image_transform_temp_buf (const GimpImage *dest_image,
GimpImageType dest_type,
diff --git a/app/core/gimpimage.h b/app/core/gimpimage.h
index b8cd2f1..2c6cdb1 100644
--- a/app/core/gimpimage.h
+++ b/app/core/gimpimage.h
@@ -332,10 +332,6 @@ void gimp_image_inc_instance_count (GimpImage *image);
/* color transforms / utilities */
-void gimp_image_transform_rgb (const GimpImage *dest_image,
- GimpImageType dest_type,
- const GimpRGB *rgb,
- guchar *color);
TempBuf * gimp_image_transform_temp_buf (const GimpImage *dest_image,
GimpImageType dest_type,
TempBuf *temp_buf,
diff --git a/app/paint/gimppaintbrush.c b/app/paint/gimppaintbrush.c
index 24e1671..854781f 100644
--- a/app/paint/gimppaintbrush.c
+++ b/app/paint/gimppaintbrush.c
@@ -165,8 +165,9 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
opacity *= gradient_color.a;
gimp_rgb_set_alpha (&gradient_color, GIMP_OPACITY_OPAQUE);
- gimp_image_transform_rgb (image, gimp_drawable_type (drawable),
- &gradient_color, pixel);
+ gimp_rgba_get_pixel (&gradient_color,
+ gimp_drawable_get_format_with_alpha (drawable),
+ pixel);
color_pixels (temp_buf_get_data (area), pixel,
area->width * area->height,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]