CARTAvis / carta-python

CARTA scripting wrapper written in Python
GNU General Public License v3.0
0 stars 0 forks source link

color profile of the chrome browser #92

Open kswang1029 opened 1 year ago

kswang1029 commented 1 year ago

Users may run the same script to generate a PNG image plot on different platforms (eg macOS and ubuntu linux). The color profile of the rendered PNG may be different. It may be a good idea to add --force-color-profile=srgb when we initialize the headless chrome so that in principle, we will see the same rendered PNGs. Would this be sensible? @veggiesaurus @confluence @YuHsuan-Hwang

veggiesaurus commented 1 year ago

that's a good point. makes sense to use srgb

confluence commented 5 months ago

I don't know if it makes sense to hardcode this into the options -- but maybe we should. In the meantime, it is possible to pass additional flags to the browser in the existing code:

session = Session.start_and_create(Chrome(options=["--force-color-profile=srgb"]))
kswang1029 commented 5 months ago

I don't know if it makes sense to hardcode this into the options -- but maybe we should. In the meantime, it is possible to pass additional flags to the browser in the existing code:


session = Session.start_and_create(Chrome(options=["--force-color-profile=srgb"]))

With same data and same script, we should get same png output on different machines. I am not sure if, for example, matplotlib behaves like that as there are different backends to use. 🤔