-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support ImageMagick as an image source #71
Comments
Thanks for the heads up! I've considered bimg, but haven't tested it very much yet. I quite like that the current build is CGo-free, but I'm not opposed to having an optimized "production" build that can make use of libvips, especially if it can be faster at decoding. I don't have a lot of energy to mess with C builds 😅 |
I also discovered yesterday that ffmpeg can scale and decode images also :) ffmpeg -i input_image.cr2 -filter_complex \
"[0:v]scale=1080:-1[1080p]; \
[0:v]scale=720:-1[720p]; \
[0:v]scale=480:-1[480p]; \
[0:v]scale=320:-1[320p]" \
-map "[1080p]" -c:v libwebp -q:v 85 output_1080.webp \
-map "[720p]" -c:v libwebp -q:v 85 output_720.webp \
-map "[480p]" -c:v libwebp -q:v 85 output_480.webp \
-map "[320p]" -c:v libwebp -q:v 85 output_320.webp |
FFmpeg is actually already supported by default! :) The default config is that it each file has 3 virtual thumbnails/variants backed by ffmpeg (256x256, 1280x1280, 4096x4096), which are generated on the fly if no other good source exists. You can also override this in your local config :) Lines 320 to 342 in 31d4ede
In practice it works great across many popular file types (esp. for thumbnails of videos of course), but RAW support is a bit lacking. Some files work ok, others don't work at all. |
Is your feature request related to a problem? Please describe.
Current image sources (native Go, JPEG thumbnails, FFmpeg, ...) do not support all the various popular formats out there, the biggest one being HEIC, which is widely used for iPhone photos (see #52).
Describe the solution you'd like
Add optional support for decoding images with imagemagick. There is a mostly complete implementation already in main...imagemagick, but I wasn't super happy with usability yet, so it might need more work?
Describe alternatives you've considered
https://www.libvips.org/ might be another good one that supports many formats, including HEIC.
Additional context
N/A
The text was updated successfully, but these errors were encountered: