← 返回命令列表

Linux command

gif2webp 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

gif2webp [path/to/image.gif] -o [path/to/image.webp]

说明

gif2webp converts GIF images, including animated GIFs, to WebP format. WebP typically provides better compression than GIF while maintaining quality, resulting in smaller file sizes suitable for web use. For animated GIFs, the tool preserves frame timing, loop count, and transparency. It supports both lossless compression (preserving exact pixel values) and lossy compression for even smaller files. The tool is part of Google's libwebp package.

参数

-o _FILE_
Output WebP filename
-q _QUALITY_
Quality factor (0-100), higher is better quality
-m _METHOD_
Compression method (0-6), higher is slower but better
-lossy
Use lossy compression (default is lossless for GIF)
-mixed
Use mixed lossy/lossless compression per frame
-min_size
Minimize output size (slower)
-loop_compatibility
Use compatibility mode for GIF loop count
-f _NUM_
Filter strength (0-100), for lossy compression
-metadata _STRING_
Comma-separated metadata to copy (all, none, icc, xmp)
-v
Verbose output

FAQ

What is the gif2webp command used for?

gif2webp converts GIF images, including animated GIFs, to WebP format. WebP typically provides better compression than GIF while maintaining quality, resulting in smaller file sizes suitable for web use. For animated GIFs, the tool preserves frame timing, loop count, and transparency. It supports both lossless compression (preserving exact pixel values) and lossy compression for even smaller files. The tool is part of Google's libwebp package.

How do I run a basic gif2webp example?

Run `gif2webp [path/to/image.gif] -o [path/to/image.webp]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -o _FILE_ do in gif2webp?

Output WebP filename