-
Notifications
You must be signed in to change notification settings - Fork 63
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
get_value(Vips::META_LOADER) fails for gif files #93
Comments
Hi, I agree, this looks like a libvips bug. I'll have a look. |
vips__image_copy_fields_array() used to wipe meta on the output before merging the input images. This broke foreign.c in some cases, since it likes setting some meta on the output before calling the subclass loaders, and they sometimes call write(). see libvips/ruby-vips#93
OK, working for me now:
Thank you for reporting this dumbness! I'll try to think of a workaround for you in the meantime. |
Amazing, @jcupitt thank you for doing this! |
Looks like you can call
It gives you the canonical name of the loader class rather than the nickname, but it's obvious what it means. It should work on your libvips. There's |
👍 I've tried to avoid this because new_from_buffer would do detection again, no? However, the overhead seems to be small, so we are going to use |
Yes, it'll detect again, but detection is mostly quick. If you build your libvips without magick support and without support for things like openslide (very slow detection), it should be fast enough, I'd think. |
I'll close, I think this is done. |
Might be the issue with
libvips
, still, reporting it here. We are usingVips::META_LOADER
property to detect file types and correct Content-Type header. Unfortunately, it fails for gifs.produces
Gif loader is present in the system and Gif files can be loaded and manipulated. Just accessing
vips-loader
header value fails.Same code for jpegs:
produces
Maybe there are different means to detect image formats?
The text was updated successfully, but these errors were encountered: