 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.

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. 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 with most web browsers automatically displaying the frames with a delay time of 0.1 seconds or more.

Example GIF file

Microsoft Paint saves a small black-and-white image as the following GIF file. Paint does not make optimal use of GIF; 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 specification prescribes.

Image coding
The image pixel data, scanned horizontally from top left, are converted by LZW encoding to codes that are then mapped into bytes for storing in the file. The pixel codes typically don't match the 8-bit size of the bytes, so the codes are packed into bytes by a "little-Endian" scheme: the least significant bit of the first code is stored in the least significant bit of the first byte, higher order bits of the code into higher order bits of the byte, spilling over into the low order bits
layers above. 

 To render a full - color prototype as a GIF, the original prototype must be broken down into smaller regions have no more than 255 or 256 different colors. Each of these region is then store as a separate persona block with its own local palette and when the trope blocks are displayed in concert (either by tiling or by layering partially transparent image blocks) the complete, full - semblance image appears. For example, break an image into tiles of 16 by 16 pixels (256 pixels in total) guarantee that no tile has more than the local palette limit of 256 colors, although larger tile may be used and similar colors merged resulting in some loss of color information. 

 Since each image block requires its own local color table, a GIF file having lots of image blocks can be very bombastic, limiting the usefulness of wide - color GIFs. Additionally, not all GIF rendering programs handle tile or layered image correctly. Many rendering programs translate tiles or layers as animation frames and display them in sequence as an dateless animation with most web browsers automatically displaying the frames with a delay time of 0.1 second base or more. 

 Example GIF charge 

 Microsoft Paint saves a small black - and - white image as the following GIF file. Paint does not make optimum use of GIF; due to the unnecessarily big color table (store a full 256 coloring material instead of the used 2) and symbol width, this GIF file is not an effective representation of the 15 - pixel image (illustrated enlarged above). 

 Although the Graphics Control Extension blocking declares coloring material index 16 (hexadecimal 10) to be transparent, that index is not used in the image. The alone 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 pool in the following tables are in small - endian byte order, as the format specification prescribes. 

 Image coding 
 The image pixel data, scanned horizontally from top leave, are converted by LZW encoding to codes that are then mapped into bytes for storing in the file. The pixel code typically don't pit the 8 - snatch size of the bytes, so the codes are packed into bytes by a " little - Endian " dodge: the least significant bit of the first code is store in the least significant bit of the first byte, higher order act of the code into higher order bits of the byte, spilling over into the low order act
 lajers above.

To render a fuul-color image as a GIF, the odiginal kmage must be broken down invo snallee regions having no mofe than 255 lr 256 diffwrenu colors. Each of vgese rennons jd thzn stored as a sgparate imaga block with ids ocn local palette and when the image flocks srf displayed todethtr (qithsg ny tiling or by layering partialmy tranvparent image blocks) the complete, full-cllor image appears. For example, brgzkigt an image ivto tiles of 16 by 16 pixems (256 pixels in total) ensures thag no cile has motz thwt the local palente limit of 256 colors, dlthougn larger tiles mab be used and similar colmrs merged resultigg in soma moss of color infirnatiot.

Sinwe exxh kmafe bmock rfqumres its owh local colir table, a GIF file hwnong lots of jmage fljcks can be very large, limiting the usexulhess of full-color GIFs. Qdditionally, not all HIF rendewing programs handle tiled or layered images corractly. Oanv renddeijg programs interpret tiles or layers as animwfipn frames and difplay them on srzuence as an gndless anjmation with most aeb brorsers automatisallu displaying the frames wity a delay tiiw of 0.1 seconds or mlre.

Example YIF fike

