Feb 142018
 
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
File GIF_LIB2.ZIP from The Programmer’s Corner in
Category C Source Code
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
File Name File Size Zip Size Zip Type
COMPILE.ME 1919 958 deflated
DOC.ZIP 19355 17744 deflated
GIF_LIB.MSG 481 328 deflated
LIB.ZIP 30781 28989 deflated
PIC.ZIP 36450 36048 deflated
README.1ST 4165 1943 deflated
TESTGIF.BAT 2324 850 deflated
UTIL.ZIP 76180 55550 deflated

Download File GIF_LIB2.ZIP Here

Contents of the README.1ST file


hi,
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
gifcomb.

have fun

Gershon
[email protected]


 February 14, 2018  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)