Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
GIF
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Palettes== [[File:Sunflower as gif websafe.gif|thumb|right|An example of a GIF image saved with a [[web-safe colors|web-safe palette]] and [[dither]]ed using the [[Floyd–Steinberg dithering|Floyd–Steinberg]] method; as a consequence of the relatively few colors allowed in such an image, the image's [[Contrast (vision)|contrast]] and [[colorfulness]] are noticeably poor.]] GIF is palette-based: the colors used in an image (a frame) in the file have their [[RGB]] values defined in a [[Palette (computing)|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 (2<sup>24</sup> shades, 8 bits for each primary), but the maximum number of colors a frame can use is 256. This limitation was reasonable when GIF was developed because hardware that could display more than 256 colors simultaneously was rare. Simple graphics, line drawings, cartoons, and grey-scale photographs typically need fewer than 256 colors. 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 [[dither]]ing, 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 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{{when|date=March 2015}}, graphics cards with 8-bit buffers (allowing only 256 colors) were common and it was fairly common to make GIF images using the [[Web-safe colors|websafe palette]].{{according_to_whom|date=March 2015}} This ensured predictable display, but severely limited the choice of colors. When 24-bit color became the norm, palettes could instead 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 2<sup>''n''</sup> 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=== Although GIF is almost never used for [[color depth#True color (24-bit)|true color]] images, it is possible to do so.<ref name=aminet>{{cite web |url=http://uk.aminet.net/docs/misc/GIF24.readme |title=GIF 24 Bit (truecolor) extensions |author=Andreas Kleinert |year=2007 |access-date=23 March 2012 |archive-url=https://web.archive.org/web/20120316215949/http://uk.aminet.net/docs/misc/GIF24.readme |archive-date=16 March 2012}}</ref><ref name=philhoward>{{cite web |url=http://phil.ipal.org/tc.html |title=True-Color GIF Example |author=Philip Howard |access-date=23 March 2012 |archive-url=https://web.archive.org/web/20150222123613/http://phil.ipal.org/tc.html |archive-date=22 February 2015}}</ref> 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. [[File:SmallFullColourGIF.gif|thumb|right|An animated GIF illustrating a technique for displaying more than the typical limit of 256 colors]] 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.<ref name=aminet /> Since each image block can have its own local color table, a GIF file having many image blocks can be very large, limiting the usefulness of full-color GIFs.<ref name=philhoward /> 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 animation<ref name=aminet /> with most web browsers automatically displaying the frames with a delay time of 0.1 seconds or more.<ref>{{cite web|url=http://nullsleep.tumblr.com/post/16524517190/animated-gif-minimum-frame-delay-browser-compatibility|title=Nullsleep - Jeremiah Johnson - Animated GIF Minimum Frame Delay Browser Compatibility Study|access-date=26 May 2015|archive-date=10 October 2014|archive-url=https://web.archive.org/web/20141010173918/http://nullsleep.tumblr.com/post/16524517190/animated-gif-minimum-frame-delay-browser-compatibility|url-status=live}}</ref><ref>{{cite web|url=http://blog.fenrir-inc.com/us/2012/02/theyre-different-how-to-match-the-animation-rate-of-gif-files-accross-browsers.html|archive-url=https://web.archive.org/web/20170201034945/http://blog.fenrir-inc.com/us/2012/02/theyre-different-how-to-match-the-animation-rate-of-gif-files-accross-browsers.html|url-status=dead|archive-date=1 February 2017|title=They're different! How to match the animation rate of gif files {{sic|ac|cross|nolink=y}} browsers|date=14 February 2012|website=Developer's Blog|access-date=15 June 2017}}</ref>{{better source needed|date=March 2015}}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
GIF
(section)
Add topic