Home Common Problem What is the file format of gif?

What is the file format of gif?

Dec 29, 2020 pm 01:57 PM
gif Format

gif is a bitmap graphics file format. GIF means "Image Interchange Format" in Chinese. It is a relatively commonly used dynamic image format that reproduces true-color images with 8-bit color (i.e. 256 colors). The gif format file is actually a compressed document that is encoded using the LZW compression algorithm, which can effectively reduce the time for image files to be transmitted on the network.

What is the file format of gif?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

The full name of GIF is Graphics Interchange Format, which can be translated as Image Interchange Format. It is a bitmap graphics file format that reproduces true-color images with 8-bit colors (that is, 256 colors).

GIF is used to display indexed color images in the form of Hypertext Markup Language, and is widely used on the Internet and other online service systems.

It is actually a compressed document, encoded using the LZW compression algorithm, which effectively reduces the time for image files to be transmitted over the network. It is one of the most widely used network transmission image formats on the World Wide Web.

When Stephen Wilhite was working at Compuserve, he led the engineering team to invent the GIF file. With its small size and relatively clear image, it was very suitable for the early Internet environment with low bandwidth. Nowadays, Internet users use GIF files for creation and have become one of the formats used as Internet memes. Wilhite also won the Webby Award for Lifetime Achievement in 2013. As for how to pronounce "GIF", many people pronounce it with the sound of "gift", but when he corrected his name, he should pronounce it with the same sound as "Jif".

Most of the common small animations on the Internet are in GIF format, also called frame-by-frame animation, which is a picture that is composed of several pictures together (some are single frames). It uses lossless compression technology, which can reduce file size while maintaining imaging quality as long as the image does not exceed 256 colors. GIF is divided into two types: static GIF and animated GIF. The extension is .gif. It is a compressed bitmap format that supports transparent background images and is suitable for a variety of operating systems. It has a small "body size" and many small animations on the Internet are GIFs. Format.

GIF is a bitmap. The general principle of bitmap is: a picture is composed of many pixels, each pixel is assigned a color, and these pixels are combined to form a picture. GIF uses the Lempel-Zev-Welch (LZW) compression algorithm and supports up to 256 colors. Due to this characteristic, GIF is more suitable for pictures with less color, such as cartoon shapes, company logos, etc. If you encounter situations where true colors are needed, the expressive power of GIF will be limited. GIF usually comes with a palette that stores the various colors that need to be used. In web applications, the file size of images will obviously affect the download speed. Therefore, we can optimize the palette according to the characteristics of GIF with palette and reduce the number of colors used in the image (some images cannot use it. colors can be dropped) without affecting the quality of the picture.

The biggest difference between the GIF format and other image formats is that it is completely designed as a public standard. Due to the popularity of the Compu Serve network, many platforms support the GIF format. Compu Serve promotes GIF by distributing format instructions for free, but requires software that uses the GIF file format to include a description of its copyright information.

Features

The image file in GIF format has the following characteristics:

(1) The extension of the GIF format image file is ".gif".

(2) performs best for grayscale images.

(3) There are two versions: GIF87a and GIF89a.

(4) Use the improved LZW compression algorithm to process image data.

(5) Palette data is divided into general palette and local palette, with different color values.

(6) Does not support 24bit color mode, and can store up to 256 colors.

Technical Introduction

GIF is mainly a transmission format designed for data flow, rather than as a storage format for files. It has a sequential rather than a random organization.

GIF has five main parts that appear in a fixed order, and all parts are composed of one or more blocks. Each block is identified by an identification code or signature in the first byte. The order of these parts is: header block, logical screen description block, optional "global" color table block (palette), individual image data blocks (or dedicated blocks), and tail block (end code). Here's what these sections contain:

  • begins with a block that identifies the data stream as a GIF and indicates how to interpret the following data, which required the earliest version of the GIF decoder (87a or 89a).

  • The logic program description block defines: the size, aspect ratio, and color depth of the image plane for all subsequent images (which is similar to the monitor screen on which the image is produced). It also indicates whether what follows is a "global" colormap.

  • The global color table (if it exists) constitutes a palette of 24-bit RGB tuples (one byte for each background color). If the underlying image does not have its own "local" palette, the global color table is the default palette.

  • Subsequent data appears as "graphical" or "private" blocks. Graphics blocks typically contain one or more bitmap images, possibly overlaid with text. Private blocks either contain a private application code or a non-printable comment.

  • The last tail block indicates a byte with a value of 3B (hex), indicating that the data stream has ended.

Note: The GIF data stream in the file may not contain any bitmap data at all. In this case, it is just transmitting the global color table as subsequent data without its own palette. The default color palette for the stream.

The above is the detailed content of What is the file format of gif?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to write the qq mailbox format? What is the qq mailbox format? How to write the qq mailbox format? What is the qq mailbox format? Feb 22, 2024 pm 03:40 PM

QQ email: QQ number@qq.com, English QQ email: English or numbers@qq.com, foxmail email account: set up your own account@foxmail.com, mobile phone email account: mobile phone number@qq.com. Tutorial Applicable Model: iPhone13 System: IOS15.3 Version: QQ Mailbox 6.3.3 Analysis 1QQ mailbox has four formats, commonly used QQ mailbox: QQ number@qq.com, English QQ mailbox: English or numbers@qq.com, foxmail Email account: set up your own account@foxmail.com, mobile phone email account: mobile phone number@qq.com. Supplement: What is qq mailbox? 1 The earliest QQ mailbox was only between QQ users

How to use block quotes in Apple Notes How to use block quotes in Apple Notes Oct 12, 2023 pm 11:49 PM

In iOS 17 and macOS Sonoma, Apple has added new formatting options for Apple Notes, including block quotes and a new Monostyle style. Here's how to use them. With additional formatting options in Apple Notes, you can now add block quotes to your notes. The block quote format makes it easy to visually offset sections of writing using the quote bar to the left of the text. Just tap/click the "Aa" format button and select the block quote option before typing or when you are on the line you want to convert to a block quote. This option applies to all text types, style options, and lists, including checklists. In the same Format menu you can find the new Single Style option. This is a revision of the previous "equal-width"

What is the file format of ink? What is the file format of ink? Feb 03, 2023 pm 02:32 PM

ink is the file format of a shortcut; a shortcut is a file object that is similar in function to a symbolic link, but is essentially different from a symbolic link; a shortcut is an ordinary file, not a symbol, and its extension is ".lnk" , so the shortcut can be copied, moved, changed or deleted; the shortcut can point to a file, folder or any other legal location in the system.

What is the format of pptm? What is the format of pptm? Jan 11, 2021 pm 02:46 PM

pptm is a file format of PowerPoint in the office office suite. Its full name is "macro-enabled PowerPoint presentation". pptm files can only be opened with office software of version 2007 and above. If opened with other versions of software, problems such as inability to edit and incomplete images will occur.

What format is m3u8? What format is m3u8? Feb 20, 2023 pm 01:38 PM

m3u8 is UTF-8 encoding format. M3U8 refers to the UTF-8 encoded M3U file, and the M3U file records an index plain text file. When you open it, the playback software does not play it, but finds the network address of the corresponding audio and video file based on its index for online processing. Play. M3U8 is a common streaming media format that mainly exists in the form of a file list. It supports both live broadcast and on-demand playback. It is especially commonly used on platforms such as Android and iOS.

What format file is cr3? What format file is cr3? Jun 23, 2021 pm 03:22 PM

CR3 files are original raw files recorded by Canon's new cameras using the Digic8 image processor. cr3 files can be opened through Canon ddp, which is software for performing image adjustments such as "RAW development" on RAW images.

What format is rtf What format is rtf Jan 30, 2023 pm 02:35 PM

The full name of RTF is "Rich Text Format", which means "Rich Text Format" or "Multiple Text Format" in Chinese. It is a cross-platform document format developed by Microsoft; RTF is a document format that Word can save in order to be compatible with other word processing software. , is a file similar to DOC format (Word document) and has good compatibility. For ordinary users, the RTF format is a good file format conversion tool for transferring formatted text documents between different applications.

What format file is exb What format file is exb Mar 10, 2021 pm 03:02 PM

The exb file is a special format generated by CAXA drawing software. CAXA is China's largest manufacturing software provider. The exb file is the data file of the electronic drawing board of CAXA two-dimensional drawing software.