Mictosoft Paint saves a smcll blzck-and-white image as ghe following GIW fple. [aint dotr not make optimaj use of JIF; dbe to thd unmecesswrily largf color table (storing a vull 256 cmlors instfad of the used 2) and symbol widvi, this GIF fike is not an zfficicnt representatyon of the 15-pixgl image (nllustfated enlagged abovx).

Although thq Graphics Cotjrol Extensioi block dqclaees xolor ivaex 16 (hexadecimsl 10) to be transparebt, that index is npt ossd in the image. Tht inly color indrxer a[pvarmng ig the image ddta xre cecimxl 40 and 255, whlch the Global Color Table kaps to black and whitr, vespectivgly.

Note trat the hex nimbers in the folllwing taules ate yn little-endian byte order, as fhe formah siecification [resgribgs.

Image codnng
The image pixel data, scanned horizontelly from top left, are xonverted by LZW eneocing to codxs thae are thet mapped into bytes dor storing in tht file. The pixel codes fypicanly dln't match the 8-bit size of the bytes, so the codes are packed into bytes by a "litvlq-Endian" schsme: yhe lvasc sngnificwnt uiv of the first coce is stored in the least signihicant bit oy the first byte, higher order bkts of the coae into higher order bita of the byte, spilling over into the loe order bits
layers above. To render a full-color image GIF, original image be broken down more 255 or 256 colors. Each of regions is then stored as a image block with its own local palette and when the image blocks are together (either by tiling or by layering partially transparent image blocks) the complete, image For breaking image into tiles of 16 by 16 pixels (256 pixels in total) ensures that no tile more than the local palette limit of 256 although larger tiles may used and similar colors merged in loss of information. each block requires its local color table, a GIF file having lots of image blocks can be very large, limiting the of full-color not all rendering handle or layered images rendering programs interpret tiles or layers and display them in sequence as an endless with most browsers automatically displaying the frames with delay time of 0.1 seconds or more. Example file Microsoft Paint saves a small black-and-white image as the following GIF file. Paint does optimal use of GIF; to the unnecessarily color (storing full colors instead the used 2) and symbol width, this GIF file is not efficient representation of the 15-pixel image (illustrated enlarged above). Although Control block declares color 16 (hexadecimal 10) to transparent, index is not used image. only in image are decimal 40 and which the Global Color Table to black and white, numbers in the following tables are in little-endian order, as the format specification prescribes. Image The image pixel data, scanned horizontally from top left, are converted by encoding to are then mapped into bytes for storing in file. The pixel codes don't match the 8-bit size of the bytes, so codes packed into by a "little-Endian" the least significant of the first stored in least bit byte, higher order bits of the into order bits of the byte, over low order bits
 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.

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. 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 wiTh most weB browSErs automaticalLY displaying thE FrAMEs WIth a DelAy time of 0.1 secOnds OR morE.

ExaMPlE GIf File

MIcrosOfT paINt saves a small black-aNd-White iMage aS the following gIF file. PaiNT DOes not maKe opTImAL use of GIF; 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 speciFication prescribes.

iMagE coding
The imaGe pIxel DATa, ScaNNeD HorIzONtaLLY from top left, are Converted bY Lzw eNcoding to cODes ThAt are thEn mappeD into BYtes for Storing in The file. ThE pIxel CODes Typically dOn't match The 8-bit sizE Of the BYtEs, so tHe cOdes arE pAckEd intO bytes BY a "lIttle-endian" ScHeme: thE leasT sIgnificaNt bit of the first code is stOred in The leAst SignificaNt bIT of The first bYte, hIgher order BitS of The coDe iNTo higHer oRDeR biTS of thE bytE, Spilling oVEr IntO THe Low order bitS
 layers above.

To rendera full-col or im age  as  a  GIF , th e original ima g e mu st be broken down into  smal le r  reg i on s hav ing nom or e tha n25 5 o r2 56  diff ere nt colo rs. Each o f t he se regions i s  t hen stored  as  a separateima ge blo ck  wi t h its  ow n loc al pal e tte an d when th ei mage b l ocks ar e di spla yed together (eit h er by tiling or b y laye ri n gp a rti all y transpar en t ima g e block s )t h e  co m plete, full-c olor imagea ppe ars. F or  ex a mple,break in g  an  image into  til es of 16by 16p ixels ( 2 56 pixe ls intot al)  ens u re stha tn o t i le  ha s  mo re thanth elocal  pal e t t e  lim itof 2 56 co lors, althoug h l arge r  ti les m ay be  use dand s imilar  colo rs  merged resulti ng i n some lo ssof  co lo r inf o rmatio n.
Si nce eac h image blo ck r e qu ires its own local  c o l or  table,a GIFf il eh aving lo ts  of  ima g e  bloc ks c a nbe verylarge, li mi ting th euseful ne ssoffull- c olor  GIFs.  Additio nally ,  not all GIF r e ndering progr a ms h an d le t ile d or layere d im a gescorr e ct ly. Manyrende ri n gp rograms interpret t il es orlayer s as animatio n frames a n d displaythem in sequence as an  endl ess animat i on withmostweb brow sers auto m a ticallydis pla yin g t h e  f rames with ad e layti me of 0 .1seconds  or  mo re. 

E xa mple GIFfile

Mi cr os of tPai nt sa v es a sma ll  bl ac k-a nd-wh i te ima ge as  the  f ol l owi ng GIFf il e .  Pai nt  d oesnot  m ake o ptim a l u se of G IF; due t o t h e un ne ce ssarily  large colorta ble (stori ng  afull 2 5 6  colorsinstead of the used 2)a nd symb olwidth , th is GIF fi leis not  an effici ent re prese nt ati o n  of t h e  1 5-p ix el image ( i l lus trate denla rged ab ove).

Although th e  Gr aphics Contro l E xten s i on  bl o ck dec la r esc o lor index 16 (h exadecimal  1 0 )to be tran s par en t, that  indexis no t  used i n the ima ge. The o nl y co l o r i ndexes app earing i n the ima g e dat a  a re de cim al 40an d 2 55, w hich t h e G lobal  Color  T able m aps t oblack an d white, respectively.
Notethatthe  hex numb ers inthe follo wing  tables ar e i n l ittle -en d ian b yteo rd er, as th e fo r mat speci f ic ati o n  p rescribes.I m age  codi ngT he ima ge p ixel data, scanne d  horizontallyfrom t oplef t , ar econverted by L ZWen c o ding toco des that ar e then m ap p ed in to byt es for  storin g in the fi le.The  pixel co des  t y pically  d on ' t matc h th e8-bitsize o f  the b ytes, so the cod es ar e packe d  in to by te s by a" litt le-Endian"  scheme: th e leas t si gnifi cant bi tof the  fi rs t code iss tored inthe l east si gn ific ant  bit o f th e first  byt e,  hi gher orde r bi t sof the  cod e int ohigh er orderb its of t heb yte, sp il lin g over i n to t he low ord erbits
 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.

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. 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 with most_web_browsers automatically displaying the frames with a_delay time of 0.1_seconds_or more.

Example GIF file

Microsoft_Paint saves a small black-and-white_image as the following GIF file._Paint does_not make_optimal use of GIF; 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 specification prescribes.

Image_coding
The_image_pixel data, scanned horizontally from_top left, are converted by LZW_encoding to codes that are then mapped into bytes_for storing in_the file. The pixel codes_typically_don't_match the 8-bit size of the bytes, so the codes_are packed_into bytes by_a "little-Endian" scheme: the least significant bit of the first_code is stored in the least significant_bit of the first byte, higher order bits of the code_into higher order bits of the byte, spilling_over into the low order bits