https://gitlab.astro.unige.ch/integral/components/ii_shadow_build/-/blob/master/ii_shadow_build_image.cpp#L181