Repository navigation
Gifs sometimes get optimized incorrectly #2288
Description
Activity
- Reacted by Sigmundur Mørkøre
@JimBobSquarePants awesome :D
Is the weird artifacting (around the "V") in the second example a separate issue?
Ah... Didn't spot that. Separate issue. Not sure what the cause is there....Yet
Reacted by Sigmundur MørkøreOK. The issue there is that the image contains both global and local color tables but we only support one or the other.
BTW. I wouldn't currently recommend resizing/cropping multi-frame gifs in this manner with ImageSharp. Unfortunately, a current architectural limitation requires that all frames are the same size so each frame is padded if smaller to match. This can lead to multi-frame images being much larger following processing than the input.
Aah I see, makes sense 👍
Is it possible for ImageSharp to implement support for gifs with both kinds of color tables?
I may want to look into a tool that can convert gifs with both global and local color tables to just use one or the other.Thanks for the info on resizing/cropping!
It's absolutely possible. Working on a fix just now. Might take me a few days though.
Reacted by Sigmundur MørkøreThat looks perfect! ❤️
Reacted by James Jackson-South


Prerequisites
DEBUGandRELEASEmodeImageSharp version
v2.1.3
Other ImageSharp packages and versions
ImageSharp.Web 2.0.2
Environment (Operating system, version and so on)
Linux and Mac
.NET Framework version
6
Description
When doing any processing on some gifs, the output isn't correct.
Example 1


This is the original gif:
When sending it through ImageSharp.Web with any query parameters, even inconsequential ones, the output gif is extremely slow (with
rmode=crop):Example 2


This is the original gif:
When sending it through ImageSharp.Web with any query parameters, even inconsequential ones, the output gif has the first "V" in the smaller text almost turned into a "M" (with
rmode=crop):Steps to Reproduce
Images