📄 todo
字号:
Besides fixing bugs, what's really needed is for someone to work out how tocalculate a colormap for writing gifs from rgb sources. Right now, an rgbsource that has only two colors (b/w) is being converted into an 8 bit gif....Which is horrendously wasteful without compression.Any volunteers?=======The Present Extension code is pretty hacky. It looks like giflib's ability todo Extension code was added on at a later time and also was not implementedentirely in conformance with the gif89a spec. I've hacked it further to makeit conform to the spec, but it would benefit greatly from a complete rewrite.If there is ever a version-5.0 of this library (with API level changes), thisshould definitely be one of the areas that gets worked on.=======Documentation needs updating to reflect additions to the API.=======[UPDATE at bottom]Here's a change to the library code that has been proposed: Pulling knownextensions (comment blocks, etc) out of the Extensions array and putting themin actual places within the GifType structure so application programmers don'thave to search through the Extension array for them.I'm not sure how I want to implemement this yet -- Actually removing them fromthe extension array would break the API compatibility with libungif. Makingcopies would waste resources needlessly. Making convenience links with theidea of deprecating the access of the extension block directly for standardfeatures would be okay, but creates extra work in the long run -- really weneed to put the convenience links into the current Extension array.We have to decide where in the structure each extension belongs, generalizethe AddExtensionBlock function to be able to add the extensionblock to anyarea of the structure, rework the gif writing code to place the structureswhere they belong, rework the code writing to the Extension Array so that itcan handle links as well as blocks.And on the other hand, it could turn out that putting extensions into the mainstructure is not intuitive to everyone. Extensions are "extensions" andpeople may want to look for them grouped together.... I suppose this couldeither mean leaving everything in the extension array, or creating a newextension field that has the extensions dangling off of it (comment, gifanimstuff, unknown, etc.) This is okay except that it'd be best to have realcopies of the extension in the fields instead of links (so that we could makearrays rather than arrays of pointers.)[UPDATE:1998 3 Dec]After reading through the gif89a specification, I'm not sure this is all thatgreat. It seems that each image in a gif stream needs to have separateextension blocks. This means that an animated gif will have a GraphicsExtension Block for each Image in the animation. Linking this up to theGifFileType is wrong. Making a link in each SaveFile is correct, but willtake space that won't be needed when that particular extension doesn't appearin this file....Unless someone wants to correct me here, I don't think I'm going to implementthis.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -