annotate src/color-man.c @ 551:5b127951daa1

info_notebook_reordered_cb(): do not call info_tabs_sync(), it causes exif info disappearing when moving the tab.
author zas_
date Fri, 02 May 2008 23:08:18 +0000
parents 135570a8bd96
children b690cecbf5b8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
1 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 115
diff changeset
2 * Geeqie
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
3 * (C) 2006 John Ellis
475
48c8e49b571c updated copyright in source files
nadvornik
parents: 446
diff changeset
4 * Copyright (C) 2008 The Geeqie Team
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
5 *
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
6 * Author: John Ellis
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
7 *
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
9 * Please read the included file COPYING for more information.
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
11 */
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
12
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
13
281
9995c5fb202a gqview.h -> main.h
zas_
parents: 196
diff changeset
14 #include "main.h"
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
15 #include "color-man.h"
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
16
507
135570a8bd96 Move debug macros from main.h to new debug.h.
zas_
parents: 506
diff changeset
17 #include "debug.h"
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
18 #include "image.h"
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
19 #include "ui_fileops.h"
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
20
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
21
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
22 #ifdef HAVE_LCMS
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
23 /*** color support enabled ***/
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
24
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
25 #ifdef HAVE_LCMS_LCMS_H
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
26 #include <lcms/lcms.h>
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
27 #else
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
28 #include <lcms.h>
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
29 #endif
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
30
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
31
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
32 typedef struct _ColorManCache ColorManCache;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
33 struct _ColorManCache {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
34 cmsHPROFILE profile_in;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
35 cmsHPROFILE profile_out;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
36 cmsHTRANSFORM transform;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
37
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
38 ColorManProfileType profile_in_type;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
39 gchar *profile_in_file;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
40
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
41 ColorManProfileType profile_out_type;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
42 gchar *profile_out_file;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
43
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
44 gint has_alpha;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
45
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
46 gint refcount;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
47 };
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
48
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
49 /* pixels to transform per idle call */
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
50 #define COLOR_MAN_CHUNK_SIZE 81900
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
51
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
52
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
53 static void color_man_lib_init(void)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
54 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
55 static gint init_done = FALSE;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
56
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
57 if (init_done) return;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
58 init_done = TRUE;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
59
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
60 cmsErrorAction(LCMS_ERROR_IGNORE);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
61 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
62
424
26c6e768bd47 first support for AdobeRGB colorspace
nadvornik
parents: 398
diff changeset
63 static cmsHPROFILE color_man_create_adobe_comp()
26c6e768bd47 first support for AdobeRGB colorspace
nadvornik
parents: 398
diff changeset
64 {
26c6e768bd47 first support for AdobeRGB colorspace
nadvornik
parents: 398
diff changeset
65 /* ClayRGB1998 is AdobeRGB compatible */
26c6e768bd47 first support for AdobeRGB colorspace
nadvornik
parents: 398
diff changeset
66 #include "ClayRGB1998_icc.h"
26c6e768bd47 first support for AdobeRGB colorspace
nadvornik
parents: 398
diff changeset
67 return cmsOpenProfileFromMem(ClayRGB1998_icc, ClayRGB1998_icc_len);
26c6e768bd47 first support for AdobeRGB colorspace
nadvornik
parents: 398
diff changeset
68 }
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
69
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
70 /*
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
71 *-------------------------------------------------------------------
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
72 * color transform cache
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
73 *-------------------------------------------------------------------
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
74 */
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
75
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
76 static GList *cm_cache_list = NULL;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
77
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
78
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
79 static void color_man_cache_ref(ColorManCache *cc)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
80 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
81 if (!cc) return;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
82
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
83 cc->refcount++;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
84 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
85
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
86 static void color_man_cache_unref(ColorManCache *cc)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
87 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
88 if (!cc) return;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
89
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
90 cc->refcount--;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
91 if (cc->refcount < 1)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
92 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
93 if (cc->transform) cmsDeleteTransform(cc->transform);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
94 if (cc->profile_in) cmsCloseProfile(cc->profile_in);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
95 if (cc->profile_out) cmsCloseProfile(cc->profile_out);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
96
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
97 g_free(cc->profile_in_file);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
98 g_free(cc->profile_out_file);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
99
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
100 g_free(cc);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
101 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
102 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
103
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
104 static cmsHPROFILE color_man_cache_load_profile(ColorManProfileType type, const gchar *file,
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
105 unsigned char *data, guint data_len)
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
106 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
107 cmsHPROFILE profile = NULL;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
108
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
109 switch (type)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
110 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
111 case COLOR_PROFILE_FILE:
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
112 if (file)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
113 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
114 gchar *pathl;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
115
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
116 pathl = path_from_utf8(file);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
117 profile = cmsOpenProfileFromFile(pathl, "r");
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
118 g_free(pathl);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
119 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
120 break;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
121 case COLOR_PROFILE_SRGB:
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
122 profile = cmsCreate_sRGBProfile();
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
123 break;
424
26c6e768bd47 first support for AdobeRGB colorspace
nadvornik
parents: 398
diff changeset
124 case COLOR_PROFILE_ADOBERGB:
26c6e768bd47 first support for AdobeRGB colorspace
nadvornik
parents: 398
diff changeset
125 profile = color_man_create_adobe_comp();
26c6e768bd47 first support for AdobeRGB colorspace
nadvornik
parents: 398
diff changeset
126 break;
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
127 case COLOR_PROFILE_MEM:
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
128 if (data)
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
129 {
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
130 profile = cmsOpenProfileFromMem(data, data_len);
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
131 }
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
132 break;
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
133 case COLOR_PROFILE_NONE:
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
134 default:
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
135 break;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
136 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
137
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
138 return profile;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
139 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
140
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
141 static ColorManCache *color_man_cache_new(ColorManProfileType in_type, const gchar *in_file,
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
142 unsigned char *in_data, guint in_data_len,
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
143 ColorManProfileType out_type, const gchar *out_file,
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
144 gint has_alpha)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
145 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
146 ColorManCache *cc;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
147
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
148 color_man_lib_init();
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
149
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
150 cc = g_new0(ColorManCache, 1);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
151 cc->refcount = 1;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
152
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
153 cc->profile_in_type = in_type;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
154 cc->profile_in_file = g_strdup(in_file);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
155
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
156 cc->profile_out_type = out_type;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
157 cc->profile_out_file = g_strdup(out_file);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
158
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
159 cc->has_alpha = has_alpha;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
160
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
161 cc->profile_in = color_man_cache_load_profile(cc->profile_in_type, cc->profile_in_file,
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
162 in_data, in_data_len);
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
163 cc->profile_out = color_man_cache_load_profile(cc->profile_out_type, cc->profile_out_file,
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
164 NULL, 0);
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
165
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
166 if (!cc->profile_in || !cc->profile_out)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
167 {
506
fc9c8a3e1a8b Handle the newline in DEBUG_N() macro instead of adding one
zas_
parents: 495
diff changeset
168 DEBUG_1("failed to load color profile for %s: %d %s",
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
169 (!cc->profile_in) ? "input" : "screen",
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
170 (!cc->profile_in) ? cc->profile_in_type : cc->profile_out_type,
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
171 (!cc->profile_in) ? cc->profile_in_file : cc->profile_out_file);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
172
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
173 color_man_cache_unref(cc);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
174 return NULL;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
175 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
176
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
177 cc->transform = cmsCreateTransform(cc->profile_in,
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
178 (has_alpha) ? TYPE_RGBA_8 : TYPE_RGB_8,
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
179 cc->profile_out,
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
180 (has_alpha) ? TYPE_RGBA_8 : TYPE_RGB_8,
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
181 INTENT_PERCEPTUAL, 0);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
182
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
183 if (!cc->transform)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
184 {
506
fc9c8a3e1a8b Handle the newline in DEBUG_N() macro instead of adding one
zas_
parents: 495
diff changeset
185 DEBUG_1("failed to create color profile transform");
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
186
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
187 color_man_cache_unref(cc);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
188 return NULL;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
189 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
190
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
191 if (cc->profile_in_type != COLOR_PROFILE_MEM)
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
192 {
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
193 cm_cache_list = g_list_append(cm_cache_list, cc);
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
194 color_man_cache_ref(cc);
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
195 }
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
196
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
197 return cc;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
198 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
199
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
200 static void color_man_cache_free(ColorManCache *cc)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
201 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
202 if (!cc) return;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
203
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
204 cm_cache_list = g_list_remove(cm_cache_list, cc);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
205 color_man_cache_unref(cc);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
206 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
207
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
208 static void color_man_cache_reset(void)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
209 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
210 while (cm_cache_list)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
211 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
212 ColorManCache *cc;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
213
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
214 cc = cm_cache_list->data;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
215 color_man_cache_free(cc);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
216 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
217 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
218
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
219 static ColorManCache *color_man_cache_find(ColorManProfileType in_type, const gchar *in_file,
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
220 ColorManProfileType out_type, const gchar *out_file,
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
221 gint has_alpha)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
222 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
223 GList *work;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
224
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
225 work = cm_cache_list;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
226 while (work)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
227 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
228 ColorManCache *cc;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
229 gint match = FALSE;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
230
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
231 cc = work->data;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
232 work = work->next;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
233
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
234 if (cc->profile_in_type == in_type &&
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
235 cc->profile_out_type == out_type &&
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
236 cc->has_alpha == has_alpha)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
237 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
238 match = TRUE;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
239 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
240
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
241 if (match && cc->profile_in_type == COLOR_PROFILE_FILE)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
242 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
243 match = (cc->profile_in_file && in_file &&
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
244 strcmp(cc->profile_in_file, in_file) == 0);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
245 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
246 if (match && cc->profile_out_type == COLOR_PROFILE_FILE)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
247 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
248 match = (cc->profile_out_file && out_file &&
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
249 strcmp(cc->profile_out_file, out_file) == 0);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
250 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
251
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
252 if (match) return cc;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
253 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
254
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
255 return NULL;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
256 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
257
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
258 static ColorManCache *color_man_cache_get(ColorManProfileType in_type, const gchar *in_file,
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
259 unsigned char *in_data, guint in_data_len,
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
260 ColorManProfileType out_type, const gchar *out_file,
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
261 gint has_alpha)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
262 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
263 ColorManCache *cc;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
264
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
265 cc = color_man_cache_find(in_type, in_file, out_type, out_file, has_alpha);
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
266 if (cc)
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
267 {
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
268 color_man_cache_ref(cc);
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
269 return cc;
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
270 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
271
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
272 return color_man_cache_new(in_type, in_file, in_data, in_data_len,
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
273 out_type, out_file, has_alpha);
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
274 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
275
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
276
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
277 /*
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
278 *-------------------------------------------------------------------
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
279 * color manager
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
280 *-------------------------------------------------------------------
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
281 */
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
282
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
283 static void color_man_done(ColorMan *cm, ColorManReturnType type)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
284 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
285 if (cm->func_done)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
286 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
287 cm->func_done(cm, type, cm->func_done_data);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
288 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
289 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
290
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
291 void color_man_correct_region(ColorMan *cm, GdkPixbuf *pixbuf, gint x, gint y, gint w, gint h)
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
292 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
293 ColorManCache *cc;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
294 guchar *pix;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
295 gint rs;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
296 gint i;
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
297 gint pixbuf_width, pixbuf_height;
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 424
diff changeset
298
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
299
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
300 pixbuf_width = gdk_pixbuf_get_width(pixbuf);
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
301 pixbuf_height = gdk_pixbuf_get_height(pixbuf);
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
302
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
303 cc = cm->profile;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
304
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
305 pix = gdk_pixbuf_get_pixels(pixbuf);
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
306 rs = gdk_pixbuf_get_rowstride(pixbuf);
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
307
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
308 w = MIN(w, pixbuf_width - x);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
309 h = MIN(h, pixbuf_height - y);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
310
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
311 pix += x * ((cc->has_alpha) ? 4 : 3);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
312 for (i = 0; i < h; i++)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
313 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
314 guchar *pbuf;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
315
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
316 pbuf = pix + ((y + i) * rs);
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 424
diff changeset
317
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
318 cmsDoTransform(cc->transform, pbuf, pbuf, w);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
319 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
320
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
321 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
322
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
323 static gint color_man_idle_cb(gpointer data)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
324 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
325 ColorMan *cm = data;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
326 gint width, height;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
327 gint rh;
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
328 if (!cm->pixbuf) return FALSE;
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
329
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
330 if (cm->imd &&
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
331 cm->pixbuf != image_get_pixbuf(cm->imd))
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
332 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
333 cm->idle_id = -1;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
334 color_man_done(cm, COLOR_RETURN_IMAGE_CHANGED);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
335 return FALSE;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
336 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
337
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
338 width = gdk_pixbuf_get_width(cm->pixbuf);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
339 height = gdk_pixbuf_get_height(cm->pixbuf);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
340
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
341 if (cm->row > height)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
342 {
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
343 if (!cm->incremental_sync && cm->imd)
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
344 {
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
345 image_area_changed(cm->imd, 0, 0, width, height);
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
346 }
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
347
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
348 cm->idle_id = -1;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
349 color_man_done(cm, COLOR_RETURN_SUCCESS);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
350 return FALSE;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
351 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
352
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
353 rh = COLOR_MAN_CHUNK_SIZE / width + 1;
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
354 color_man_correct_region(cm, cm->pixbuf, 0, cm->row, width, rh);
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
355 if (cm->incremental_sync && cm->imd) image_area_changed(cm->imd, 0, cm->row, width, rh);
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
356 cm->row += rh;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
357
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
358 return TRUE;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
359 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
360
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
361 static ColorMan *color_man_new_real(ImageWindow *imd, GdkPixbuf *pixbuf,
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
362 ColorManProfileType input_type, const gchar *input_file,
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
363 unsigned char *input_data, guint input_data_len,
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
364 ColorManProfileType screen_type, const gchar *screen_file)
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
365 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
366 ColorMan *cm;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
367 gint has_alpha;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
368
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
369 if (imd) pixbuf = image_get_pixbuf(imd);
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
370
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
371 cm = g_new0(ColorMan, 1);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
372 cm->imd = imd;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
373 cm->pixbuf = pixbuf;
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
374 if (cm->pixbuf) g_object_ref(cm->pixbuf);
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
375
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
376 cm->incremental_sync = FALSE;
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
377 cm->row = 0;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
378 cm->idle_id = -1;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
379
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
380 has_alpha = pixbuf ? gdk_pixbuf_get_has_alpha(pixbuf) : FALSE;
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
381
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
382 cm->profile = color_man_cache_get(input_type, input_file, input_data, input_data_len,
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
383 screen_type, screen_file, has_alpha);
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
384 if (!cm->profile)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
385 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
386 color_man_free(cm);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
387 return NULL;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
388 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
389
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
390 return cm;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
391 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
392
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
393 ColorMan *color_man_new(ImageWindow *imd, GdkPixbuf *pixbuf,
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
394 ColorManProfileType input_type, const gchar *input_file,
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
395 ColorManProfileType screen_type, const gchar *screen_file)
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
396 {
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
397 return color_man_new_real(imd, pixbuf,
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
398 input_type, input_file, NULL, 0,
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
399 screen_type, screen_file);
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
400 }
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
401
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
402 void color_man_start_bg(ColorMan *cm, ColorManDoneFunc done_func, gpointer done_data)
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
403 {
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
404 cm->func_done = done_func;
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
405 cm->func_done_data = done_data;
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
406 cm->idle_id = g_idle_add(color_man_idle_cb, cm);
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
407 }
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
408
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
409 ColorMan *color_man_new_embedded(ImageWindow *imd, GdkPixbuf *pixbuf,
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
410 unsigned char *input_data, guint input_data_len,
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
411 ColorManProfileType screen_type, const gchar *screen_file)
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
412 {
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
413 return color_man_new_real(imd, pixbuf,
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
414 COLOR_PROFILE_MEM, NULL, input_data, input_data_len,
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
415 screen_type, screen_file);
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
416 }
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 113
diff changeset
417
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
418 void color_man_free(ColorMan *cm)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
419 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
420 if (!cm) return;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
421
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
422 if (cm->idle_id != -1) g_source_remove(cm->idle_id);
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
423 if (cm->pixbuf) g_object_unref(cm->pixbuf);
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
424
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
425 color_man_cache_unref(cm->profile);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
426
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
427 g_free(cm);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
428 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
429
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
430 void color_man_update(void)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
431 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
432 color_man_cache_reset();
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
433 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
434
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
435 #else
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
436 /*** color support not enabled ***/
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
437
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
438
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
439 ColorMan *color_man_new(ImageWindow *imd, GdkPixbuf *pixbuf,
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
440 ColorManProfileType input_type, const gchar *input_file,
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
441 ColorManProfileType screen_type, const gchar *screen_file)
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
442 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
443 /* no op */
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
444 return NULL;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
445 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
446
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
447 ColorMan *color_man_new_embedded(ImageWindow *imd, GdkPixbuf *pixbuf,
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
448 unsigned char *input_data, guint input_data_len,
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
449 ColorManProfileType screen_type, const gchar *screen_file)
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
450 {
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
451 /* no op */
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
452 return NULL;
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
453 }
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
454
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
455 void color_man_free(ColorMan *cm)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
456 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
457 /* no op */
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
458 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
459
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
460 void color_man_update(void)
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
461 {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
462 /* no op */
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
463 }
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
464
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
465 void color_man_correct_region(ColorMan *cm, GdkPixbuf *pixbuf, gint x, gint y, gint w, gint h)
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
466 {
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
467 /* no op */
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
468 }
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
469
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
470 void color_man_start_bg(ColorMan *cm, ColorManDoneFunc done_func, gpointer done_data)
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
471 {
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
472 /* no op */
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 281
diff changeset
473 }
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
474
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
475 #endif