Author: post
Date: 2010-05-06 21:58:57 +0200 (Thu, 06 May 2010)
New Revision: 3364
Modified:
trunk/librawstudio/rs-color-space-icc.c
trunk/librawstudio/rs-color-space.c
trunk/librawstudio/rs-color-space.h
trunk/plugins/colorspace-adobergb/colorspace-adobergb.c
trunk/plugins/colorspace-prophoto/colorspace-prophoto.c
trunk/plugins/colorspace-srgb/colorspace-srgb.c
trunk/plugins/colorspace-transform/colorspace_transform.c
trunk/plugins/output-jpegfile/output-jpegfile.c
trunk/plugins/output-pngfile/output-pngfile.c
trunk/plugins/output-tifffile/output-tifffile.c
Log:
Add option to request a linear profiles for file inclusion.
Modified: trunk/librawstudio/rs-color-space-icc.c
===================================================================
--- trunk/librawstudio/rs-color-space-icc.c 2010-05-06 19:39:53 UTC (rev
3363)
+++ trunk/librawstudio/rs-color-space-icc.c 2010-05-06 19:58:57 UTC (rev
3364)
@@ -21,7 +21,7 @@
G_DEFINE_TYPE(RSColorSpaceIcc, rs_color_space_icc, RS_TYPE_COLOR_SPACE)
-static const RSIccProfile *get_icc_profile(const RSColorSpace *color_space);
+static const RSIccProfile *get_icc_profile(const RSColorSpace *color_space,
gboolean linear_profile);
static void
rs_color_space_icc_dispose(GObject *object)
@@ -79,7 +79,7 @@
}
static const
-RSIccProfile *get_icc_profile(const RSColorSpace *color_space)
+RSIccProfile *get_icc_profile(const RSColorSpace *color_space, gboolean
linear_profile)
{
RSColorSpaceIcc *color_space_icc = RS_COLOR_SPACE_ICC(color_space);
Modified: trunk/librawstudio/rs-color-space.c
===================================================================
--- trunk/librawstudio/rs-color-space.c 2010-05-06 19:39:53 UTC (rev 3363)
+++ trunk/librawstudio/rs-color-space.c 2010-05-06 19:58:57 UTC (rev 3364)
@@ -125,12 +125,12 @@
* @return A RSIccProfile (or NULL) that should not be unreffed
*/
const RSIccProfile *
-rs_color_space_get_icc_profile(const RSColorSpace *color_space)
+rs_color_space_get_icc_profile(const RSColorSpace *color_space, gboolean
linear_profile)
{
RSColorSpaceClass *klass = RS_COLOR_SPACE_GET_CLASS(color_space);
if (klass->get_icc_profile)
- return klass->get_icc_profile(color_space);
+ return klass->get_icc_profile(color_space, linear_profile);
else
return NULL;
}
Modified: trunk/librawstudio/rs-color-space.h
===================================================================
--- trunk/librawstudio/rs-color-space.h 2010-05-06 19:39:53 UTC (rev 3363)
+++ trunk/librawstudio/rs-color-space.h 2010-05-06 19:58:57 UTC (rev 3364)
@@ -82,7 +82,7 @@
const gchar *name;
const gchar *description;
- const RSIccProfile *(*get_icc_profile)(const RSColorSpace *color_space);
+ const RSIccProfile *(*get_icc_profile)(const RSColorSpace *color_space,
gboolean linear_profile);
const RS1dFunction *(*get_gamma_function)(const RSColorSpace
*color_space);
} RSColorSpaceClass;
@@ -129,7 +129,7 @@
* @return A RSIccProfile (or NULL) that should not be unreffed
*/
const RSIccProfile *
-rs_color_space_get_icc_profile(const RSColorSpace *color_space);
+rs_color_space_get_icc_profile(const RSColorSpace *color_space, gboolean
linear_profile);
/**
* Get the gamma transfer function for this color space
Modified: trunk/plugins/colorspace-adobergb/colorspace-adobergb.c
===================================================================
--- trunk/plugins/colorspace-adobergb/colorspace-adobergb.c 2010-05-06
19:39:53 UTC (rev 3363)
+++ trunk/plugins/colorspace-adobergb/colorspace-adobergb.c 2010-05-06
19:58:57 UTC (rev 3364)
@@ -41,7 +41,7 @@
RS_DEFINE_COLOR_SPACE(rs_adobe_rgb, RSAdobeRGB)
-static const RSIccProfile *get_icc_profile(const RSColorSpace *color_space);
+static const RSIccProfile *get_icc_profile(const RSColorSpace *color_space,
gboolean linear_profile);
G_MODULE_EXPORT void
rs_plugin_load(RSPlugin *plugin)
@@ -76,7 +76,7 @@
}
static const RSIccProfile *
-get_icc_profile(const RSColorSpace *color_space)
+get_icc_profile(const RSColorSpace *color_space, gboolean linear_profile)
{
RSAdobeRGB *adobe_rgb = RS_ADOBERGB(color_space);
Modified: trunk/plugins/colorspace-prophoto/colorspace-prophoto.c
===================================================================
--- trunk/plugins/colorspace-prophoto/colorspace-prophoto.c 2010-05-06
19:39:53 UTC (rev 3363)
+++ trunk/plugins/colorspace-prophoto/colorspace-prophoto.c 2010-05-06
19:58:57 UTC (rev 3364)
@@ -41,7 +41,7 @@
RS_DEFINE_COLOR_SPACE(rs_prophoto, RSProphoto)
-static const RSIccProfile *get_icc_profile(const RSColorSpace *color_space);
+static const RSIccProfile *get_icc_profile(const RSColorSpace *color_space,
gboolean linear_profile);
G_MODULE_EXPORT void
rs_plugin_load(RSPlugin *plugin)
@@ -75,7 +75,7 @@
}
static const RSIccProfile *
-get_icc_profile(const RSColorSpace *color_space)
+get_icc_profile(const RSColorSpace *color_space, gboolean linear_profile)
{
RSProphoto *prophoto = RS_PROPHOTO(color_space);
Modified: trunk/plugins/colorspace-srgb/colorspace-srgb.c
===================================================================
--- trunk/plugins/colorspace-srgb/colorspace-srgb.c 2010-05-06 19:39:53 UTC
(rev 3363)
+++ trunk/plugins/colorspace-srgb/colorspace-srgb.c 2010-05-06 19:58:57 UTC
(rev 3364)
@@ -42,7 +42,7 @@
RS_DEFINE_COLOR_SPACE(rs_srgb, RSSrgb)
-static const RSIccProfile *get_icc_profile(const RSColorSpace *color_space);
+static const RSIccProfile *get_icc_profile(const RSColorSpace *color_space,
gboolean linear_profile);
static const RS1dFunction *get_gamma_function(const RSColorSpace *color_space);
G_MODULE_EXPORT void
@@ -80,7 +80,7 @@
}
static const RSIccProfile *
-get_icc_profile(const RSColorSpace *color_space)
+get_icc_profile(const RSColorSpace *color_space, gboolean linear_profile)
{
RSSrgb *srgb = RS_SRGB(color_space);
Modified: trunk/plugins/colorspace-transform/colorspace_transform.c
===================================================================
--- trunk/plugins/colorspace-transform/colorspace_transform.c 2010-05-06
19:39:53 UTC (rev 3363)
+++ trunk/plugins/colorspace-transform/colorspace_transform.c 2010-05-06
19:58:57 UTC (rev 3364)
@@ -311,8 +311,8 @@
{
const RSIccProfile *i, *o;
- i = rs_color_space_get_icc_profile(input_space);
- o = rs_color_space_get_icc_profile(output_space);
+ i = rs_color_space_get_icc_profile(input_space, TRUE);
+ o = rs_color_space_get_icc_profile(output_space, TRUE);
rs_cmm_set_input_profile(colorspace_transform->cmm, i);
rs_cmm_set_output_profile(colorspace_transform->cmm, o);
@@ -426,8 +426,8 @@
{
const RSIccProfile *i, *o;
- i = rs_color_space_get_icc_profile(input_space);
- o = rs_color_space_get_icc_profile(output_space);
+ i = rs_color_space_get_icc_profile(input_space, TRUE);
+ o = rs_color_space_get_icc_profile(output_space, FALSE);
rs_cmm_set_input_profile(colorspace_transform->cmm, i);
rs_cmm_set_output_profile(colorspace_transform->cmm, o);
Modified: trunk/plugins/output-jpegfile/output-jpegfile.c
===================================================================
--- trunk/plugins/output-jpegfile/output-jpegfile.c 2010-05-06 19:39:53 UTC
(rev 3363)
+++ trunk/plugins/output-jpegfile/output-jpegfile.c 2010-05-06 19:58:57 UTC
(rev 3364)
@@ -236,7 +236,7 @@
jpeg_start_compress(&cinfo, TRUE);
if (jpegfile->color_space &&
!g_str_equal(G_OBJECT_TYPE_NAME(jpegfile->color_space), "RSSrgb"))
{
- const RSIccProfile *profile =
rs_color_space_get_icc_profile(jpegfile->color_space);
+ const RSIccProfile *profile =
rs_color_space_get_icc_profile(jpegfile->color_space, FALSE);
if (profile)
{
gchar *data;
Modified: trunk/plugins/output-pngfile/output-pngfile.c
===================================================================
--- trunk/plugins/output-pngfile/output-pngfile.c 2010-05-06 19:39:53 UTC
(rev 3363)
+++ trunk/plugins/output-pngfile/output-pngfile.c 2010-05-06 19:58:57 UTC
(rev 3364)
@@ -182,10 +182,10 @@
{
gchar *data;
gsize data_length;
- const RSIccProfile *profile =
rs_color_space_get_icc_profile(pngfile->color_space);
+ const RSIccProfile *profile =
rs_color_space_get_icc_profile(pngfile->color_space, pngfile->save16bit);
rs_icc_profile_get_data(profile, &data, &data_length);
- // FIXME:
+ // FIXME: Insert correct profile name
png_set_iCCP(png_ptr, info_ptr, "Profile name",
PNG_COMPRESSION_TYPE_BASE, data, data_length);
if (pngfile->save16bit)
png_set_gAMA(png_ptr, info_ptr, 1.0);
Modified: trunk/plugins/output-tifffile/output-tifffile.c
===================================================================
--- trunk/plugins/output-tifffile/output-tifffile.c 2010-05-06 19:39:53 UTC
(rev 3363)
+++ trunk/plugins/output-tifffile/output-tifffile.c 2010-05-06 19:58:57 UTC
(rev 3364)
@@ -207,7 +207,7 @@
return(FALSE);
if (tifffile->color_space &&
!g_str_equal(G_OBJECT_TYPE_NAME(tifffile->color_space), "RSSrgb"))
- profile = rs_color_space_get_icc_profile(tifffile->color_space);
+ profile = rs_color_space_get_icc_profile(tifffile->color_space,
tifffile->save16bit);
RSFilterRequest *request = rs_filter_request_new();
rs_filter_request_set_quick(request, FALSE);
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit