🗜️ GIF 压缩(动图瘦身)Compress GIF
在浏览器里压缩 GIF 动图:统一调色板、只保存每帧变化的区域、合并重复帧,并可选择减少颜色、有损压缩(忽略细微变化)、隔帧删除或缩小尺寸;保留帧延迟、循环次数和透明,压缩后不变小就保留原文件,文件不上传。Shrink animated GIFs in your browser. Frames share one palette, only the changed area of each frame is stored and duplicate frames are merged; you can also reduce colours, apply lossy compression (ignore tiny changes), drop every other frame or scale down. Delays, loop count and transparency are kept, the original is kept if the result isn't smaller, and nothing is uploaded.
使用说明与常见问题How-to & FAQ
「GIF 压缩(动图瘦身)」是什么?What is the Compress GIF tool?
在浏览器里压缩 GIF 动图:统一调色板、只保存每帧变化的区域、合并重复帧,并可选择减少颜色、有损压缩(忽略细微变化)、隔帧删除或缩小尺寸;保留帧延迟、循环次数和透明,压缩后不变小就保留原文件,文件不上传。Shrink animated GIFs in your browser. Frames share one palette, only the changed area of each frame is stored and duplicate frames are merged; you can also reduce colours, apply lossy compression (ignore tiny changes), drop every other frame or scale down. Delays, loop count and transparency are kept, the original is kept if the result isn't smaller, and nothing is uploaded.
如何使用「GIF 压缩(动图瘦身)」?How do I use the Compress GIF tool?
在「GIF 压缩(动图瘦身)」中,在上方填写或选择所需内容,结果会实时显示在下方;所有处理都在浏览器本地完成。In the Compress GIF: Fill in or choose the options above and the result appears below instantly; everything runs locally in your browser.
GIF 是怎么被压缩的?How is the GIF compressed?
先把所有帧合成为完整画面,再重新编码:所有帧共用一个调色板;从第二帧开始,和上一帧相同的像素写成透明,只保存发生变化的矩形区域;完全相同的连续帧合并为一帧并累加延迟。这些都是无损的。如果还不够小,可以减少颜色、开启有损(与当前画面颜色差别很小的像素也视为未变化)、隔帧删除或缩小尺寸。Every frame is first composited to a full picture and then re-encoded: all frames share one palette, from the second frame on pixels that match the previous frame are written as transparent so only the changed rectangle is stored, and identical consecutive frames are merged with their delays added. All of that is lossless. For a smaller file, reduce colours, turn on lossy mode (pixels only slightly different from what's on screen also count as unchanged), drop frames or scale down.
为什么有时压缩后反而没有变小?Why doesn't it always get smaller?
用 Photoshop、ezgif、gifsicle 等工具优化过的 GIF 已经只保存变化区域,原调色板也可能更合适,这时无损重编码很难再变小。工具会比较大小,结果不比原文件小时直接保留原文件,不会让文件变大。此时请降低颜色数、提高有损程度或缩小尺寸。GIFs already optimised by Photoshop, ezgif, gifsicle and similar tools store only changed areas, and their original palettes may suit them better, so lossless re-encoding rarely helps. The tool compares sizes and keeps the original when the result isn't smaller, so a file never grows. In that case lower the colours, raise the lossy level or scale down.
隔帧删除会让动画变快吗?Does dropping frames speed up the animation?
不会。删除的帧的延迟会加到保留的帧上,总时长保持不变,只是动作看起来没那么流畅。例如每 2 帧保留 1 帧时,原来每帧 70 毫秒的动画变成每帧 140 毫秒。循环次数(无限循环或播放几次)也原样保留。No. The delays of dropped frames are added to the frames that remain, so the total duration stays the same and motion just looks less smooth. For example, keeping 1 in 2 frames turns 70 ms frames into 140 ms frames. The loop count (forever or a set number of times) is kept too.
透明背景的 GIF 可以压缩吗?Can transparent GIFs be compressed?
可以,透明区域会保留。如果动画里有像素从不透明变回透明(例如在透明背景上移动的物体),后续帧就不能只存变化区域,工具会改用“每帧清除后整帧绘制”的方式,压缩率会低一些,但显示正确。半透明像素会按 50% 阈值变为完全透明或完全不透明,因为 GIF 只支持 1 位透明。Yes, transparency is kept. If pixels go from opaque back to transparent (an object moving over a transparent background, say), later frames can't store just the changes, so the tool clears and redraws each full frame instead; that compresses less but displays correctly. Semi-transparent pixels become fully transparent or opaque at a 50% threshold, because GIF only supports 1-bit transparency.
文件会上传吗?有大小限制吗?Is the file uploaded? Is there a size limit?
不会上传,解码、压缩和预览都在你的浏览器里完成。单个文件最大 100 MB,画面最大 4,000 万像素(宽 × 高),帧数最多 2,000 帧;尺寸较大的 GIF 受浏览器内存限制,能处理的帧数会更少,届时会提示。No. Decoding, compression and preview all happen in your browser. Files up to 100 MB, frames up to 40 megapixels (width × height) and up to 2,000 frames are supported; with large dimensions fewer frames fit in browser memory, and you'll be told if frames were left out.
有哪些选项可以调整?What options can I adjust?
「GIF 压缩(动图瘦身)」的设置:「颜色数」可选 256 色(画质最好)、128 色、64 色、32 色、16 色(默认 256 色(画质最好));「有损程度」可选 无损(只去掉重复像素)、轻度有损、中度有损、强力有损(默认 无损(只去掉重复像素));「帧数」可选 保留全部帧、每 2 帧保留 1 帧、每 3 帧保留 1 帧(默认 保留全部帧);「尺寸」可选 原尺寸、75%、50%、33%(默认 原尺寸);可选文件:GIF。改动任一选项后结果会按新设置重新生成。Settings in the Compress GIF — "Colours": 256 colours (best), 128 colours, 64 colours, 32 colours, 16 colours (default 256 colours (best)); "Lossy level": Lossless, Light, Medium, Strong (default Lossless); "Frames": Keep all frames, Keep 1 in 2, Keep 1 in 3 (default Keep all frames); "Size": Original size, 75%, 50%, 33% (default Original size); files: GIF. Changing any option regenerates the result with the new setting.
「GIF 压缩(动图瘦身)」免费吗?需要注册吗?Is the Compress GIF free? Do I need an account?
「GIF 压缩(动图瘦身)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Compress GIF is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.