⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.html

📁 Linux/Unix下的绘图函数库(Graphic Drawing Library)
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<P><A NAME="whatsnew1.6.2"><H3>What's new in version 1.6.2?</H3></A>Version 1.6.2 from John Ellson <ellson@graphviz.org> adds two new functions:<ul><li>gdImageStringTTF - scalable, rotatable, anti-aliased, TrueType strings usingthe FreeType library, but only if libttf is found by configure.<strong>We do not provide TrueType fonts. Obtaining themis entirely up to you.</strong><li>gdImageColorResolve - an efficient alternative for thecommon code fragment:<pre>      if ((color=gdImageColorExact(im,R,G,B)) < 0)          if ((color=gdImageColorAllocate(im,R,G,B)) < 0)              color=gdImageColorClosest(im,R,G,B);</pre></ul><p>Also in this release the build process has been converted toGNU autoconf/automake/libtool conventions so that both (or either)static and shared libraries can be built.<P><A NAME="whatsnew1.6.1"><H3>What's new in version 1.6.1?</H3></A>Version 1.6.1 incorporates superior PNG reading and writing codefrom 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 thatgd doesn't actually support (it just ignores the advancedtransparency features). Any bugs in this area are therefore my fault, not Greg's.<p>Unlike gd 1.6, users should have no trouble linking withgd 1.6.1 if they follow the instructions and install all ofthe pieces. However, <strong>If you get undefined symbol errors,be sure to check for older versions of libpng in yourlibrary directories!</strong><P><A NAME="whatsnew1.6"><H3>What's new in version 1.6?</H3></A>Version 1.6 features the following changes:<p><strong>Support for 8-bit palette PNG images has been added.Support for GIF has been removed.</strong> This step was takento completely avoid the legal controversy regarding the LZWcompression algorithm used in GIF. Unisys holds a patent whichis relevant to LZW compression. PNG is a superior image formatin any case. Now that PNG is supported by both MicrosoftInternet 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.<P><A NAME="whatsnew1.5"><H3>What's new in version 1.5?</H3></A>Version 1.5 featured the following changes:<dl><dt><b>New GD2 format</b><dd>      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.<p>  This format also supports version numbers and rudimentary validity  checks, so it should be more 'supportable' than the previous GD format.<p><dt><b>Re-arranged source files</b><dd>      gd.c has been broken into constituant parts: io, gif, gd, gd2 and          graphics functions are now in separate files.<p><dt><b>Extended I/O capabilities.</b><dd>      The source/sink feature has been extended to support GD2 file formats (which          require seek/tell functions; seek must return 1 for success, 0 for failure), and to allow more general non-file I/O.<p><dt><b>Better support for Lincoln Stein's Perl Module</b><dd>      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.<p><dt><b>Added functions</b><dd>gdImageCreateFromGd2Part - allows retrieval of part of an image (good for huge images, like maps),<br>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.<br>gdImageGd2, gdImageCreateFromGd2 - Support for new format<br>gdImageCopyMerge - Merges two images (useful to highlight part of an image)<br>gdImageCopyMergeGray - Similar to gdImageCopyMerge, but tries to preserve source image hue.<br>gdImagePngPtr, gdImageJpegPtr, gdImageWBMPPtr, gdImageGdPtr, gdImageGd2Ptr - return memory blocks for each type of image.<br>gdImageCreateFromPngCtx, gdImageCreateFromGdCtx, gdImageCreateFromGd2Ctx, gdImageCreateFromGd2PartCtx - Support for new I/O context.</dl><b>NOTE:</b> In fairness to Thomas Boutell, any bug/problems with any of the above features shouldprobably be reported to <a href=mailto:pjw@rhyme.com.au>Philip Warner</a>.<P><A NAME="whatsnew1.4"><H3>What's new in version 1.4?</H3></A>Version 1.4 features the following changes:<dl><dt>Fixed polygon fill routine (again)<dd>Thanks to Kirsten Schulz, version 1.4 is able to fillnumerous types of polygons that caused problems withprevious releases, including version 1.3.<dt>Support for alternate data sources<dd>Programmers who wish to load a GIF from something otherthan a stdio FILE * stream can use the new<a href="#gdImageCreateFromPngSource">gdImageCreateFromPngSource</a> function.<dt>Support for alternate data destinations<dd>Programmers who wish to write a GIF to something otherthan a stdio FILE * stream can use the new<a href="#gdImagePngToSink">gdImagePngToSink</a> function.<dt>More tolerant when reading GIFs<dd>Version 1.4 does not crash when reading certain animated GIFs,although it still only reads the first frame. Version 1.4 also hasoverflow testing code to prevent crashes when readingdamaged GIFs.</dl><P><A NAME="whatsnew1.3"><H3>What's new in version 1.3?</H3></A>Version 1.3 features the following changes:<dl><dt>Non-LZW-based GIF compression code<dd>Version 1.3 contained GIF compression code that uses simple Run LengthEncoding instead of LZW compression, while still retaining compatibilitywith normal LZW-based GIF decoders (your browser will still like your GIFs).<strong>LZW compression is patented by Unisys. We are currently reevaluatingthe approach taken by gd 1.3. The current release of gd does not supportthis approach. We recommend that you use the current release, and generatePNG images.</strong> Thanks to Hutchison Avenue Software Corporation for contributingthe RLE GIF code.<dt>8-bit fonts, and 8-bit font support<dd>This improves support for European languages. Thanks are dueto Honza Pazdziora <adelton@informatics.muni.cz> and also toJan Pazdziora <adelton@fi.muni.cz>. Also see the provided bdftogdPerl script if you wish to convert fixed-width X11 fontsto gd fonts.<dt>16-bit font support (no fonts provided)<dd>Although no such fonts are provided in the distribution,fonts containing more than 256 characters should work if thegdImageString16 and gdImageStringUp16 routines are used.<dt>Improvements to the "webpng" example/utility<dd>The "webpng" utility is now a slightly more useful application. Thanks toBrian Dowling for this code.<dt>Corrections to the color resolution field of GIF output<dd>Thanks to Bruno Aureli.<dt>Fixed polygon fills<dd>A one-line patch for the infamous polygon fill bug, courtesyof Jim Mason. I believe this fix is sufficient. However, if youfind a situation where polygon fills still fail to behave properly,please send code that demonstrates the problem, <em>and</em> a fix ifyou have one. Verifying the fix is important.<dt>Row-major, not column-major<dd>Internally, gd now represents the array of pixels asan array of rows of pixels, rather than an array of columnsof pixels. This improves the performance of compression anddecompression routines slightly, because horizontally adjacentpixels are now next to each other in memory. <strong>This shouldnot affect properly written gd applications, but applications thatdirectly manipulate the <code>pixels</code> array will requirechanges.</strong></dl><A NAME="required"><H3>What else do I need to use gd?</H3></A><P>To use gd, you will need an ANSI C compiler. <strong>All popularWindows 95 and NT C compilers are ANSI C compliant.</strong> Anyfull-ANSI-standard C compiler should be adequate. <strong>The cccompiler released with SunOS 4.1.3 is not an ANSI C compiler.Most Unix users who do not already have gcc should get it.gcc is free, ANSI compliant and a de facto industry standard.Ask your ISP why it is missing.</strong><P>As of version 1.6, you also need the zlib compression library,and the libpng library. As of version 1.6.2, you can draw textusing antialiased TrueType fonts if you also have the libttflibrary installed, but this is not mandatory.zlib is available for a variety of platforms from<a href="http://www.freesoftware.com/pub/infozip/index.html">the zlib web site</a>.libpng is available for a variety of platforms from<a href="http://www.cdrom.com/pub/png/">the PNG web site</a>.<P>You will also want a PNG viewer, if you do not already haveone for your system, since you will need a good way to check theresults of your work. Netscape 4.04 and higher, and MicrosoftInternet Explorer 4.0 or higher, both support PNG.<strong>Not every PNG-compatible viewer supports alpha channeltransparency,</strong> which is why gd 2.0.2 and above do alphablending in the library by default; it is possible to turn on thesaving of alpha channel information to the file instead.<P><A NAME="getgd"><H3>How do I get gd?</H3></A><h4>Binaries (DLL for Windows programmers):</h4><ul><li><a href="http://www.boutell.com/gd/http/gdwin32.zip">.ZIP File of DLL, Headers, Et Cetera</a><p></ul><h4>Source Code:</h4><ul><li><a href="http://www.boutell.com/gd/http/gd-2.0.33.tar.gz">Gzipped Tar File (Unix)</a><li><a href="http://www.boutell.com/gd/http/gd-2.0.33.zip">.ZIP File of SOURCE CODE (Windows)</a></ul><P><A NAME="buildgd"><H3>How do I build gd?</H3></A><blockquote>Win32 DLL users: if you are using MSVC, use the provided batch file<code>makemsvcimport.bat</code> to make a bgd.lib import librarycorresponding to the provided bgd.dll. Copy bgd.dll to yourapplication directory, or to your Windows sytem directory. In thesettings of your MSVC project, you <b>MUST</b> choose the"multithreaded DLL" library option under "code generation." mingw32 and cygwin users can simply link with the provided libbgd.a stub library in order to use the DLL.</blockquote>Building gd From the Source<p>In order to build gd, you must first unpack the archive you havedownloaded. If you are not familiar with <code>tar</code> and<code>gunzip</code> (Unix) or <code>ZIP</code> (Windows), pleaseconsult with an experienced user of your system. Sorry, we cannotanswer questions about basic Internet skills.<p>Unpacking the archive will produce a directory called "gd-2.0.33".<p><h4>For Unix</h4><code>cd</code> to the 2.0.33 directory and type:<p><code>./configure</code><P><blockquote><STRONG>NOTE: BY DEFAULT, THE LIBRARY IS INSTALLED IN <code>/usr/local/lib</code></strong> and the include files areinstalled in <code>/usr/local/include</code>. IF YOU AREUPGRADING, you may wish to use:<pre>./configure --prefix=/usr</pre>Rather than just <code>./configure</code>, before typing<code>make</code> and <code>make install</code>.</blockquote><p>If all goes well, this will create a Makefile. If all does not go well --for instance, if neither the the JPEG nor the PNG and ZLIB librariesare found -- you will need to install those libraries, then come backand run <code>configure</code> again. <p>If necessary, make changes to the resulting Makefile. Then, type "make". If there are no errors, follow this with "make install". Because gd 2.0 and above installs as a shared library, it is necessary to install the library properly before running gd-based programs.<p>If you get errors, type <code>./configure --help</code> for moreinformation about the available options. In the unlikely eventthat the GNU autoconf-produced configure script does not work wellfor you, you may wish to try <code>configure.pl</code>, asimple Perl script with similar but less complete capabilities.If all else fails, try renaming <code>makefile.sample</code>to <code>Makefile</code>. However, <code>./configure</code> isalmost always your best bet.<blockquote><h4>For Windows</h4>Use the DLL version! See the paragraph at the beginning of this sectino.If you really want to compile it yourself for some strange reason, read on.<p>Create a project using your favorite programming environment.Copy all of the gd files to the project directory. Add <code>gd.c</code>to your project. Add other source files as appropriate. Learning thebasic skills of creating projects with your chosen C environmentis up to you. Alternatively, use the free <code>mingw32</code> or <c

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -