Dec 072017
Library of GIF related functions in Turbo C. Includes Herc GIF viewer, GIF printer, GIF encode and decode functions etc. All source is included.
File GIF_LIB.ZIP from The Programmer’s Corner in
Category C Source Code
Library of GIF related functions in Turbo C. Includes Herc GIF viewer, GIF printer, GIF encode and decode functions etc. All source is included.
File Name File Size Zip Size Zip Type
CHERYL.GIF 21504 21211 deflated
COMPILE.ME 1919 958 deflated
DEV2GIF.C 4506 1427 deflated
DGIF_LIB.C 28855 6103 deflated
EGIF_LIB.C 25541 5576 deflated
GENERAL.DOC 1280 638 deflated
GETARG.C 23880 6297 deflated
GETARG.H 920 369 deflated
GIF2EPSD.TC 1690 423 deflated
GIF2EPSN.C 19525 5794 deflated
GIF2EPSN.DOC 2326 1144 deflated
GIF2EPSN.PRJ 44 40 deflated
GIF2EPSN.TC 1690 418 deflated
GIF2HERC.C 35649 9062 deflated
GIF2HERC.DOC 3512 1568 deflated
GIF2HERC.PRJ 44 40 deflated
GIF2HERC.TC 1690 411 deflated
GIF2HERD.PRJ 145 73 deflated
GIF2HERD.TC 1690 409 deflated
GIFASM.C 11048 2586 deflated
GIFASM.DOC 1095 549 deflated
GIFASM.PRJ 30 28 deflated
GIFASM.TC 1690 420 deflated
GIFASMD.TC 1690 426 deflated
GIFBG.C 11227 3443 deflated
GIFBG.DOC 1768 841 deflated
GIFBG.PRJ 29 27 deflated
GIFBG.TC 1690 410 deflated
GIFBGD.TC 1690 417 deflated
GIFCLIP.C 8867 2542 deflated
GIFCLIP.DOC 1353 663 deflated
GIFCLIP.PRJ 31 29 deflated
GIFCLIP.TC 1690 409 deflated
GIFCLIPD.TC 1690 430 deflated
GIFCLRMD.TC 1690 416 deflated
GIFCLRMP.C 9683 2770 deflated
GIFCLRMP.PRJ 32 30 deflated
GIFCLRMP.TC 1690 410 deflated
GIFCOMB.C 12209 3368 deflated
GIFCOMB.DOC 1078 552 deflated
GIFCOMB.PRJ 52 38 deflated
GIFCOMB.TC 1690 409 deflated
GIFCOMBD.TC 1690 414 deflated
GIFFLIP.C 11838 3168 deflated
GIFFLIP.DOC 795 388 deflated
GIFFLIP.PRJ 31 29 deflated
GIFFLIP.TC 1690 416 deflated
GIFFLIPD.TC 1690 417 deflated
GIFHISTD.TC 1690 415 deflated
GIFHISTO.C 9079 2901 deflated
GIFHISTO.DOC 1497 715 deflated
GIFHISTO.PRJ 32 30 deflated
GIFHISTO.TC 1690 410 deflated
GIFINTED.TC 1690 409 deflated
GIFINTER.C 9512 2654 deflated
GIFINTER.DOC 503 263 deflated
GIFINTER.PRJ 32 30 deflated
GIFINTER.TC 1690 412 deflated
GIFINTO.C 4499 1689 deflated
GIFINTO.DOC 916 468 deflated
GIFINTO.PRJ 31 29 deflated
GIFINTO.TC 1690 409 deflated
GIFINTOD.TC 1690 419 deflated
GIFPOS.C 7097 2038 deflated
GIFPOS.DOC 987 470 deflated
GIFPOS.PRJ 30 28 deflated
GIFPOS.TC 1690 410 deflated
GIFPOSD.TC 1690 422 deflated
GIFRSIZD.TC 1690 410 deflated
GIFRSIZE.C 11860 3393 deflated
GIFRSIZE.DOC 765 362 deflated
GIFRSIZE.PRJ 32 30 deflated
GIFRSIZE.TC 1690 411 deflated
GIFTEXT.C 12614 3015 deflated
GIFTEXT.DOC 997 518 deflated
GIFTEXT.PRJ 31 29 deflated
GIFTEXT.TC 1690 414 deflated
GIFTEXTD.PRJ 132 61 deflated
GIFTEXTD.TC 1690 412 deflated
GIF_ERR.C 3776 1012 deflated
GIF_HASH.C 5309 1541 deflated
GIF_HASH.H 1487 577 deflated
GIF_LIB.DOC 17912 5101 deflated
GIF_LIB.H 5925 1609 deflated
GIF_LIB.PRJ 164 62 deflated
GIF_LIB.TC 1690 383 deflated
GIF_LIBD.TC 1690 382 deflated
HERC2GFD.PRJ 174 70 deflated
HERC2GFD.TC 1690 395 deflated
HERC2GIF.C 1055 363 deflated
HERC2GIF.PRJ 32 30 deflated
HERC2GIF.TC 1690 397 deflated
LIBERROR.DOC 5320 1317 deflated
MAKE-LIB.BAT 320 186 deflated
PORSCHE.GIF 6144 5544 deflated
README.1ST 4165 1943 deflated
SOLID2.GIF 8551 8551 stored
TESTGIF.BAT 2324 850 deflated

Download File GIF_LIB.ZIP Here

Contents of the README.1ST file

This is a package I wrote so that images can be generated as easy as
possible using GIF format. I needed such routines, and as I did not find
anything like this (at list not free) I decided to write one...
This package is FREE for non commercial usage. You can do whatever
you like with it provided you do not charge anything for it or for a program
that uses it. More then that, if you release the source for your program, the
source of this package you used should also be included (with my name on
it...). You may NOT charge money for the sources as well, in that case.
I am releasing the sources as lots of peoples expressed interests in
such a beast, on usenet, in the last few month.
I will NOT be hold responsible for any damage of any kind it may
cause you. Use it at your own risk.
I do not have color system, so my Hercules card displayed lots of
dithered images (using gif2herc utility) in the last few weeks, but obviously
this is not enough. I will be very happy to get any remark on this package.
Bugs or even bug fixes (do not send my diff's as I will probably change the
sources after they will be released, unless they are really simple), or new
utilities (please try to follow my coding standards) are all welcome.
In order to compile it, please read the file COMPILE.ME. I uses TC 2.0
so other compiler owners are on their own. You can use both the tcc or tc.
In tc all warnings are turned on for maximum checking.
Porting the package to a unix machine should not be big problem. At list
the library is machine independent (as most of the utilities are). You will
however, need ANSI C compiler (such as gnu gcc).
You will find .\doc with documents on all the utilities and the library
itself. Also on . there should be a test batch file named TESTGIF.BAT that runs
most of the utilities using the images on .\pic (see below). Currently only
Hercules viewer is available (gif2herc) but if you have another viewer that
reads from stdin on different machine, you can use it instead (modify variable
GIF_DISPLAY). Note this test creates few files on your current directory, so
you might want to execute it from a temporary directory. You may want to print
the document of gif2herc before running this test so you can interactively
'play' with it.
Only one of the images on .\pic was actually generated by me -
solid2.gif, which is binary image extracted from Hercules frame buffer using
the 'POLY3D' program. The other two were released to usenet few month ago.
I do not think so, but let me know if I violate anything here.
Few final remarks. While 'playing' with the GIF format, I found few
holes in it, or in some of its implementations:
1. There is no explicit way one can specify comments in images, which can be
extremely useful. I used one of the extensions block to implements that.
The problem is that some of the gif viewer I tested (no names) died on
extension block (!?), so I decided not to use them in any of the utilities
although the library do support it, and if you are going to use only it
you can safely use the comments calls. Any better solution?
2. Some viewer even ignore the fact that one GIF file can hold few images.
I consider this property extremely useful (some of the utilities actually
manipulate exactly that - gifasm for example), and fully support it. I
think that a failure of a view program (or any GIF manipulator) here,
should be considered a bug.
3. One problem in the GIF format, I dont have simple solution to: it is the
limit of only 8bits per color. The importance of bigger width, is not only
for higher image quality. One can save other pixel properties in addition,
such as coverage (alpha channel as it is called in the rle utah raster
toolkit). The only solution I can thing of, is to generate few GIF files
in parallel - one for the pixel color, and the other for coverage. The
coverage property is extremely useful for utilities such as gifbg - back
ground color generator, and which can be composed with the image using

have fun

[email protected]

 December 7, 2017  Add comments

Leave a Reply