Skip to content
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

Saving gif files not working any more with version 8.12.1 #2574

Closed
erik-frontify opened this issue Dec 9, 2021 · 4 comments
Closed

Saving gif files not working any more with version 8.12.1 #2574

erik-frontify opened this issue Dec 9, 2021 · 4 comments
Labels

Comments

@erik-frontify
Copy link

While version 8.11.3 is able to save gif files (using ImageMagick if I did understand that correctly) version 8.12.1 fails with the error message

vipsthumbnail: unable to thumbnail testimage.jpeg
VipsForeignSave: "./test.gif" is not a known file format

To Reproduce
vipsthumbnail testimage.jpeg --output test.gif

Expected behavior
If there is no cgif support use ImageMagick as fallback to save gif files

Actual behavior
vipsthumbnail fails to save gif files

Environment
Self compiled libvips with the following options:
8.11.3
vips --vips-config

enable debug: no
enable deprecated library components: yes
enable modules: yes
use fftw3 for FFT: yes
accelerate loops with orc: no
ICC profile support with lcms: yes (lcms2)
zlib: yes
text rendering with pangocairo: yes
font file support with fontconfig: yes
RAD load/save: yes
Analyze7 load/save: yes
PPM load/save: yes
GIF load:  yes
EXIF metadata support with libexif: yes
JPEG load/save with libjpeg: yes (pkg-config)
JXL load/save with libjxl: no (dynamic module: no)
JPEG2000 load/save with libopenjp2: no
PNG load with libspng: yes
PNG load/save with libpng: yes (pkg-config libpng >= 1.2.9)
PNG quantisation to 8 bit: no
TIFF load/save with libtiff: yes (pkg-config libtiff-4)
image pyramid save: yes
HEIC/AVIF load/save with libheif: yes (dynamic module: yes)
WebP load/save with libwebp: yes
PDF load with PDFium:  no
PDF load with poppler-glib: yes (dynamic module: yes)
SVG load with librsvg-2.0: yes
EXR load with OpenEXR: yes
OpenSlide load: no (dynamic module: no)
Matlab load with matio: no
NIfTI load/save with niftiio: no
FITS load/save with cfitsio: no
Magick package: MagickCore (dynamic module: yes)
Magick API version: magick7
load with libMagickCore: yes
save with libMagickCore: yes

8.12.1
vips --vips-config

enable debug: no
enable deprecated library components: yes
enable modules: yes
use fftw3 for FFT: yes
accelerate loops with orc: no
ICC profile support with lcms: yes (lcms2)
zlib: yes
text rendering with pangocairo: yes
font file support with fontconfig: yes
RAD load/save: yes
Analyze7 load/save: yes
PPM load/save: yes
GIF load:  yes
EXIF metadata support with libexif: yes
JPEG load/save with libjpeg: yes (pkg-config)
JXL load/save with libjxl: no (dynamic module: no)
JPEG2000 load/save with libopenjp2: no
PNG load with libspng: yes
PNG load/save with libpng: yes (pkg-config libpng >= 1.2.9)
quantisation to 8 bit: no
TIFF load/save with libtiff: yes (pkg-config libtiff-4)
image pyramid save: yes
HEIC/AVIF load/save with libheif: yes (dynamic module: yes)
WebP load/save with libwebp: yes
PDF load with PDFium:  no
PDF load with poppler-glib: yes (dynamic module: yes)
SVG load with librsvg-2.0: yes
EXR load with OpenEXR: yes
OpenSlide load: no (dynamic module: no)
Matlab load with matio: no
NIfTI load/save with niftiio: no
FITS load/save with cfitsio: no
GIF save with cgif: no
Magick package: MagickCore (dynamic module: yes)
Magick API version: magick7
load with libMagickCore: yes
save with libMagickCore: yes

Is there a way to have ImageMagick as fallback if cgif isn't available?

@jcupitt
Copy link
Member

jcupitt commented Dec 9, 2021

Hi @erik-frontify,

Good idea, I'll have a look.

If you can get cgif, it's well worth it, you'll see a large drop in memory use and time to write. Quality is better too.

jcupitt added a commit that referenced this issue Dec 9, 2021
@jcupitt
Copy link
Member

jcupitt commented Dec 9, 2021

I added a fallback path via imagemagick for gif save and credited you, this change will be in 8.12.2.

Thanks again for reporting it!

@jcupitt jcupitt closed this as completed Dec 9, 2021
@erik-frontify
Copy link
Author

Wow, thanks @jcupitt. That was really incredibly fast!
And thank you for the tip about cgif. Yes, I tried to build that but therefore we would need meson which depends on python 3.6 which conflicts with the installed python 3.7 or something along these lines. But looks like Amazon Linux 2022 will solve that...

@jcupitt
Copy link
Member

jcupitt commented Dec 9, 2021

Oh, strange, meson should work with any python >= 3.6 I think.

There are some benchmarks of the libvips cgif saver, in case you didn't see them:

#2445 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants