GIF(图形交换格式)
GIF 是一种位图图像格式,以支持简单动画而闻名。它使用无损 LZW 压缩,但每帧限制为 256 色调色板。GIF 在短动画片段、表情图和简单图形方面仍然很受欢迎。
MIME 类型
image/gif
类型
二进制
压缩
无损
优点
- + Native animation support without JavaScript
- + Universal browser support since the 1990s
- + Simple 1-bit transparency
缺点
- − Limited to 256 colors per frame
- − Large file sizes for animations compared to video
- − No alpha transparency (only on/off)
何时使用 .GIF
适用于简单动画、表情图和色彩有限的小型图形。对于照片,建议使用 JPEG 或 WebP。
技术细节
GIF 使用 LZW 压缩,每帧最多支持 256 色调色板。动画通过存储多帧画面实现,每帧可设置独立的延迟时间和处置方式。
历史
GIF 由 CompuServe 于 1987 年推出,是最早在网络上使用的图像格式之一。动画 GIF 变体(GIF89a)于 1989 年发布。
从 .GIF 转换
转换为 .GIF
相关格式
相关术语
Learn More
Image Format Guide: JPEG vs PNG vs WebP vs AVIF
Choosing the right image format affects file size, quality, and browser compatibility. This comparison covers the strengths of JPEG, PNG, …
How to Resize Images for Web Without Losing Quality
Serving properly sized images is critical for web performance. Images that are too large waste bandwidth and slow page loads, …
Batch Image Conversion: Best Practices for Bulk Processing
Converting hundreds of images one by one is tedious and error-prone. Learn how to set up efficient batch conversion workflows …
How to Remove Image Backgrounds Effectively
Removing backgrounds from product photos, portraits, and logos is a frequent task in design and e-commerce. This guide covers techniques …
Troubleshooting Image Quality Loss During Conversion
Converting between image formats sometimes produces unexpected quality degradation. This guide explains why quality loss happens and how to minimize …
Image Optimization for Core Web Vitals and SEO
Images directly impact Core Web Vitals scores, especially Largest Contentful Paint. Learn how to optimize images for faster loading, better …