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
VipsForeignSave: jfif is not a known file format #3775
Comments
Hi @casperbrike, There are a few things in the saver we'd need to block to write correct JFIF files (eg. CMYK images, EXIF resolution), so just adding the extension probably wouldn't be enough. I think JFIF shouldn't really be used any more. Are you sure you want to be able to save as JFIF? What's the use case? |
Ah I just read the linked issue. I'm amazed that people are still using JFIF! OK, I'll add |
Some people want to be able to save as xxx.jfif, see #3775 thanks casperbrike
... this will be in 8.15.1. I credited you in the changelog, I hope that's OK. |
Sounds great, thank you very much! |
In case anyone runs into this issue using brandoncc's heroku buildpack, I just created a PR to update Did some tests on my application and everything looks good |
Bug report
Describe the bug
I'm using
ruby-vips
Ruby gem and trying to save an image in JFIF file format, however, it gives meVipsForeignSave
error:I debugged this issue a bit and found out that
write_to_file
callsvips_foreign_find_save
function from libvips andvips_foreign_find_save
raisesVipsForeignSave
error for JFIF file format.Interestingly that libvips does support JFIF format, for example, we can convert JPG image to JFIF and vice versa:
However, if you try to resize a JFIF image then you'll get the same
VipsForeignSave
error:To Reproduce
Steps to reproduce the behavior:
.txt
from filename after you download the image): sun.jfif.txtvips resize sun.jfif resized.jfif 0.5
VipsForeignSave
errorEnvironment
Additional details
I'm not really proficient at C but, probably, a solution would be to add
.jfif
here?libvips/libvips/foreign/vips2jpeg.c
Line 907 in fb94a2f
The text was updated successfully, but these errors were encountered: