Python image conversion scripts - intended primarily for RawTherapee input but useful otherwise

I’ve been meaning for a while to learn to create DNG images from Python to support some image stacking work I want to do. (For my terrestrial application, siril’s requirement to convert input to FITS first is a performance issue, and similarly, having to manually convert FITS to TIF and tag as a DNG on output is also annoying).

On the road to that, and also to handle a couple of RawTherapee requests for niche input file formats, I’ve started working on some image conversion scripts.

The first one currently converts any float32 format supported by the imagecodecs module to floating-point TIFF with an ICC profile that corresponds to linear sRGB (other gamuts is a planned enhancement)

The second one currently converts any raw format supported by rawpy to DNG - mostly intended to support further preprocessing efforts such as average stacking, but also useful for as-yet unsupported image formats in RT (Sony lossless compressed, OM System cameras post-Olympus)

I’ve pushed it to GitHub - Entropy512/pyimageconvert: Various Python image conversion scripts - work in progress, I’m sure there are use cases I did not anticipate.

5 Likes

As an update:

I’ve added a mean-stacker script, which was my primary original goal - Add initial mean-stacker implementation · Entropy512/pyimageconvert@485ec1f · GitHub