gd-vc6
所属分类:GDI/图象编程
开发工具:Visual C++
文件大小:501KB
下载次数:43
上传日期:2005-11-27 13:47:34
上 传 者:
weigj
说明: GD 一个非常好的创建图形的库,我修改过可以用VC6编译。
(a very good GD graphics library to create, I can be modified using VC6 compiler.)
文件列表:
gd (0, 2003-12-12)
gd\bdftogd (4211, 2000-06-04)
gd\bwtest.png (1010, 2000-06-04)
gd\demoin.png (10027, 2000-06-04)
gd\demoout.png (6235, 2000-08-08)
gd\gd.c (40052, 2000-06-04)
gd\gd.dep (78, 2000-11-30)
gd\gd.dsp (2772, 2000-11-30)
gd\gd.dsw (527, 2000-11-30)
gd\gd.h (9577, 2000-06-04)
gd\gd.lib (908524, 2000-11-30)
gd\gd.mak (2535, 2000-11-30)
gd\gd.ncb (33792, 2000-11-30)
gd\gd.opt (48640, 2000-11-30)
gd\gd2copypal.c (1360, 2000-06-04)
gd\gd2time.c (1298, 2000-06-04)
gd\gd2topng.c (910, 2000-06-04)
gd\gdcache.c (4948, 2000-06-04)
gd\gdcache.h (2756, 2000-06-04)
gd\gddemo.c (3051, 2000-06-04)
gd\gdemo.dsp (4329, 2000-08-08)
gd\gdemo.dsw (535, 2000-08-08)
gd\gdemo.ncb (33792, 2000-08-08)
gd\gdemo.opt (48640, 2000-08-08)
gd\gdemo.plg (1379, 2000-08-08)
gd\gdfontg.c (81853, 2000-06-04)
gd\gdfontg.h (519, 2000-06-04)
gd\gdfontl.c (78780, 2000-06-04)
gd\gdfontl.h (518, 2000-06-04)
gd\gdfontmb.c (58280, 2000-06-04)
gd\gdfontmb.h (479, 2000-06-04)
gd\gdfonts.c (51606, 2000-06-04)
gd\gdfonts.h (480, 2000-06-04)
gd\gdfontt.c (29618, 2000-06-04)
gd\gdfontt.h (513, 2000-06-04)
gd\gdkanji.c (12218, 2000-06-04)
gd\gdparttopng.c (1170, 2000-06-04)
gd\gdtables.c (6214, 2000-06-04)
gd\gdtest.c (9578, 2000-06-04)
gd\gdtestttf.c (2280, 2000-06-04)
... ...
gd 1.8.3
A graphics library for fast image creation
Follow this link to the latest version of this document.
_HEY! READ THIS!_ gd 1.8.3 creates PNG, JPEG and WBMP images, not
GIF images. This is a good thing. PNG is a more compact format, and
full compression is available. JPEG works well with photographic
images, and is still more compatible with the major Web browsers
than even PNG is. WBMP is intended for wireless devices (not
regular web browsers). Existing code will need modification to call
gdImagePng or gdImageJpeg instead of gdImageGif. _Please do not ask
us to send you the old GIF version of GD._ Unisys holds a patent on
the LZW compression algorithm, which is used in fully compressed
GIF images. The best solution is to move to legally unencumbered,
well-compressed, modern image formats such as PNG and JPEG as soon
as possible.
gd 1.8.3 _requires_ that the following libraries also be installed:
libpng
jpeg-6b or later
zlib
If you want to use the TrueType font support, you must also install
the _Freetype library_, including the _freetype.h header file_. See
the Freetype Home Page. No, I cannot explain why that site is down
on a particular day, and no, I can't send you a copy.
If you want to use the Xpm color bitmap loading support, you must
also have the X Window System and the Xpm library installed (Xpm is
often included in modern X distributions).
Please read the documentation and install the required libraries.
Do not send email asking why png.h is not found. See the
requirements section for more information. Thank you!
Table of Contents
* Credits and license terms
* What's new in version 1.8.3?
* What's new in version 1.8.2?
* What's new in version 1.8.1?
* What's new in version 1.8?
* What's new in version 1.7.3?
* What's new in version 1.7.2?
* What's new in version 1.7.1?
* What's new in version 1.7?
* What's new in version 1.6.3?
* What's new in version 1.6.2?
* What's new in version 1.6.1?
* What's new in version 1.6?
* What is gd?
* What if I want to use another programming language?
* What else do I need to use gd?
* How do I get gd?
* How do I build gd?
* gd basics: using gd in your program
* webpng: a useful example
* Function and type reference by category
* About the additional .gd image file format
* Please tell us you're using gd!
* If you have problems
* Alphabetical quick index
Up to the Boutell.Com, Inc. Home Page
Credits and license terms
In order to resolve any possible confusion regarding the authorship of
gd, the following copyright statement covers all of the authors who
have required such a statement. _If you are aware of any oversights in
this copyright notice, please contact Thomas Boutell who will be
pleased to correct them._
COPYRIGHT STATEMENT FOLLOWS THIS LINE
Portions copyright 1994, 1995, 1996, 1997, 19***, 1999, 2000 by Cold
Spring Harbor Laboratory. Funded under Grant P41-RR02188 by the
National Institutes of Health.
Portions copyright 1996, 1997, 19***, 1999, 2000 by Boutell.Com,
Inc.
Portions relating to GD2 format copyright 1999, 2000 Philip Warner.
Portions relating to PNG copyright 1999, 2000 Greg Roelofs.
Portions relating to libttf copyright 1999, 2000 John Ellson
(ellson@lucent.com).
Portions relating to JPEG copyright 2000, Doug Becker and copyright
(C) 1994-19***, Thomas G. Lane. This software is based in part on
the work of the Independent JPEG Group.
Portions relating to WBMP copyright 2000 Maurice Szmurlo and Johan
Van den Brande.
_Permission has been granted to copy, distribute and modify gd in
any context without fee, including a commercial application,
provided that this notice is present in user-accessible supporting
documentation._
This does not affect your ownership of the derived work itself, and
the intent is to assure proper credit for the authors of gd, not to
interfere with your productive use of gd. If you have questions,
ask. "Derived works" includes all programs that utilize the
library. Credit must be given in user-accessible documentation.
_This software is provided "AS IS."_ The copyright holders disclaim
all warranties, either express or implied, including but not
limited to implied warranties of merchantability and fitness for a
particular purpose, with respect to this code and accompanying
documentation.
Although their code does not appear in gd 1.8.3, the authors wish
to thank David Koblas, David Rowley, and Hutchison Avenue Software
Corporation for their prior contributions.
END OF COPYRIGHT STATEMENT
What is gd?
gd is a graphics library. It allows your code to quickly draw images
complete with lines, arcs, text, multiple colors, cut and paste from
other images, and flood fills, and write out the result as a PNG or
JPEG file. This is particularly useful in World Wide Web applications,
where PNG and JPEG are two of the formats accepted for inline images
by most browsers.
gd is not a paint program. If you are looking for a paint program, you
are looking in the wrong place. If you are not a programmer, you are
looking in the wrong place.
gd does not provide for every possible desirable graphics operation.
It is not necessary or desirable for gd to become a kitchen-sink
graphics package, but version 1.7.3 incorporates most of the commonly
requested features for an 8-bit 2D package. Support for truecolor
images, including truecolor JPEG and PNG, is planned for version 2.0.
What if I want to use another programming language?
Perl
gd can also be used from Perl, courtesy of Lincoln Stein's GD.pm
library, which uses gd as the basis for a set of Perl 5.x classes.
Highly recommended.
Tcl
gd can be used from Tcl with John Ellson's Gdtclft dynamically loaded
extension package. (Gdtclft2.0 or later is needed for gd-1.6 and up
with PNG output.)
Pascal
Pascal enthusiasts should look into Michael Bradbury's gdfp package.
Haskell
A new gd interface is now available for Haskell programmers.
Any Language
There are, at the moment, at least three simple interpreters that
perform gd operations. You can output the desired commands to a simple
text file from whatever scripting language you prefer to use, then
invoke the interpreter.
These packages have not been updated to gd 1.6 and up as of this
writing.
* tgd, by Bradley K. Sherman
* fly, by Martin Gleeson
What's new in version 1.8.3?
* WBMP output memory leak fixed
* #include corrected to #include "gd.h" in gd_wbmp.c
* Documented the fact that the source and output images shouldn't
match in the WBMP test except for black and white source images
What's new in version 1.8.2?
* WBMP support debugged and improved by Johann Van den Brande
* WBMP tests added to gdtest.c by Thomas Boutell
* Use of platform-dependent 'install' command removed by Thomas
Boutell
* Comments added to Makefile warning users to juggle the order of
the libraries if the linker complains; is there any portable way
to do this automatically, short of using autoconf?
* Documentation of gdImageCreateFromXpm corrected
* Updated links to fast-moving, always dodging libpng and zlib web
sites
What's new in version 1.8.1?
* Optional components no longer built by default (following the
documentation)
* JPEG code no longer requires inappropriate header files
* Win32 patches from Joe Gregorio
* 16-bit font support for bdftogd, from Honza Pazdziora
What's new in version 1.8?
* Support for JPEG output, courtesy of Doug Becker
* A link to Michael Bradbery's Pascal wrapper
* Support for WBMP output, courtesy of Maurice Szmurlo
* gdImageColorClosestHWB function based on hue, whiteness,
blackness, superior to the regular gdImageColorClosest function,
courtesy of Philip Warner
* License clarification: yes, you can modify gd
Additional JPEG Information
Support for reading and writing JPEG-format images is courtesy of Doug
Becker and the Independent JPEG Group / Thomas G. Lane. You can get
the latest version of the IJG JPEG software from
ftp://ftp.uu.net/graphics/jpeg/ (e.g., the jpegsrc.v6b.tar.gz file).
You _must_ use version 6b or later of the IJG JPEG software. You might
also consult the JPEG FAQ at http://www.faqs.org/faqs/jpeg-faq/.
What's new in version 1.7.3?
Another attempt at Makefile fixes to permit linking with all libraries
required on platforms with order- dependent linkers. Perhaps it will
work this time.
What's new in version 1.7.2?
An uninitialized-pointer bug in gdtestttf.c was corrected. This bug
caused crashes at the end of each call to gdImageStringTTF on some
platforms. Thanks to Wolfgang Haefelinger.
Documentation fixes. Thanks to Dohn Arms.
Makefile fixes to permit linking with all libraries required on
platforms with order- dependent linkers.
What's new in version 1.7.1?
A minor buglet in the Makefile was corrected, as well as an inaccurate
error message in gdtestttf.c. Thanks to Masahito Yamaga.
What's new in version 1.7?
Version 1.7 contains the following changes:
* Japanese language support for the TrueType functions. Thanks to
Masahito Yamaga.
* autoconf and configure have been removed, in favor of a carefully
designed Makefile which produces and properly installs the library
and the binaries. System-dependent variables are at the top of the
Makefile for easy modification. I'm sorry, folks, but autoconf
generated _many, many confused email messages_ from people who
didn't have things where autoconf expected to find them. I am not
an autoconf/automake wizard, and gd is a simple, very compact
library which does not need to be a shared library. I _did_ make
many improvements over the old gd 1.3 Makefile, which were
directly inspired by the autoconf version found in the 1.6 series
(thanks to John Ellson).
* Completely ANSI C compliant, according to the -pedantic-errors
flag of gcc. Several pieces of not-quite-ANSI-C code were causing
problems for those with non-gcc compilers.
* gdttf.c patched to allow the use of Windows symbol fonts, when
present (thanks to Joseph Peppin).
* extern "C" wrappers added to gd.h and the font header files for
the convenience of C++ programmers. bdftogd was also modified to
automatically insert these wrappers into future font header files.
Thanks to John Lindal.
* Compiles correctly on platforms that don't define SEEK_SET. Thanks
to Robert Bonomi.
* Loads Xpm images via the gdImageCreateFromXpm function, if the Xpm
library is available. Thanks to Caolan McNamara.
What's new in version 1.6.3?
Version 1.6.3 corrects a memory leak in gd_png.c. This leak caused a
significant amount of memory to be allocated and not freed when
writing a PNG image.
What's new in version 1.6.2?
Version 1.6.2 from John Ellson adds two new functions:
* gdImageStringTTF - scalable, rotatable, anti-aliased, TrueType
strings using the FreeType library, but only if libttf is found by
configure. _We do not provide TrueType fonts. Obtaining them is
entirely up to you._
* gdImageColorResolve - an efficient alternative for the common code
fragment:
if ((color=gdImageColorExact(im,R,G,B)) < 0)
if ((color=gdImageColorAllocate(im,R,G,B)) < 0)
color=gdImageColorClosest(im,R,G,B);
Also in this release the build process has been converted to GNU
autoconf/automake/libtool conventions so that both (or either) static
and shared libraries can be built.
What's new in version 1.6.1?
Version 1.6.1 incorporates superior PNG reading and writing code from
Greg Roelofs, with minor modifications by Tom Boutell. Specifically, I
altered his code to read non-palette images (converting them to
palette images badly, by dithering them), and to tolerate palette
images with types of transparency that gd doesn't actually support (it
just ignores the advanced transparency features). Any bugs in this
area are therefore my fault, not Greg's.
Unlike gd 1.6, users should have no trouble linking with gd 1.6.1 if
they follow the instructions and install all of the pieces. However,
_If you get undefined symbol errors, be sure to check for older
versions of libpng in your library directories!_
What's new in version 1.6?
Version 1.6 features the following changes:
_Support for 8-bit palette PNG images has been added. Support for GIF
has been removed._ This step was taken to completely avoid the legal
controversy regarding the LZW compression algorithm used in GIF.
Unisys holds a patent which is relevant to LZW compression. PNG is a
superior image format in any case. Now that PNG is supported by both
Microsoft Internet Explorer and Netscape (in their recent releases),
we highly recommend that GD users upgrade in order to get
well-compressed images in a format which is legally unemcumbered.
What's new in version 1.5?
Version 1.5 featured the following changes:
_New GD2 format_
An improvement over the GD format, the GD2 format uses the zlib
compression library to compress the image in chunks. This
results in file sizes comparable to GIFs, with the ability to
access parts of large images without having to read the entire
image into memory.
This format also supports version numbers and rudimentary
validity checks, so it should be more 'supportable' than the
previous GD format.
_Re-arranged source files_
gd.c has been broken into constituant parts: io, gif, gd, gd2
and graphics functions are now in separate files.
_Extended I/O capabilities._
The source/sink feature has been extended to support GD2 file
formats (which require seek/tell functions), and to allow more
general non-file I/O.
_Better support for Lincoln Stein's Perl Module_
The new gdImage*Ptr function returns the chosen format stored
in a block of memory. This can be directly used by the GD perl
module.
_Added functions_
gdImageCreateFromGd2Part - allows retrieval of part of an image
(good for huge images, like maps),
gdImagePaletteCopy - Copies a palette from one image to
another, doing it's best to match the colors in the target
image to the colors in the source palette.
gdImageGd2, gdImageCreateFromGd2 - Support for new format
gdImageCopyMerge - Merges two images (useful to highlight part
of an image)
gdImageCopyMergeGray - Similar to gdImageCopyMerge, but tries
to preserve source image hue.
gdImagePngPtr, gdImageJpegPtr, gdImageWBMPPtr, gdImageGdPtr,
gdImageGd2Ptr - return memort blocks for each type of image.
gdImageCreateFromPngCtx, gdImageCreateFromGdCtx,
gdImageCreateFromGd2Ctx, gdImageCreateFromGd2PartCtx - Support
for new I/O context.
_NOTE:_ In fairness to Thomas Boutell, any bug/problems with any of
the above features should probably be reported to Philip Warner.
What's new in version 1.4?
Version 1.4 features the following changes:
Fixed polygon fill routine (again)
Thanks to Kirsten Schulz, version 1.4 is able to fill numerous
types of polygons that caused problems with previous releases,
including version 1.3.
Support for alternate data sources
Programmers who wish to load a GIF from something other than a
stdio FILE * stream can use the new gdImageCreateFromPngSource
function.
Support for alternate data destinations
Programmers who wish to write a GIF to something other than a
stdio FILE * stream can use the new gdImagePngToSink function.
More tolerant when reading GIFs
Version 1.4 does not crash when reading certain animated GIFs,
although it still only reads the first frame. Version 1.4 also
has overflow testing code to prevent crashes when reading
damaged GIFs.
What's new in version 1.3?
Version 1.3 features the following changes:
Non-LZW-based GIF compression code
Version 1.3 contained GIF compression code that uses simple Run
Length Encoding instead of LZW compression, while still
retaining compatibility with normal LZW-based GIF decoders
(your browser will still like your GIFs). _LZW compression is
patented by Unisys. We are currently reevaluating the approach
taken by gd 1.3. The current release of gd does not support
this approach. We recommend that you use the current release,
and generate PNG images._ Thanks to Hutchison Avenue Software
Corporation for contributing the RLE GIF code.
8-bit fonts, and 8-bit font support
This improves support for European languages. Thanks are due to
Honza Pazdziora and also to Jan Pazdziora . Also see the
provided bdftogd Perl script if you wish to convert fixed-width
X11 fonts to gd fonts.
16-bit font support (no fonts provided)
Although no such fonts are provided in the distribution, fonts
containing more than 256 characters should work if the
gdImageString16 and gdImageStringUp16 routines are used.
Improvements to the "webpng" example/utility
The "webpng" utility is now a slightly more useful application.
Thanks to Brian Dowling for this code.
Corrections to the color resolution field of GIF output
Thanks to Bruno Aureli.
Fixed polygon fills
A one-line patch for the infamous polygon fill bug, courtesy of
Jim Mason. I believe this fix is sufficient. However, if you
find a situation where polygon fills still fail to behave
... ...
近期下载者:
相关文件:
收藏者: