[gimp] plug-ins: don't use gimp_rgb_to_cmyk_int() in newsprint
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: don't use gimp_rgb_to_cmyk_int() in newsprint
- Date: Sat, 28 Apr 2018 12:44:57 +0000 (UTC)
commit f3bf8cd53fcfc0692899700c76689ab50974567d
Author: Michael Natterer <mitch gimp org>
Date: Sat Apr 28 14:44:23 2018 +0200
plug-ins: don't use gimp_rgb_to_cmyk_int() in newsprint
plug-ins/common/newsprint.c | 29 ++++++++++++++++-------------
1 files changed, 16 insertions(+), 13 deletions(-)
---
diff --git a/plug-ins/common/newsprint.c b/plug-ins/common/newsprint.c
index 2518b02..c4a322e 100644
--- a/plug-ins/common/newsprint.c
+++ b/plug-ins/common/newsprint.c
@@ -1940,19 +1940,22 @@ do { \
{
case CS_CMYK:
{
- gint r,g,b,k;
-
- r = data[0];
- g = data[1];
- b = data[2];
- k = pvals.k_pullout;
-
- gimp_rgb_to_cmyk_int (&r, &g, &b, &k);
-
- data[0] = r;
- data[1] = g;
- data[2] = b;
- data[3] = k;
+ GimpRGB rgb;
+ GimpCMYK cmyk;
+
+ gimp_rgb_set_uchar (&rgb,
+ data[0],
+ data[1],
+ data[2]);
+
+ gimp_rgb_to_cmyk (&rgb, pvals.k_pullout / 100.0,
+ &cmyk);
+
+ gimp_cmyk_get_uchar (&cmyk,
+ data,
+ data + 1,
+ data + 2,
+ data + 3);
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]