Just so you know Boobs a gif isn't actually a video, we take false advertisement very seriously as Hardcore Husky. Here, for your future benefit:
Graphics Interchange Format From Wikipedia, the free encyclopedia "GIF" redirects here. For other uses, see GIF (disambiguation). .GIF (Graphics Interchange Format) Rotating earth (large).gif Filename extension .gif Internet media type image/gif Type code GIF GIFf Uniform Type Identifier com.compuserve.gif Magic number GIF87a/GIF89a Developed by CompuServe Type of format lossless bitmap image format The Graphics Interchange Format (better known by its acronym GIF; /ˈdʒɪf/ or /ˈɡɪf/) is a bitmap image format that was introduced by CompuServe in 1987[1] and has since come into widespread usage on the World Wide Web due to its wide support and portability. The format supports up to 8 bits per pixel for each image, allowing a single image to reference its own palette of up to 256 different colors chosen from the 24-bit RGB color space. It also supports animations and allows a separate palette of up to 256 colors for each frame. These palette limitations make the GIF format unsuitable for reproducing color photographs and other images with continuous color, but it is well-suited for simpler images such as graphics or logos with solid areas of color. GIF images are compressed using the Lempel-Ziv-Welch (LZW) lossless data compression technique to reduce the file size without degrading the visual quality. This compression technique was patented in 1985. Controversy over the licensing agreement between the software patent holder, Unisys, and CompuServe in 1994 spurred the development of the Portable Network Graphics (PNG) standard. All the relevant patents have now expired. Contents [hide] 1 History 2 Pronunciation 3 Usage 4 File format 5 Palettes 5.1 True color 6 Example GIF file 6.1 Image coding 6.2 Image decoding 6.3 LZW code lengths 6.4 Uncompressed GIF 7 Compression example 8 Interlacing 9 Animated GIF 10 Unisys and LZW patent enforcement 11 Alternatives 11.1 PNG 11.2 Animation formats 12 See also 13 References 14 External links History[edit]
CompuServe introduced the GIF format in 1987 to provide a color image format for their file downloading areas, replacing their earlier run-length encoding (RLE) format, which was black and white only. GIF became popular because it used LZW data compression, which was more efficient than the run-length encoding that formats such as PCX and MacPaint used, and fairly large images could therefore be downloaded in a reasonably short time, even with very slow modems. The original version of the GIF format was called 87a.[1] In 1989, CompuServe devised an enhanced version, called 89a,[2] which added support for animation delays (multiple images in a stream were already supported in 87a), transparent background colors, and storage of application-specific metadata. The 89a specification also supports incorporating text labels as text (not embedding them in the graphical data), but as there is little control over display fonts, this feature is not widely used. The two versions can be distinguished by looking at the first six bytes of the file (the "magic number" or "signature"), which, when interpreted as ASCII, read "GIF87a" and "GIF89a", respectively. GIF was one of the first two image formats commonly used on Web sites, the other being the black and white XBM.[citation needed] The feature of storing multiple images in one file, accompanied by control data, is used extensively on the Web to produce simple animations. The optional interlacing feature, which stores image scan lines out of order in such a fashion that even a partially downloaded image was somewhat recognizable, also helped GIF's popularity,[citation needed] as a user could abort the download if it was not what was required. In 2012, the word "GIF" was officially recognized as a verb as well as a noun, meaning "to create a GIF file". The United States wing of the Oxford University Press voted it their word of the year, saying that GIFs have evolved into "a tool with serious applications including research and journalism".[3][4] Pronunciation[edit]
A humorous image announcing the launch of a White House Tumblr suggests pronouncing GIF with a hard "G". The creators of the format pronounced GIF as "Jif" with a soft "G" /ˈdʒɪf/ as in "gin". Steve Wilhite says that the intended pronunciation deliberately echoes the American peanut butter brand, Jif, and CompuServe employees would often say "Choosy developers choose GIF", spoofing this brand's television commercials.[5] An alternative pronunciation with a hard "G" (/ˈɡɪf/ as in "graphics") is in widespread usage.[6] The American Heritage Dictionary[7] cites both, acknowledging "jif" as the primary pronunciation, while the Cambridge Dictionary of American English[8] offers only the "gif" pronunciation. Merriam-Webster's Collegiate Dictionary[9] cites both pronunciations, but places "gif" in the default position ("\ˈgif, ˈjif\"). The disagreement over the pronunciation has led to heated Internet debate. On the occasion of receiving a lifetime achievement award at the 2013 Webby Award ceremony, Wilhite deprecated the alternative pronunciation,[6][10][11] and his speech led to 17,000 posts on Twitter and 50 news articles.[12] The White House and TV program Jeopardy! also waded into the debate during 2013. Usage[edit]
GIFs are suitable for sharp-edged line art (such as logos) with a limited number of colors. This takes advantage of the format's lossless compression, which favors flat areas of uniform color with well defined edges. GIFs can be used to store low-color sprite data for games. GIFs can be used for small animations and low-resolution film clips. Since a single GIF image palette is limited to 256 colors, it is not usually used as a format for digital photography. Digital photographers use image file formats capable of reproducing a greater range of colors, such as TIFF, RAW or JPEG. File format[edit]
File:Empty.gif in a hex editor Conceptually, a GIF file describes a fixed-sized graphical area (the "logical screen") populated with zero or more "images". Many GIF files have a single image that fills the entire logical screen. Others divide the logical screen into separate sub-images. The images may also function as animation frames in an animated GIF file, but again these need not fill the entire logical screen. GIF files start with a fixed-length header ("GIF87a" or "GIF89a") giving the version, followed by a fixed-length Logical Screen Descriptor giving the size and other characteristics of the logical screen. The screen descriptor may also specify the presence and size of a Global Color Table, which follows next if present. Thereafter, the file is divided into segments, each introduced by a 1-byte sentinel: An image (introduced by 0x2C, a comma ',') An extension block (introduced by 0x21, an exclamation point '!') The trailer (a single byte of value 0x3B, a semi-colon ';'), which should be the last byte of the file. An image starts with a fixed-length Image Descriptor, which may specify the presence and size of a Local Color Table (which follows next if present). The image data follows: one byte giving the bit width of the unencoded symbols (which must be at least 2 bits wide, even for bi-color images), followed by a linked list of sub-blocks containing the LZW-encoded data. Extension blocks (blocks that "extend" the 87a definition via a mechanism already defined in the 87a spec) consist of the sentinel, an additional byte specifying the type of extension, and a linked list of sub-blocks with the extension data. Extension blocks that modify an image (like the Graphic Control Extension that specifies the optional animation delay time and optional transparent background color) must immediately precede the segment with the image they refer to. The linked lists used by the image data and the extension blocks consist of series of sub-blocks, each sub-block beginning with a byte giving the number of subsequent data bytes in the sub-block (1 to 255). The series of sub-blocks is terminated by an empty sub-block (a 0 byte). This structure allows the file to be parsed even if not all parts are understood. A GIF marked 87a may contain extension blocks; the intent is that a decoder can read and display the file without the features covered in extensions it does not understand. The full detail of the file format is covered in the GIF specification.[2] Palettes[edit]
An example of a GIF image saved with a 'web-safe' palette and dithered using the Floyd–Steinberg method. Due to the reduced number of colors in the image, there are obvious display issues. GIF is palette-based: the colors used in an image (a frame) in the file have their RGB values defined in a palette table that can hold up to 256 entries, and the data for the image refer to the colors by their indices (0–255) in the palette table. The color definitions in the palette can be drawn from a color space of millions of shades (224 shades, 8 bits for each primary), but the maximum number of colors a frame can use is 256. This limitation seemed reasonable when GIF was developed because few people could afford the hardware to display more colors simultaneously. Simple graphics, line drawings, cartoons, and grey-scale photographs typically need fewer than 256 colors. As a further refinement, each frame can designate one index as a "transparent background color": any pixel assigned this index takes on the color of the pixel in the same position from the background, which may have been determined by a previous frame of animation. Many techniques, collectively called dithering, have been developed to approximate a wider range of colors with a small color palette by using pixels of two or more colors to approximate in-between colors. These techniques sacrifice spatial resolution to approximate deeper color resolution. While not part of the GIF specification, dithering can of course be used in images subsequently encoded as GIF images. This is often not an ideal solution for GIF images, both because the loss of spatial resolution typically makes an image look fuzzy on the screen, and because the dithering patterns often interfere with the compressibility of the image data, working against GIF's main purpose. In the early days of graphical web browsers, graphics cards with 8-bit buffers (allowing only 256 colors) were common and it was fairly common to make GIF images using the websafe palette.[citation needed] This ensured predictable display, but severely limited the choice of colors. Now that 32-bit graphics cards, which support 24-bit color, are the norm, palettes can be populated with the optimum colors for individual images. A small color table may suffice for small images, and keeping the color table small allows the file to be downloaded faster. Both the 87a and 89a specifications allow color tables of 2n colors for any n from 1 through 8. Most graphics applications will read and display GIF images with any of these table sizes; but some do not support all sizes when creating images. Tables of 2, 16, and 256 colors are widely supported. True color[edit]
An animated GIF illustrating a technique for displaying more than the typical limit of 256 colors Although the GIF format is almost never used for True Color images, it is possible to do so.[13][14] A GIF image can include multiple image blocks, each of which can have its own 256-color palette, and the blocks can be tiled to create a complete image. Alternatively, the GIF89a specification introduced the idea of a "transparent" color where each image block can include its own palette of 255 visible colors plus one transparent color. A complete image can be created by layering image blocks with the visible portion of each layer showing through the transparent portions of the layers above. To render a full-color image as a GIF, the original image must be broken down into smaller regions having no more than 255 or 256 different colors. Each of these regions is then stored as a separate image block with its own local palette and when the image blocks are displayed together (either by tiling or by layering partially transparent image blocks) the complete, full-color image appears. For example, breaking an image into tiles of 16 by 16 pixels (256 pixels in total) ensures that no tile has more than the local palette limit of 256 colors, although larger tiles may be used and similar colors merged resulting in some loss of color information.[13] Since each image block requires its own local color table, a GIF file having lots of image blocks can be very large, limiting the usefulness of full-color GIFs.[14] Additionally, not all GIF rendering programs handle tiled or layered images correctly. Many rendering programs interpret tiles or layers as animation frames and display them in sequence as an endless animation[13] with most web browsers automatically displaying the frames with a delay time of 0.1 seconds.[15][16] Example GIF file[edit]
Sample image (enlarged), actual size 3 pixels wide by 5 high
Bytes Dh to 30Ch in the example define a palette of 256 colors. Microsoft's Paint program saves a small black and white image as the following GIF file. Paint does not make optimal use of the GIF format; due to the unnecessarily large color table (storing a full 256 colors instead of the used 2) and symbol width, this GIF file is not an efficient representation of the 15-pixel image (illustrated enlarged above). Although the Graphics Control Extension block declares color index 16 (hexadecimal 10) to be transparent, that index is not used in the image. The only color indexes appearing in the image data are decimal 40 and 255, which the Global Color Table maps to black and white, respectively. Note that the hex numbers in the following tables are in little-endian byte order, as the format
Just so you know Boobs a gif isn't actually a video, we take false advertisement very seriously as Hardcore Husky. Here, for your future benefit:
Graphics Interchange Format From Wikipedia, the free encyclopedia "GIF" redirects here. For other uses, see GIF (disambiguation). .GIF (Graphics Interchange Format) Rotating earth (large).gif Filename extension .gif Internet media type image/gif Type code GIF GIFf Uniform Type Identifier com.compuserve.gif Magic number GIF87a/GIF89a Developed by CompuServe Type of format lossless bitmap image format The Graphics Interchange Format (better known by its acronym GIF; /ˈdʒɪf/ or /ˈɡɪf/) is a bitmap image format that was introduced by CompuServe in 1987[1] and has since come into widespread usage on the World Wide Web due to its wide support and portability. The format supports up to 8 bits per pixel for each image, allowing a single image to reference its own palette of up to 256 different colors chosen from the 24-bit RGB color space. It also supports animations and allows a separate palette of up to 256 colors for each frame. These palette limitations make the GIF format unsuitable for reproducing color photographs and other images with continuous color, but it is well-suited for simpler images such as graphics or logos with solid areas of color. GIF images are compressed using the Lempel-Ziv-Welch (LZW) lossless data compression technique to reduce the file size without degrading the visual quality. This compression technique was patented in 1985. Controversy over the licensing agreement between the software patent holder, Unisys, and CompuServe in 1994 spurred the development of the Portable Network Graphics (PNG) standard. All the relevant patents have now expired. Contents [hide] 1 History 2 Pronunciation 3 Usage 4 File format 5 Palettes 5.1 True color 6 Example GIF file 6.1 Image coding 6.2 Image decoding 6.3 LZW code lengths 6.4 Uncompressed GIF 7 Compression example 8 Interlacing 9 Animated GIF 10 Unisys and LZW patent enforcement 11 Alternatives 11.1 PNG 11.2 Animation formats 12 See also 13 References 14 External links History[edit]
CompuServe introduced the GIF format in 1987 to provide a color image format for their file downloading areas, replacing their earlier run-length encoding (RLE) format, which was black and white only. GIF became popular because it used LZW data compression, which was more efficient than the run-length encoding that formats such as PCX and MacPaint used, and fairly large images could therefore be downloaded in a reasonably short time, even with very slow modems. The original version of the GIF format was called 87a.[1] In 1989, CompuServe devised an enhanced version, called 89a,[2] which added support for animation delays (multiple images in a stream were already supported in 87a), transparent background colors, and storage of application-specific metadata. The 89a specification also supports incorporating text labels as text (not embedding them in the graphical data), but as there is little control over display fonts, this feature is not widely used. The two versions can be distinguished by looking at the first six bytes of the file (the "magic number" or "signature"), which, when interpreted as ASCII, read "GIF87a" and "GIF89a", respectively. GIF was one of the first two image formats commonly used on Web sites, the other being the black and white XBM.[citation needed] The feature of storing multiple images in one file, accompanied by control data, is used extensively on the Web to produce simple animations. The optional interlacing feature, which stores image scan lines out of order in such a fashion that even a partially downloaded image was somewhat recognizable, also helped GIF's popularity,[citation needed] as a user could abort the download if it was not what was required. In 2012, the word "GIF" was officially recognized as a verb as well as a noun, meaning "to create a GIF file". The United States wing of the Oxford University Press voted it their word of the year, saying that GIFs have evolved into "a tool with serious applications including research and journalism".[3][4] Pronunciation[edit]
A humorous image announcing the launch of a White House Tumblr suggests pronouncing GIF with a hard "G". The creators of the format pronounced GIF as "Jif" with a soft "G" /ˈdʒɪf/ as in "gin". Steve Wilhite says that the intended pronunciation deliberately echoes the American peanut butter brand, Jif, and CompuServe employees would often say "Choosy developers choose GIF", spoofing this brand's television commercials.[5] An alternative pronunciation with a hard "G" (/ˈɡɪf/ as in "graphics") is in widespread usage.[6] The American Heritage Dictionary[7] cites both, acknowledging "jif" as the primary pronunciation, while the Cambridge Dictionary of American English[8] offers only the "gif" pronunciation. Merriam-Webster's Collegiate Dictionary[9] cites both pronunciations, but places "gif" in the default position ("\ˈgif, ˈjif\"). The disagreement over the pronunciation has led to heated Internet debate. On the occasion of receiving a lifetime achievement award at the 2013 Webby Award ceremony, Wilhite deprecated the alternative pronunciation,[6][10][11] and his speech led to 17,000 posts on Twitter and 50 news articles.[12] The White House and TV program Jeopardy! also waded into the debate during 2013. Usage[edit]
GIFs are suitable for sharp-edged line art (such as logos) with a limited number of colors. This takes advantage of the format's lossless compression, which favors flat areas of uniform color with well defined edges. GIFs can be used to store low-color sprite data for games. GIFs can be used for small animations and low-resolution film clips. Since a single GIF image palette is limited to 256 colors, it is not usually used as a format for digital photography. Digital photographers use image file formats capable of reproducing a greater range of colors, such as TIFF, RAW or JPEG. File format[edit]
File:Empty.gif in a hex editor Conceptually, a GIF file describes a fixed-sized graphical area (the "logical screen") populated with zero or more "images". Many GIF files have a single image that fills the entire logical screen. Others divide the logical screen into separate sub-images. The images may also function as animation frames in an animated GIF file, but again these need not fill the entire logical screen. GIF files start with a fixed-length header ("GIF87a" or "GIF89a") giving the version, followed by a fixed-length Logical Screen Descriptor giving the size and other characteristics of the logical screen. The screen descriptor may also specify the presence and size of a Global Color Table, which follows next if present. Thereafter, the file is divided into segments, each introduced by a 1-byte sentinel: An image (introduced by 0x2C, a comma ',') An extension block (introduced by 0x21, an exclamation point '!') The trailer (a single byte of value 0x3B, a semi-colon ';'), which should be the last byte of the file. An image starts with a fixed-length Image Descriptor, which may specify the presence and size of a Local Color Table (which follows next if present). The image data follows: one byte giving the bit width of the unencoded symbols (which must be at least 2 bits wide, even for bi-color images), followed by a linked list of sub-blocks containing the LZW-encoded data. Extension blocks (blocks that "extend" the 87a definition via a mechanism already defined in the 87a spec) consist of the sentinel, an additional byte specifying the type of extension, and a linked list of sub-blocks with the extension data. Extension blocks that modify an image (like the Graphic Control Extension that specifies the optional animation delay time and optional transparent background color) must immediately precede the segment with the image they refer to. The linked lists used by the image data and the extension blocks consist of series of sub-blocks, each sub-block beginning with a byte giving the number of subsequent data bytes in the sub-block (1 to 255). The series of sub-blocks is terminated by an empty sub-block (a 0 byte). This structure allows the file to be parsed even if not all parts are understood. A GIF marked 87a may contain extension blocks; the intent is that a decoder can read and display the file without the features covered in extensions it does not understand. The full detail of the file format is covered in the GIF specification.[2] Palettes[edit]
An example of a GIF image saved with a 'web-safe' palette and dithered using the Floyd–Steinberg method. Due to the reduced number of colors in the image, there are obvious display issues. GIF is palette-based: the colors used in an image (a frame) in the file have their RGB values defined in a palette table that can hold up to 256 entries, and the data for the image refer to the colors by their indices (0–255) in the palette table. The color definitions in the palette can be drawn from a color space of millions of shades (224 shades, 8 bits for each primary), but the maximum number of colors a frame can use is 256. This limitation seemed reasonable when GIF was developed because few people could afford the hardware to display more colors simultaneously. Simple graphics, line drawings, cartoons, and grey-scale photographs typically need fewer than 256 colors. As a further refinement, each frame can designate one index as a "transparent background color": any pixel assigned this index takes on the color of the pixel in the same position from the background, which may have been determined by a previous frame of animation. Many techniques, collectively called dithering, have been developed to approximate a wider range of colors with a small color palette by using pixels of two or more colors to approximate in-between colors. These techniques sacrifice spatial resolution to approximate deeper color resolution. While not part of the GIF specification, dithering can of course be used in images subsequently encoded as GIF images. This is often not an ideal solution for GIF images, both because the loss of spatial resolution typically makes an image look fuzzy on the screen, and because the dithering patterns often interfere with the compressibility of the image data, working against GIF's main purpose. In the early days of graphical web browsers, graphics cards with 8-bit buffers (allowing only 256 colors) were common and it was fairly common to make GIF images using the websafe palette.[citation needed] This ensured predictable display, but severely limited the choice of colors. Now that 32-bit graphics cards, which support 24-bit color, are the norm, palettes can be populated with the optimum colors for individual images. A small color table may suffice for small images, and keeping the color table small allows the file to be downloaded faster. Both the 87a and 89a specifications allow color tables of 2n colors for any n from 1 through 8. Most graphics applications will read and display GIF images with any of these table sizes; but some do not support all sizes when creating images. Tables of 2, 16, and 256 colors are widely supported. True color[edit]
An animated GIF illustrating a technique for displaying more than the typical limit of 256 colors Although the GIF format is almost never used for True Color images, it is possible to do so.[13][14] A GIF image can include multiple image blocks, each of which can have its own 256-color palette, and the blocks can be tiled to create a complete image. Alternatively, the GIF89a specification introduced the idea of a "transparent" color where each image block can include its own palette of 255 visible colors plus one transparent color. A complete image can be created by layering image blocks with the visible portion of each layer showing through the transparent portions of the layers above. To render a full-color image as a GIF, the original image must be broken down into smaller regions having no more than 255 or 256 different colors. Each of these regions is then stored as a separate image block with its own local palette and when the image blocks are displayed together (either by tiling or by layering partially transparent image blocks) the complete, full-color image appears. For example, breaking an image into tiles of 16 by 16 pixels (256 pixels in total) ensures that no tile has more than the local palette limit of 256 colors, although larger tiles may be used and similar colors merged resulting in some loss of color information.[13] Since each image block requires its own local color table, a GIF file having lots of image blocks can be very large, limiting the usefulness of full-color GIFs.[14] Additionally, not all GIF rendering programs handle tiled or layered images correctly. Many rendering programs interpret tiles or layers as animation frames and display them in sequence as an endless animation[13] with most web browsers automatically displaying the frames with a delay time of 0.1 seconds.[15][16] Example GIF file[edit]
Sample image (enlarged), actual size 3 pixels wide by 5 high
Bytes Dh to 30Ch in the example define a palette of 256 colors. Microsoft's Paint program saves a small black and white image as the following GIF file. Paint does not make optimal use of the GIF format; due to the unnecessarily large color table (storing a full 256 colors instead of the used 2) and symbol width, this GIF file is not an efficient representation of the 15-pixel image (illustrated enlarged above). Although the Graphics Control Extension block declares color index 16 (hexadecimal 10) to be transparent, that index is not used in the image. The only color indexes appearing in the image data are decimal 40 and 255, which the Global Color Table maps to black and white, respectively. Note that the hex numbers in the following tables are in little-endian byte order, as the format
Comments
Graphics Interchange Format
From Wikipedia, the free encyclopedia
"GIF" redirects here. For other uses, see GIF (disambiguation).
.GIF (Graphics Interchange Format)
Rotating earth (large).gif
Filename extension .gif
Internet media type image/gif
Type code GIF
GIFf
Uniform Type Identifier com.compuserve.gif
Magic number GIF87a/GIF89a
Developed by CompuServe
Type of format lossless bitmap image format
The Graphics Interchange Format (better known by its acronym GIF; /ˈdʒɪf/ or /ˈɡɪf/) is a bitmap image format that was introduced by CompuServe in 1987[1] and has since come into widespread usage on the World Wide Web due to its wide support and portability.
The format supports up to 8 bits per pixel for each image, allowing a single image to reference its own palette of up to 256 different colors chosen from the 24-bit RGB color space. It also supports animations and allows a separate palette of up to 256 colors for each frame. These palette limitations make the GIF format unsuitable for reproducing color photographs and other images with continuous color, but it is well-suited for simpler images such as graphics or logos with solid areas of color.
GIF images are compressed using the Lempel-Ziv-Welch (LZW) lossless data compression technique to reduce the file size without degrading the visual quality. This compression technique was patented in 1985. Controversy over the licensing agreement between the software patent holder, Unisys, and CompuServe in 1994 spurred the development of the Portable Network Graphics (PNG) standard. All the relevant patents have now expired.
Contents [hide]
1 History
2 Pronunciation
3 Usage
4 File format
5 Palettes
5.1 True color
6 Example GIF file
6.1 Image coding
6.2 Image decoding
6.3 LZW code lengths
6.4 Uncompressed GIF
7 Compression example
8 Interlacing
9 Animated GIF
10 Unisys and LZW patent enforcement
11 Alternatives
11.1 PNG
11.2 Animation formats
12 See also
13 References
14 External links
History[edit]
CompuServe introduced the GIF format in 1987 to provide a color image format for their file downloading areas, replacing their earlier run-length encoding (RLE) format, which was black and white only. GIF became popular because it used LZW data compression, which was more efficient than the run-length encoding that formats such as PCX and MacPaint used, and fairly large images could therefore be downloaded in a reasonably short time, even with very slow modems.
The original version of the GIF format was called 87a.[1] In 1989, CompuServe devised an enhanced version, called 89a,[2] which added support for animation delays (multiple images in a stream were already supported in 87a), transparent background colors, and storage of application-specific metadata. The 89a specification also supports incorporating text labels as text (not embedding them in the graphical data), but as there is little control over display fonts, this feature is not widely used. The two versions can be distinguished by looking at the first six bytes of the file (the "magic number" or "signature"), which, when interpreted as ASCII, read "GIF87a" and "GIF89a", respectively.
GIF was one of the first two image formats commonly used on Web sites, the other being the black and white XBM.[citation needed]
The feature of storing multiple images in one file, accompanied by control data, is used extensively on the Web to produce simple animations. The optional interlacing feature, which stores image scan lines out of order in such a fashion that even a partially downloaded image was somewhat recognizable, also helped GIF's popularity,[citation needed] as a user could abort the download if it was not what was required.
In 2012, the word "GIF" was officially recognized as a verb as well as a noun, meaning "to create a GIF file". The United States wing of the Oxford University Press voted it their word of the year, saying that GIFs have evolved into "a tool with serious applications including research and journalism".[3][4]
Pronunciation[edit]
A humorous image announcing the launch of a White House Tumblr suggests pronouncing GIF with a hard "G".
The creators of the format pronounced GIF as "Jif" with a soft "G" /ˈdʒɪf/ as in "gin". Steve Wilhite says that the intended pronunciation deliberately echoes the American peanut butter brand, Jif, and CompuServe employees would often say "Choosy developers choose GIF", spoofing this brand's television commercials.[5]
An alternative pronunciation with a hard "G" (/ˈɡɪf/ as in "graphics") is in widespread usage.[6] The American Heritage Dictionary[7] cites both, acknowledging "jif" as the primary pronunciation, while the Cambridge Dictionary of American English[8] offers only the "gif" pronunciation. Merriam-Webster's Collegiate Dictionary[9] cites both pronunciations, but places "gif" in the default position ("\ˈgif, ˈjif\").
The disagreement over the pronunciation has led to heated Internet debate. On the occasion of receiving a lifetime achievement award at the 2013 Webby Award ceremony, Wilhite deprecated the alternative pronunciation,[6][10][11] and his speech led to 17,000 posts on Twitter and 50 news articles.[12] The White House and TV program Jeopardy! also waded into the debate during 2013.
Usage[edit]
GIFs are suitable for sharp-edged line art (such as logos) with a limited number of colors. This takes advantage of the format's lossless compression, which favors flat areas of uniform color with well defined edges.
GIFs can be used to store low-color sprite data for games.
GIFs can be used for small animations and low-resolution film clips.
Since a single GIF image palette is limited to 256 colors, it is not usually used as a format for digital photography. Digital photographers use image file formats capable of reproducing a greater range of colors, such as TIFF, RAW or JPEG.
File format[edit]
File:Empty.gif in a hex editor
Conceptually, a GIF file describes a fixed-sized graphical area (the "logical screen") populated with zero or more "images". Many GIF files have a single image that fills the entire logical screen. Others divide the logical screen into separate sub-images. The images may also function as animation frames in an animated GIF file, but again these need not fill the entire logical screen.
GIF files start with a fixed-length header ("GIF87a" or "GIF89a") giving the version, followed by a fixed-length Logical Screen Descriptor giving the size and other characteristics of the logical screen. The screen descriptor may also specify the presence and size of a Global Color Table, which follows next if present.
Thereafter, the file is divided into segments, each introduced by a 1-byte sentinel:
An image (introduced by 0x2C, a comma ',')
An extension block (introduced by 0x21, an exclamation point '!')
The trailer (a single byte of value 0x3B, a semi-colon ';'), which should be the last byte of the file.
An image starts with a fixed-length Image Descriptor, which may specify the presence and size of a Local Color Table (which follows next if present). The image data follows: one byte giving the bit width of the unencoded symbols (which must be at least 2 bits wide, even for bi-color images), followed by a linked list of sub-blocks containing the LZW-encoded data.
Extension blocks (blocks that "extend" the 87a definition via a mechanism already defined in the 87a spec) consist of the sentinel, an additional byte specifying the type of extension, and a linked list of sub-blocks with the extension data. Extension blocks that modify an image (like the Graphic Control Extension that specifies the optional animation delay time and optional transparent background color) must immediately precede the segment with the image they refer to.
The linked lists used by the image data and the extension blocks consist of series of sub-blocks, each sub-block beginning with a byte giving the number of subsequent data bytes in the sub-block (1 to 255). The series of sub-blocks is terminated by an empty sub-block (a 0 byte).
This structure allows the file to be parsed even if not all parts are understood. A GIF marked 87a may contain extension blocks; the intent is that a decoder can read and display the file without the features covered in extensions it does not understand.
The full detail of the file format is covered in the GIF specification.[2]
Palettes[edit]
An example of a GIF image saved with a 'web-safe' palette and dithered using the Floyd–Steinberg method. Due to the reduced number of colors in the image, there are obvious display issues.
GIF is palette-based: the colors used in an image (a frame) in the file have their RGB values defined in a palette table that can hold up to 256 entries, and the data for the image refer to the colors by their indices (0–255) in the palette table. The color definitions in the palette can be drawn from a color space of millions of shades (224 shades, 8 bits for each primary), but the maximum number of colors a frame can use is 256. This limitation seemed reasonable when GIF was developed because few people could afford the hardware to display more colors simultaneously. Simple graphics, line drawings, cartoons, and grey-scale photographs typically need fewer than 256 colors.
As a further refinement, each frame can designate one index as a "transparent background color": any pixel assigned this index takes on the color of the pixel in the same position from the background, which may have been determined by a previous frame of animation.
Many techniques, collectively called dithering, have been developed to approximate a wider range of colors with a small color palette by using pixels of two or more colors to approximate in-between colors. These techniques sacrifice spatial resolution to approximate deeper color resolution. While not part of the GIF specification, dithering can of course be used in images subsequently encoded as GIF images. This is often not an ideal solution for GIF images, both because the loss of spatial resolution typically makes an image look fuzzy on the screen, and because the dithering patterns often interfere with the compressibility of the image data, working against GIF's main purpose.
In the early days of graphical web browsers, graphics cards with 8-bit buffers (allowing only 256 colors) were common and it was fairly common to make GIF images using the websafe palette.[citation needed] This ensured predictable display, but severely limited the choice of colors. Now that 32-bit graphics cards, which support 24-bit color, are the norm, palettes can be populated with the optimum colors for individual images.
A small color table may suffice for small images, and keeping the color table small allows the file to be downloaded faster. Both the 87a and 89a specifications allow color tables of 2n colors for any n from 1 through 8. Most graphics applications will read and display GIF images with any of these table sizes; but some do not support all sizes when creating images. Tables of 2, 16, and 256 colors are widely supported.
True color[edit]
An animated GIF illustrating a technique for displaying more than the typical limit of 256 colors
Although the GIF format is almost never used for True Color images, it is possible to do so.[13][14] A GIF image can include multiple image blocks, each of which can have its own 256-color palette, and the blocks can be tiled to create a complete image. Alternatively, the GIF89a specification introduced the idea of a "transparent" color where each image block can include its own palette of 255 visible colors plus one transparent color. A complete image can be created by layering image blocks with the visible portion of each layer showing through the transparent portions of the layers above.
To render a full-color image as a GIF, the original image must be broken down into smaller regions having no more than 255 or 256 different colors. Each of these regions is then stored as a separate image block with its own local palette and when the image blocks are displayed together (either by tiling or by layering partially transparent image blocks) the complete, full-color image appears. For example, breaking an image into tiles of 16 by 16 pixels (256 pixels in total) ensures that no tile has more than the local palette limit of 256 colors, although larger tiles may be used and similar colors merged resulting in some loss of color information.[13]
Since each image block requires its own local color table, a GIF file having lots of image blocks can be very large, limiting the usefulness of full-color GIFs.[14] Additionally, not all GIF rendering programs handle tiled or layered images correctly. Many rendering programs interpret tiles or layers as animation frames and display them in sequence as an endless animation[13] with most web browsers automatically displaying the frames with a delay time of 0.1 seconds.[15][16]
Example GIF file[edit]
Sample image (enlarged), actual size 3 pixels wide by 5 high
Bytes Dh to 30Ch in the example define a palette of 256 colors.
Microsoft's Paint program saves a small black and white image as the following GIF file. Paint does not make optimal use of the GIF format; due to the unnecessarily large color table (storing a full 256 colors instead of the used 2) and symbol width, this GIF file is not an efficient representation of the 15-pixel image (illustrated enlarged above).
Although the Graphics Control Extension block declares color index 16 (hexadecimal 10) to be transparent, that index is not used in the image. The only color indexes appearing in the image data are decimal 40 and 255, which the Global Color Table maps to black and white, respectively.
Note that the hex numbers in the following tables are in little-endian byte order, as the format