[gegl] operations/external/raw-load: Switch the output format to "R'G'B' u16"
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] operations/external/raw-load: Switch the output format to "R'G'B' u16"
- Date: Tue, 7 Feb 2017 22:44:22 +0000 (UTC)
commit 8b22ff1927058a32c004d43bcfc0887d458793e7
Author: Debarshi Ray <debarshir gnome org>
Date: Sat Feb 4 19:32:05 2017 +0100
operations/external/raw-load: Switch the output format to "R'G'B' u16"
A non-destructive image editor would want to perform certain operations
as early as possible in the pipeline. One such operation is
gegl:noise-reduction, and that works in "R'G'B'A float". Thus, it
makes sense for the RAW loader's output to be in the sRGB colour space
to avoid a needless conversion from perceptual to linear spaces.
Secondly, other commonly used loaders, like JPEG and PNG, also output
sRGB. Having the RAW loader use the same colour space will make it easy
for an application by removing the need to special case the
configuration of its pipeline for different image formats.
https://bugzilla.gnome.org/show_bug.cgi?id=778183
operations/external/raw-load.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/operations/external/raw-load.c b/operations/external/raw-load.c
index 8fac0f7..30f9498 100644
--- a/operations/external/raw-load.c
+++ b/operations/external/raw-load.c
@@ -101,14 +101,15 @@ prepare (GeglOperation *operation)
p->LibRaw->params.aber[0] = 1.0;
p->LibRaw->params.aber[2] = 1.0;
- p->LibRaw->params.gamm[0] = 1.0;
- p->LibRaw->params.gamm[1] = 1.0;
+ p->LibRaw->params.gamm[0] = 1.0 / 2.4;
+ p->LibRaw->params.gamm[1] = 12.92;
p->LibRaw->params.bright = 1.0f;
p->LibRaw->params.half_size = FALSE;
p->LibRaw->params.highlight = 0;
p->LibRaw->params.use_auto_wb = TRUE;
p->LibRaw->params.use_camera_wb = TRUE;
p->LibRaw->params.use_camera_matrix = 1;
+ p->LibRaw->params.output_color = 1;
p->LibRaw->params.user_flip = 0;
p->LibRaw->params.no_auto_bright = 1;
p->LibRaw->params.auto_bright_thr = 0.01f;
@@ -148,7 +149,7 @@ get_bounding_box (GeglOperation *operation)
{
result.width = p->LibRaw->sizes.width;
result.height = p->LibRaw->sizes.height;
- gegl_operation_set_format (operation, "output", babl_format ("RGB u16"));
+ gegl_operation_set_format (operation, "output", babl_format ("R'G'B' u16"));
}
return result;
@@ -192,9 +193,9 @@ process (GeglOperation *operation,
rect.height = p->image->height;
if (p->image->colors == 1)
- format = babl_format ("Y u16");
+ format = babl_format ("Y' u16");
else // 3 color channels
- format = babl_format ("RGB u16");
+ format = babl_format ("R'G'B' u16");
gegl_buffer_set (output, &rect, 0, format, p->image->data, GEGL_AUTO_ROWSTRIDE);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]