Siril Colour Management

Happy 2021 Everyone

Apologies if this topic has already been covered in other posts.

I’ve been playing around with Siril in Linux Mint for the last few days (v0.99.7 Appimage downloaded from GitLab). The software is fantastic and has amazingly powerful features that could really speed up my processing workflow. However, I have a couple of open questions about Siril’s color management workflow after initial testing.

First, Siril doesn’t seem to transform the image rendered in the RGB preview window from the internal (linear) working space to the color profile of the display, which is sRGB in my case. The result is an image that is rendered much darker than it should be. Changing the display mode from Linear to AutoStretch brightens the image of course, but the tone curve that’s applied isn’t the same as transforming the displayed image to the sRGB color space which has clearly defined primaries and non-linear RGB tone response curves. Is this the intended behavior of the software and if so why?

A second but related issue is that Siril adds an sRGB ICC profile to the metadata of exported tif files but doesn’t transform the image data accordingly. Consequently, images opened in color managed software like GIMP, RawTherapee, Darktable etc using the embedded ICC profile will be rendered incorrectly (too dark). There might also be other consequences for users that further process Siril’s images in these other software depending on which processing modules are used and where they lie in the pixel processing pipeline. Again, is this intended behaviour and if so why?

I know that colour management is tricky topic and difficult to get right so I thought I’d better ask the Siril experts first before I jump to wrong conclusions. Any insights or clarifications are greatly appreciated.

Best regards

1 Like

Hello.

You have to do it manually. At the end of the stack you have a linear images, very dark. It is normal. Remains a lot of process to apply to this linear image.

As stated in our documentation, this menu is just for vizualisation

Only if requested. You can save your image without ICC profile. But yes, even if your images is in linear you can saved this one in sRGB if you want.
However, the goal of Siril is to work your image from the lights until you stretch the histogram of the stacked image.

In these software you generally work on the stretched image. So no issue at all.

Which is the same problem - most software assumes sRGB if no profile is present. See Reference TIFFs are not tagged with an ICC profile that indicates linear data · Issue #5575 · Beep6581/RawTherapee · GitHub for a similar discussion of the issue. (Which reminds me, I need to revisit that topic and run the tests @Thanatomanic requested to try and reproduce the issue he found.)

It has been quite a while since I used siril, and I used it for a very specific purpose (stacking mosaiced images taken on tripod without demosaicing or alignment, and saving as FITS), but it sounds like what is not happening in this case (user error?) is that the file should have an ICC profile that indicates linear data attached.

If no calibration is required, then you can directly debayer your files in Siril applying the gamma you want. Then your image never will be linear.

Most, but not all. Photoshop, lightroom don’t.

In this case - I prefer to push as much of the workflow later to RawTherapee. Last I checked, Siril did not support DCP profiles on input and does not support DNG output, so my workflow is:
Sony ARWs in → Mosaiced FITS out (no colorspace conversion whatsoever, just stacking/averaging)
Convert FITS to TIF with ImageMagick (Note: Siril might have improved enough since I last used it to eliminate this step)
Rename TIF to DNG, use exiftool to properly tag it as a DNG with the appropriate tags.
Load in RawTherapee and perform all subsequent processing (color management, tonemapping)

Not really applicable if someone is preferring a 100% open source workflow

Quite complicated since it is doable with Siril.
Conversion ARW->demosaiced FITS and you can choose sRGB.

Stack with the algorithm you want.
Save in TIFF in sRGB

That’s all.

It’s not user error - Siril only offers the option to export TIF files with an ICC sRGB profile or none at all. If I select sRGB, then I expect Siril to transform the image data to the sRGB colour space. However, this doesn’t happen - Siril adds the profile to the metadata but doesn’t transform the image data. Alternatively, I could choose not to embed a profile in which case GIMP, RawTherapee and Darktable assume sRGB anyway. I could work around this issue by selecting the appropriate input colour space for the image, which is …?

Thanks for the reply

