home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / gif / gifencod.gif (.png) < prev    next >
Graphics Interchange Format  |  1994-03-04  |  8KB  |  640x350  |  4-bit (4 colors)
Labels: text | diagram | font | screenshot
OCR: GIF Encoder Init encoder by Bob Montgomery 1-21-88 Get color Notes: parent = color Get 1st color Parent is 1st color 1. son is child[parent] 2. bro(ther) is sib[person] person = son or bro 3. nvc = next valid code Get color 4. Init encoder: son = child[parent] All children = 0 Does parent have a son? All sib(lings) = 0 Codesize = bits/pixel + 1 son Y Clear code = 1 << bits/pixel Is son right color? End code = clear code + 1 min code = end code + 1 Create one max code = clear code << 1 child[parent] = nvc Shade[son] N E color shade[nvc] = color putcode[parent] bro = son Makes loop easier parent = color nvc = nvc + 1 Does brother have a brother? sib[bron N Make new VY Get him parent bro = sib[bro] Change codesize parent = son Is he right color? if required Shade[brot> NE color2 Create one Tr ...