You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
254 colors in image. Visible degradation in the frog. I like quantization, but I can't find any option to change how it behaves for GIFs. (also the fact that it didn't just chose one of the lesser-used colors while quantizing bugs me slightly)
The text was updated successfully, but these errors were encountered:
Dithers introduces by definition distributed distortion, but you're right, there's currently no way to change it (e.g. using Floyd-Steinberg dithering) or to turn if off (which could be useful for GIF to GIF processing). This requires adding an additional parameter in vips_magicksave that controls the dithering.
As for this particular image, I was able to reproduce this with the ImageMagick's convert tool, so maybe it's a bug there.
# Convert to PNG first to ensure *magick enables dithering
$ convert x.gif x.png
# Convert the PNG to GIF with a various set of dithers
$ convert x.png -dither None none.gif
$ convert x.png -dither Riemersma riemersma.gif
$ convert x.png -dither FloydSteinberg floyd-steinberg.gif
We're now A/B testing libvips 8.12 in production, which includes a new gifsave operation that doesn't use ImageMagick for saving GIF images. This particular quantization bug seems to be fixed now, but please report if you see anything strange.
There's some discussion to add indexed read/write support to libvips. This would avoid unpacking to RGB(A) and re-quantization for GIF images that are processed without performing any operations on the image (like this example), but it's not there yet.
Input image: https://www.hatena.ne.jp/images/what/what-riyo-img.gif
255 colors in image
Output image: https://images.weserv.nl/?url=https://www.hatena.ne.jp/images/what/what-riyo-img.gif
254 colors in image. Visible degradation in the frog. I like quantization, but I can't find any option to change how it behaves for GIFs. (also the fact that it didn't just chose one of the lesser-used colors while quantizing bugs me slightly)
The text was updated successfully, but these errors were encountered: