diff options
author | FRIGN <dev@frign.de> | 2016-01-20 22:31:25 +0100 |
---|---|---|
committer | FRIGN <dev@frign.de> | 2016-01-20 22:31:25 +0100 |
commit | e9feca5c2bda05b9a356617868fd4b08ec903d0d (patch) | |
tree | c2365c79339e2b020fbd1ecb61ae60c85ae38cdb /png2ff.c | |
parent | 291e677210c6c2c1d1eba2f0ba2243806ef63b07 (diff) |
Use linear RGB
Makes things a lot easier for image manipulation algorithms which
can be expected to be applied to farbfeld data.
Diffstat (limited to 'png2ff.c')
-rw-r--r-- | png2ff.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -12,7 +12,7 @@ static char *argv0; -/* ProPhoto RGB */ +/* ROMM RGB primaries (ISO 22028-2:2013) */ static cmsCIExyYTRIPLE primaries = { /* x, y, Y */ { 0.7347, 0.2653, 0.288040 }, /* red */ @@ -32,7 +32,7 @@ main(int argc, char *argv[]) { cmsHPROFILE in_prof, out_prof; cmsHTRANSFORM trans; - cmsToneCurve *gamma18, *out_curves[3]; + cmsToneCurve *gamma10, *out_curves[3]; png_structp pngs; png_infop pngi; int icc_compression; @@ -70,7 +70,7 @@ main(int argc, char *argv[]) height = png_get_image_height(pngs, pngi); png_row_p = png_get_rows(pngs, pngi); - /* icc profile (output ProPhoto RGB) */ + /* icc profile (output linear ROMM RGB (ISO 22028-2:2013)) */ if (png_get_valid(pngs, pngi, PNG_INFO_iCCP)) { png_get_iCCP(pngs, pngi, &icc_name, &icc_compression, &icc_data, &icc_len); @@ -81,9 +81,9 @@ main(int argc, char *argv[]) if (!(in_prof = cmsCreate_sRGBProfile())) goto lcmserr; } - if (!(gamma18 = cmsBuildGamma(NULL, 1.8))) + if (!(gamma10 = cmsBuildGamma(NULL, 1.0))) goto lcmserr; - out_curves[0] = out_curves[1] = out_curves[2] = gamma18; + out_curves[0] = out_curves[1] = out_curves[2] = gamma10; if (!(out_prof = cmsCreateRGBProfile(cmsD50_xyY(), &primaries, out_curves))) goto lcmserr; |