Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow and/or bad conversion of RAW images to JPEG #413

Open
hjbaader opened this issue Dec 3, 2020 · 1 comment
Open

Slow and/or bad conversion of RAW images to JPEG #413

hjbaader opened this issue Dec 3, 2020 · 1 comment

Comments

@hjbaader
Copy link

hjbaader commented Dec 3, 2020

I plan to save only RAW images rather than the camera generated JPEG in the future. Making such images into gallery images might work with some formats, but it is slow because a giant TIFF file or whatever ist generated by Pillow. For my images in CR2 format, it produces mostly trash.

However the CR2 files contain a full-sized JPEG preview of the image in acceptable quality. So we could create a gallery image by simply extracting this JPEG and resizing it. I have created a patch which works for me but needs to be improved because it hard-codes everything. I'll make a pull request for checking it out.

@saimn
Copy link
Owner

saimn commented Apr 20, 2023

For the record, from the discussion in #414:

I would prefer to avoid dependency on external tools though, and I think there is a pretty good Python alternative: https://github.com/letmaik/rawpy
rawpy is based on libraw so it supports a wide range of raw formats (CRW/CR2, NEF, RAF, DNG, and others), and the README has an example of how to extract the preview image.

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

No branches or pull requests

2 participants