Closed moski closed 1 month ago
Hi @moski, you can pass loader option as a suffix to the path:
{:ok, img} = Vix.Vips.Image.new_from_file("~/Downloads/favicon.ico[page=3]")
I'll add support for additional keyword list argument too
Like magic, works 100%.
Thank you for the fast reply and thank you for the amazing library. I've also noticed, that ico format doesn't work with PRECOMPILED_NIF_AND_LIBVIPS. I had to use VIX_COMPILATION_MODE=PLATFORM_PROVIDED_LIBVIPS
Maybe it's worth to add it to the docs as well.
Thanks.
Yeah, precompiled libvips only supports few formats. Formats are mentioned here, but I guess it is not easy to spot with all other details. I'll update the docs
We have an ICO image, with 4 different page. We can't find any option to load a specific page. I can see from the C binding that
Takes arguments, but there is no way to pass page into new_from_file.
For example, in the Ruby version, you can do:
Sample image: https://149426355.v2.pressablecdn.com/wp-content/themes/sixcolors/images/favicon.ico