Gif89a Specification.docx

上传人:b****4 文档编号:24740488 上传时间:2023-06-01 格式:DOCX 页数:66 大小:36.75KB
下载 相关 举报
Gif89a Specification.docx_第1页
第1页 / 共66页
Gif89a Specification.docx_第2页
第2页 / 共66页
Gif89a Specification.docx_第3页
第3页 / 共66页
Gif89a Specification.docx_第4页
第4页 / 共66页
Gif89a Specification.docx_第5页
第5页 / 共66页
点击查看更多>>
下载资源
资源描述

Gif89a Specification.docx

《Gif89a Specification.docx》由会员分享,可在线阅读,更多相关《Gif89a Specification.docx(66页珍藏版)》请在冰豆网上搜索。

Gif89a Specification.docx

Gif89aSpecification

 

CoverSheetfortheGIF89aSpecification

 

DEFERREDCLEARCODEINLZWCOMPRESSION

Therehasbeenconfusionaboutwhereclearcodescanbefoundinthe

datastream.Asthespecificationsays,theymayappearatanytime.There

isnotarequirementtosendaclearcodewhenthestringtableisfull.

Itistheencoder'sdecisionastowhenthetableshouldbecleared.When

thetableisfull,theencodercanchosetousethetableasis,makingno

changestoituntiltheencoderchoosestoclearit.Theencoderduring

thistimesendsoutcodesthatareofthemaximumCodeSize.

Aswecanseefromtheabove,whenthedecoder'stableisfull,itmust

notchangethetableuntilaclearcodeisreceived.TheCodeSizeisthat

ofthemaximumCodeSize.Processingotherthanthisisdonenormally.

Becauseofalargebaseofdecodersthatdonothandlethedecompressionin

thismanner,weaskdevelopersofGIFencodingsoftwaretoNOTimplement

thisfeatureuntilatleastJanuary1991andlateriftheyseethattheir

particularmarketisnotreadyforit.ThiswillgivedevelopersofGIF

decodingsoftwaretimetoimplementthisfeatureandtogetitintothe

handsoftheirclientsbeforethedecodersstart"breaking"onthenew

GIF's.Itisnotrequiredthatencoderschangetheirsoftwaretotake

advantageofthedeferredclearcode,butitisfordecoders.

APPLICATIONEXTENSIONBLOCK-APPLICATIONIDENTIFIER

TherewillbeaCourtesyDirectoryfilelocatedonCompuServeinthePICS

forum.ThisdirectorywillcontainApplicationIdentifiersforApplication

ExtensionBlocksthathavebeenusedbydevelopersofGIFapplications.

Thisfileisintendedtohelpkeepdevelopersthatwishtocreate

ApplicationExtensionBlocksfromusingthesameApplicationIdentifiers.

Thisisnotanofficialdirectory;itisforvoluntaryparticipationonly

anddoesnotguaranteethatsomeonewillnotusethesameidentifier.

E-MailcanbesenttoLarryWood(forummanagerofPICS)indicatingthe

requestforinclusioninthisfilewithanidentifier.

 

GRAPHICSINTERCHANGEFORMAT(sm)

Version89a

(c)1987,1988,1989,1990

Copyright

CompuServeIncorporated

Columbus,Ohio

 

CompuServeIncorporatedGraphicsInterchangeFormat

DocumentDate:

31July1990ProgrammingReference

 

TableofContents

Disclaimer.................................................................1

Foreword...................................................................1

Licensing..................................................................1

AbouttheDocument.........................................................2

GeneralDescription........................................................2

VersionNumbers............................................................2

TheEncoder................................................................3

TheDecoder................................................................3

Compliance.................................................................3

AboutRecommendations......................................................4

AboutColorTables.........................................................4

Blocks,ExtensionsandScope...............................................4

BlockSizes................................................................5

UsingGIFasanembeddedprotocol..........................................5

DataSub-blocks............................................................5

BlockTerminator...........................................................6

Header.....................................................................7

LogicalScreenDescriptor..................................................8

GlobalColorTable.........................................................10

ImageDescriptor...........................................................11

LocalColorTable..........................................................13

TableBasedImageData.....................................................14

GraphicControlExtension..................................................15

CommentExtension..........................................................17

PlainTextExtension.......................................................18

ApplicationExtension......................................................21

Trailer....................................................................23

 

QuickReferenceTable......................................................24

GIFGrammar................................................................25

Glossary...................................................................27

Conventions................................................................28

InterlacedImages..........................................................29

Variable-Length-CodeLZWCompression.......................................30

On-lineCapabilitiesDialogue..............................................33

 

1

 

1.Disclaimer.

Theinformationprovidedhereinissubjecttochangewithoutnotice.Inno

eventwillCompuServeIncorporatedbeliablefordamages,includinganylossof

revenue,lossofprofitsorotherincidentalorconsequentialdamagesarising

outoftheuseorinabilitytousetheinformation;CompuServeIncorporated

makesnoclaimastothesuitabilityoftheinformation.

 

2.Foreword.

ThisdocumentdefinestheGraphicsInterchangeFormat(sm).Thespecification

givenheredefinesversion89a,whichisanextensionofversion87a.

TheGraphicsInterchangeFormat(sm)asspecifiedhereshouldbeconsidered

complete;anydeviationfromitshouldbeconsideredinvalid,includingbutnot

limitedto,theuseofreservedorundefinedfieldswithincontrolordata

blocks,theinclusionofextraneousdatawithinorbetweenblocks,theuseof

methodsoralgorithmsnotspecificallylistedaspartoftheformat,etc.In

general,anyandalldeviations,extensionsormodificationsnotspecifiedin

thisdocumentshouldbeconsideredtobeinviolationoftheformatandshould

beavoided.

 

3.Licensing.

TheGraphicsInterchangeFormat(c)isthecopyrightpropertyofCompuServe

Incorporated.OnlyCompuServeIncorporatedisauthorizedtodefine,redefine,

enhance,alter,modifyorchangeinanywaythedefinitionoftheformat.

CompuServeIncorporatedherebygrantsalimited,non-exclusive,royalty-free

licensefortheuseoftheGraphicsInterchangeFormat(sm)incomputer

software;computersoftwareutilizingGIF(sm)mustacknowledgeownershipofthe

GraphicsInterchangeFormatanditsServiceMarkbyCompuServeIncorporated,in

UserandTechnicalDocumentation.ComputersoftwareutilizingGIF,whichis

distributedormaybedistributedwithoutUserorTechnicalDocumentationmust

displaytothescreenorprinteramessageacknowledgingownershipofthe

GraphicsInterchangeFormatandtheServiceMarkbyCompuServeIncorporated;in

thiscase,theacknowledgementmaybedisplayedinanopeningscreenorleading

banner,oraclosingscreenortrailingbanner.Amessagesuchasthefollowing

maybeused:

"TheGraphicsInterchangeFormat(c)istheCopyrightpropertyof

CompuServeIncorporated.GIF(sm)isaServiceMarkpropertyof

CompuServeIncorporated."

Forfurtherinformation,pleasecontact:

CompuServeIncorporated

GraphicsTechnologyDepartment

5000ArlingtonCenterBoulevard

Columbus,Ohio43220

U.S.A.

CompuServeIncorporatedmaintainsamailinglistwithallthoseindividualsand

organizationswhowishtoreceivecopiesofthisdocumentwhenitiscorrected

 

2

 

orrevised.Thisserviceisofferedfreeofcharge;pleaseprovideuswithyour

mailingaddress.

 

4.AbouttheDocument.

ThisdocumentdescribesindetailthedefinitionoftheGraphicsInterchange

Format.Thisdocumentisintendedasaprogrammingreference;itis

recommendedthattheentiredocumentbereadcarefullybeforeprogramming,

becauseoftheinterdependenceofthevariousparts.Thereisanindividual

sectionforeachoftheFormatblocks.Withineachsection,thesub-section

labeledRequiredVersionreferstotheversionnumberthatanencoderwillhave

touseifthecorrespondingblockisusedintheDataStream.Withineach

section,adiagramdescribestheindividualfieldsintheblock;thediagrams

aredrawnvertically;topbytesinthediagramappearfirstintheDataStream.

Bitswithinabytearedrawnmostsignificantontheleftend.Multi-byte

numericfieldsareorderedLeastSignificantBytefirst.Numericconstantsare

representedasHexadecimalnumbers,precededby"0x".Bitfieldswithinabyte

aredescribedinorderfrommostsignificantbitstoleastsignificantbits.

 

5.GeneralDescription.

TheGraphicsInterchangeFormat(sm)definesaprotocolintendedfortheon-line

transmissionandinterchangeofrastergraphicdatainawaythatis

independentofthehardwareusedintheircreationordisplay.

TheGraphicsInterchangeFormatisdefinedintermsofblocksandsub-blocks

whichcontainrelevantparametersanddatausedinthereproductionofa

graphic.AGIFDataStreamisasequenceofprotocolblocksandsub-blocks

representingacollectionofgraphics.Ingeneral,thegraphicsinaData

Streamareassumedtoberelatedtosomedegree,andtosharesomecontrol

information;itisrecommendedthatencodersattempttogrouptogetherrelated

graphicsinordertominimizehardwarechangesduringprocessingandto

minimizecontrolinformationoverhead.Forthesamereason,unrelatedgraphics

orgraphicswhichrequireresettinghardwareparametersshouldbeencoded

separatelytotheextentpossible.

ADataStreammayoriginatelocally,aswhenreadfromafile,oritmay

originateremotely,aswhentransmittedoverad

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 初中教育 > 其它课程

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1