Skip to content

Conversation

@freespace
Copy link

Some raw converters, like darktable, only support predictor=1 when lossless JPEG compression is used. When predictor is 1 it is also necessary to encode the JPEG image without the interleaving trick. With this change we are able to produce compressed DNGs readable by darktable:

    writer.options(tags, path="", compress=True, predictor=1)
    writer.convert(gr12, filename=output_path)

When predictor is not specified, the existing behaviour is preserved as predictor defaults to 6.

…abled and adjusts the jpeg...

image size accordingly. This set of changes allows us to generate darktable compatible compressed
DNGs because darktable _only_ supports predictor=1 which requires the JPEG image size to be
exactly the DNG image size.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant