You've already forked image_processing
mirror of
https://github.com/usetrmnl/image_processing.git
synced 2026-04-29 13:33:11 -07:00
4927d40c83
Sometimes libvips is not able to identify the source image type, even if
there is a corresponding loader. In this case it's useful to be able to
tell libvips which loader to use. So, we add a `:loader` option that
does just that:
ImageProcessing::Vips
.loader(loader: :svg) # calls `Vips::Image.svgload`
# ...
For symmetry, we also add a `:saver` option, just in case libvips isn't
able to correctly identify the file extension of the destination path.
ImageProcessing::Vips
.saver(saver: :tiff) # calls `Vips::Image#tiffsave`
# ...
Closes #49