I agree that linear images are typically dark but I still think Siril renders images in the preview window darker than they should be - at least in Linux. I’m more than happy to be proven wrong so I did a quick test documented below. I know it’s verbose but I wanted to note down all the steps so it’s easy to spot a flaw in my logic.

  1. Develop a RAW (.cr2) file in RawTherapee (RT) using only basic demosaicing, raw blackpoint and white balance (camera) settings enabled. All non-linear processing settings like base curve, tone mapping etc are disabled. Thus, the underlying image data is linear.

  2. Export the image created in 1 as RT_NL.TIF with a standard (non-linear) ICC sRGB profile. Verify that the embedded ICC profile is sRGB using exiftool. The image data encoded in RT_NL.TIF is non-linear.

  3. Export image created in 1 as RT_L.TIF with a custom linear ICC sRGB colour profile (i.e. gamma = 1, slope = 0). Verify that the embedded ICC profile is custom sRGB using exiftool. The image data encoded in RT_L.TIF is linear.

  4. Open RT_L.TIF and RT_NL.TIF in a new instance of RT with “embedded ICC profile” as the input colour profile, “sRGB” as the output (display) colour profile and all other processing settings disabled.

RT renders both TIF images identically in its preview window and they look the same as the developed RAW image did; that is, same brightness, colours, histogram etc. This result is as expected since both TIFs are created from the same (linear) image and only the file encoding is different.

  1. Open RT_L.TIF and RT_NL.TIF in Darktable (DT) with “embedded ICC profile” as the input colour profile, “system display profile” as the display colour profile and all other processing settings disabled.

DT also renders both images identically in its preview window and they look the same as in RT. Of course, the images look relatively dull and dark since no image enhancements like a base curve or tone mapping were applied. The point is that both the linear and non-linear encoded images are rendered consistently in colour managed software and this serves as my reference for a “correctly” rendered image.

  1. Open RT_NL.TIF in Siril (v0.99.7) with the display mode set to “Linear”.

The image is rendered in Siril’s RGB preview window exactly as it was in RT and DT – all good so far.

  1. Open RT_L.TIF in Siril with the display mode set to “Linear”.

This time the (linear) image is rendered much darker, almost black, and not at all how RT and DT presented the same image. I assume that Siril does not account for the monitor’s colour profile for the images displayed in the RGB preview window. This could explain why the linear image looks too dark – the sRGB monitor expects an sRGB image and applies a gamma correction accordingly. It also explains why the non-linear image is rendered correctly – RT_NL.TIF is already encoded in the same colour space as the display.

No. This is not the goal at all. In fact you should save with this profile only at the end of the workflow. It is intended you do work with the linear image only within Siril.

No SIril does not take into account any colour profile when reading image. Again this is wanted because this is not the goal of Siril.
In fact, the only reason we propose to save an embeded ICC profile is for user that use Photoshop or Ligntroom. These users had some issues because these software don’t assume sRGB if no profile available.
But you have to keep in mind that Siril is not a raw developer like Darktable and/or Rawtherapee. Most images handled by Siril come from Astronomy camera where ICC profile is really not known.
So we do offer the ability to embed the ICC profile only at the end of the toolchain to help the user that don’t know anything about ICC profile and that didn’t understand why color was different inside photoshop. That’s all.

It’s clear to me that the image should only be saved to tif with an sRGB profile at the end of the Siril workflow. Sometimes it’s difficult to describe accurately with words and things get lost in translation. For what it’s worth, I tried to share my thoughts in the diagram below. It describes two workflows. The first uses Siril only for linear operations like stacking and pushes the bulk of the final processing to another software like GIMP, RawTherapee or Darktable. But I believe Siril is intended to be more than stacking software and has some powerful features to further process images, which is described by second right-hand workflow. In my opinion, there are potential colour issues associated with both scenarios. Perhaps this isn’t how Siril was intended to be used but I have watched two Youtube videos which employed Siril in this way - so it’s not just me! To anyone else reading this post, please note that I’m not a colour management nor a Siril expert, so expect many errors in the diagram. I thought about not posting it because the last thing I want is to confuse others even more or suggest that one can’t get great results from Siril. Nevertheless, it basically explains what I experienced with the software so far. I’m happy to correct any mistakes that are pointed out.

2 Likes

Thanks for the feedback. I thought the whole idea of having ICC colour profiles and a colour management workflow was so that we didn’t have to think and talk about colour profiles and colour management :slight_smile:. Anyway, I have bothered you enough. I just need to play with the software more now and stop thinking about it. Good luck with version 1.0.

1 Like