Opened 11 hours ago
Last modified 11 hours ago
#11424 new defect
Colors get distorted when converting from an animated PNG into an animated GIF
Reported by: | idest | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffmpeg |
Version: | unspecified | Keywords: | |
Cc: | idest | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description (last modified by )
Try converting the attached animated PNG file, spiral.png, into a GIF animation with the command
ffmpeg -i spiral.png spiral.gif
Notice that in the resulting file, spiral.gif (also attached), colors are distorted: almost all the curves are in yellow.
Reported FFMpeg version: N-118325-gea381285e7-20250119,
OS: Windows 10 Home.
Attachments (2)
Change History (5)
by , 11 hours ago
Attachment: | spiral.png added |
---|
by , 11 hours ago
Attachment: | spiral.gif added |
---|
comment:1 by , 11 hours ago
Description: | modified (diff) |
---|
comment:3 by , 11 hours ago
Thank you for the explanation, Leo, your command produces the desired result.
Note:
See TracTickets
for help on using tickets.
This is caused by the automatic converstion from rgb24 to bgr8, which is the default for the gif encoder. bgr8 cannot represent the colors correctly. Use this instead:
ffmpeg -i spiral.png -vf 'split[v],palettegen,[v]paletteuse' spiral.gif
The original picture only has 60 colors so this shouldn't create any loss.