debian/0000755000000000000000000000000012222240142007155 5ustar debian/libgd-tools.manpages0000644000000000000000000000002512222240036013110 0ustar debian/libgd-tools.1 debian/libgd3.lintian-overrides0000644000000000000000000000011112222240036013674 0ustar libgd3: embedded-library usr/lib/x86_64-linux-gnu/libgd.so.3.0.0: libgd2 debian/libgd-dev.examples0000644000000000000000000000013212222240036012550 0ustar src/demoin.png src/gdtest.c src/gdtestft.c src/gddemo.c src/gd2time.c src/testac.c test/* debian/libgd2-xpm-dev.postinst0000644000000000000000000000027412222240036013510 0ustar #!/bin/sh set -e DOCDIR=/usr/share/doc/libgd2-xpm-dev DOCLINK=libgd-dev if [ -d $DOCDIR ] && [ ! -L $DOCDIR ]; then rmdir $DOCDIR ln -s $DOCLINK $DOCDIR fi #DEBHELPER# exit 0 debian/watch0000644000000000000000000000032612222240036010211 0ustar # run the "uscan" command to check for upstream updates and more. version=3 opts="uversionmangle=s/RC/~rc/,dversionmangle=s/\~dfsg$//" \ https://bitbucket.org/libgd/gd-libgd/downloads/gd-([\.0-9].*).tar.xz debian debian/libgd3.install0000644000000000000000000000002412222240036011707 0ustar usr/lib/*/lib*.so.* debian/libgd-dev.dirs0000644000000000000000000000002412222240036011673 0ustar usr/lib usr/include debian/libgd3.symbols0000644000000000000000000002040312222240036011734 0ustar libgd.so.3 libgd3 #MINVER# * Build-Depends-Package: libgd-dev GD_COLOR_MAP_X11@Base 2.1.0~alpha~ gdAffineApplyToPointF@Base 2.1.0~alpha~ gdAffineConcat@Base 2.1.0~alpha~ gdAffineEqual@Base 2.1.0~alpha~ gdAffineExpansion@Base 2.1.0~alpha~ gdAffineFlip@Base 2.1.0~alpha~ gdAffineIdentity@Base 2.1.0~alpha~ gdAffineInvert@Base 2.1.0~alpha~ gdAffineRectilinear@Base 2.1.0~alpha~ gdAffineRotate@Base 2.1.0~alpha~ gdAffineScale@Base 2.1.0~alpha~ gdAffineShearHorizontal@Base 2.1.0~alpha~ gdAffineShearVertical@Base 2.1.0~alpha~ gdAffineTranslate@Base 2.1.0~alpha~ gdAlphaBlend@Base 2.1.0~alpha~ gdClearErrorMethod@Base 2.1.0~alpha~ gdColorMapLookup@Base 2.1.0~alpha~ gdDPExtractData@Base 2.1.0~alpha~ gdFTUseFontConfig@Base 2.1.0~alpha~ gdFontCacheSetup@Base 2.1.0~alpha~ gdFontCacheShutdown@Base 2.1.0~alpha~ gdFontGetGiant@Base 2.1.0~alpha~ gdFontGetLarge@Base 2.1.0~alpha~ gdFontGetMediumBold@Base 2.1.0~alpha~ gdFontGetSmall@Base 2.1.0~alpha~ gdFontGetTiny@Base 2.1.0~alpha~ gdFontGiant@Base 2.1.0~alpha~ gdFontLarge@Base 2.1.0~alpha~ gdFontMediumBold@Base 2.1.0~alpha~ gdFontSmall@Base 2.1.0~alpha~ gdFontTiny@Base 2.1.0~alpha~ gdFree@Base 2.1.0~alpha~ gdFreeFontCache@Base 2.1.0~alpha~ gdImageAABlend@Base 2.1.0~alpha~ gdImageAlphaBlending@Base 2.1.0~alpha~ gdImageArc@Base 2.1.0~alpha~ gdImageBmp@Base 2.1.0~alpha~ gdImageBmpCtx@Base 2.1.0~alpha~ gdImageBmpPtr@Base 2.1.0~alpha~ gdImageBoundsSafe@Base 2.1.0~alpha~ gdImageBrightness@Base 2.1.0~alpha~ gdImageChar@Base 2.1.0~alpha~ gdImageCharUp@Base 2.1.0~alpha~ gdImageClone@Base 2.1.0~rc2~ gdImageColor@Base 2.1.0~alpha~ gdImageColorAllocate@Base 2.1.0~alpha~ gdImageColorAllocateAlpha@Base 2.1.0~alpha~ gdImageColorClosest@Base 2.1.0~alpha~ gdImageColorClosestAlpha@Base 2.1.0~alpha~ gdImageColorClosestHWB@Base 2.1.0~alpha~ gdImageColorDeallocate@Base 2.1.0~alpha~ gdImageColorExact@Base 2.1.0~alpha~ gdImageColorExactAlpha@Base 2.1.0~alpha~ gdImageColorMatch@Base 2.1.0~alpha~ gdImageColorReplace@Base 2.1.0~alpha~ gdImageColorReplaceArray@Base 2.1.0~alpha~ gdImageColorReplaceCallback@Base 2.1.0~alpha~ gdImageColorReplaceThreshold@Base 2.1.0~alpha~ gdImageColorResolve@Base 2.1.0~alpha~ gdImageColorResolveAlpha@Base 2.1.0~alpha~ gdImageColorTransparent@Base 2.1.0~alpha~ gdImageCompare@Base 2.1.0~alpha~ gdImageContrast@Base 2.1.0~alpha~ gdImageConvolution@Base 2.1.0~alpha~ gdImageCopy@Base 2.1.0~alpha~ gdImageCopyMerge@Base 2.1.0~alpha~ gdImageCopyMergeGray@Base 2.1.0~alpha~ gdImageCopyResampled@Base 2.1.0~alpha~ gdImageCopyResized@Base 2.1.0~alpha~ gdImageCopyRotated@Base 2.1.0~alpha~ gdImageCreate@Base 2.1.0~alpha~ gdImageCreateFromBmp@Base 2.1.0~alpha~ gdImageCreateFromBmpCtx@Base 2.1.0~alpha~ gdImageCreateFromBmpPtr@Base 2.1.0~alpha~ gdImageCreateFromGd2@Base 2.1.0~alpha~ gdImageCreateFromGd2Ctx@Base 2.1.0~alpha~ gdImageCreateFromGd2Part@Base 2.1.0~alpha~ gdImageCreateFromGd2PartCtx@Base 2.1.0~alpha~ gdImageCreateFromGd2PartPtr@Base 2.1.0~alpha~ gdImageCreateFromGd2Ptr@Base 2.1.0~alpha~ gdImageCreateFromGd@Base 2.1.0~alpha~ gdImageCreateFromGdCtx@Base 2.1.0~alpha~ gdImageCreateFromGdPtr@Base 2.1.0~alpha~ gdImageCreateFromGif@Base 2.1.0~alpha~ gdImageCreateFromGifCtx@Base 2.1.0~alpha~ gdImageCreateFromGifPtr@Base 2.1.0~alpha~ gdImageCreateFromJpeg@Base 2.1.0~alpha~ gdImageCreateFromJpegCtx@Base 2.1.0~alpha~ gdImageCreateFromJpegCtxEx@Base 2.1.0~alpha~ gdImageCreateFromJpegEx@Base 2.1.0~alpha~ gdImageCreateFromJpegPtr@Base 2.1.0~alpha~ gdImageCreateFromJpegPtrEx@Base 2.1.0~alpha~ gdImageCreateFromPng@Base 2.1.0~alpha~ gdImageCreateFromPngCtx@Base 2.1.0~alpha~ gdImageCreateFromPngPtr@Base 2.1.0~alpha~ gdImageCreateFromPngSource@Base 2.1.0~alpha~ gdImageCreateFromTga@Base 2.1.0~alpha~ gdImageCreateFromTgaCtx@Base 2.1.0~alpha~ gdImageCreateFromTgaPtr@Base 2.1.0~alpha~ gdImageCreateFromTiff@Base 2.1.0~alpha~ gdImageCreateFromTiffCtx@Base 2.1.0~alpha~ gdImageCreateFromTiffPtr@Base 2.1.0~alpha~ gdImageCreateFromWBMP@Base 2.1.0~alpha~ gdImageCreateFromWBMPCtx@Base 2.1.0~alpha~ gdImageCreateFromWBMPPtr@Base 2.1.0~alpha~ gdImageCreateFromWebp@Base 2.1.0~alpha~ gdImageCreateFromWebpCtx@Base 2.1.0~alpha~ gdImageCreateFromWebpPtr@Base 2.1.0~alpha~ gdImageCreateFromXbm@Base 2.1.0~alpha~ gdImageCreateFromXpm@Base 2.1.0~alpha~ gdImageCreatePaletteFromTrueColor@Base 2.1.0~alpha~ gdImageCreateTrueColor@Base 2.1.0~alpha~ gdImageCrop@Base 2.1.0~alpha~ gdImageCropAuto@Base 2.1.0~alpha~ gdImageCropThreshold@Base 2.1.0~alpha~ gdImageDashedLine@Base 2.1.0~alpha~ gdImageDestroy@Base 2.1.0~alpha~ gdImageEdgeDetectQuick@Base 2.1.0~alpha~ gdImageEllipse@Base 2.1.0~alpha~ gdImageEmboss@Base 2.1.0~alpha~ gdImageFill@Base 2.1.0~alpha~ gdImageFillToBorder@Base 2.1.0~alpha~ gdImageFilledArc@Base 2.1.0~alpha~ gdImageFilledEllipse@Base 2.1.0~alpha~ gdImageFilledPolygon@Base 2.1.0~alpha~ gdImageFilledRectangle@Base 2.1.0~alpha~ gdImageFlipBoth@Base 2.1.0~alpha~ gdImageFlipHorizontal@Base 2.1.0~alpha~ gdImageFlipVertical@Base 2.1.0~alpha~ gdImageGaussianBlur@Base 2.1.0~alpha~ gdImageGd2@Base 2.1.0~alpha~ gdImageGd2Ptr@Base 2.1.0~alpha~ gdImageGd@Base 2.1.0~alpha~ gdImageGdPtr@Base 2.1.0~alpha~ gdImageGetClip@Base 2.1.0~alpha~ gdImageGetPixel@Base 2.1.0~alpha~ gdImageGetTrueColorPixel@Base 2.1.0~alpha~ gdImageGif@Base 2.1.0~alpha~ gdImageGifAnimAdd@Base 2.1.0~alpha~ gdImageGifAnimAddCtx@Base 2.1.0~alpha~ gdImageGifAnimAddPtr@Base 2.1.0~alpha~ gdImageGifAnimBegin@Base 2.1.0~alpha~ gdImageGifAnimBeginCtx@Base 2.1.0~alpha~ gdImageGifAnimBeginPtr@Base 2.1.0~alpha~ gdImageGifAnimEnd@Base 2.1.0~alpha~ gdImageGifAnimEndCtx@Base 2.1.0~alpha~ gdImageGifAnimEndPtr@Base 2.1.0~alpha~ gdImageGifCtx@Base 2.1.0~alpha~ gdImageGifPtr@Base 2.1.0~alpha~ gdImageGrayScale@Base 2.1.0~alpha~ gdImageInterlace@Base 2.1.0~alpha~ gdImageJpeg@Base 2.1.0~alpha~ gdImageJpegCtx@Base 2.1.0~alpha~ gdImageJpegPtr@Base 2.1.0~alpha~ gdImageLine@Base 2.1.0~alpha~ gdImageMeanRemoval@Base 2.1.0~alpha~ gdImageNegate@Base 2.1.0~alpha~ gdImageNeuQuant@Base 2.1.0~alpha~ gdImageOpenPolygon@Base 2.1.0~alpha~ gdImagePaletteCopy@Base 2.1.0~alpha~ gdImagePaletteToTrueColor@Base 2.1.0~alpha~ gdImagePixelate@Base 2.1.0~alpha~ gdImagePng@Base 2.1.0~alpha~ gdImagePngCtx@Base 2.1.0~alpha~ gdImagePngCtxEx@Base 2.1.0~alpha~ gdImagePngEx@Base 2.1.0~alpha~ gdImagePngPtr@Base 2.1.0~alpha~ gdImagePngPtrEx@Base 2.1.0~alpha~ gdImagePngToSink@Base 2.1.0~alpha~ gdImagePolygon@Base 2.1.0~alpha~ gdImageRectangle@Base 2.1.0~alpha~ gdImageRotateInterpolated@Base 2.1.0~alpha~ gdImageSaveAlpha@Base 2.1.0~alpha~ gdImageScale@Base 2.1.0~alpha~ gdImageScatter@Base 2.1.0~alpha~ gdImageScatterColor@Base 2.1.0~alpha~ gdImageScatterEx@Base 2.1.0~alpha~ gdImageSelectiveBlur@Base 2.1.0~alpha~ gdImageSetAntiAliased@Base 2.1.0~alpha~ gdImageSetAntiAliasedDontBlend@Base 2.1.0~alpha~ gdImageSetBrush@Base 2.1.0~alpha~ gdImageSetClip@Base 2.1.0~alpha~ gdImageSetInterpolationMethod@Base 2.1.0~alpha~ gdImageSetPixel@Base 2.1.0~alpha~ gdImageSetResolution@Base 2.1.0~alpha~ gdImageSetStyle@Base 2.1.0~alpha~ gdImageSetThickness@Base 2.1.0~alpha~ gdImageSetTile@Base 2.1.0~alpha~ gdImageSharpen@Base 2.1.0~alpha~ gdImageSmooth@Base 2.1.0~alpha~ gdImageSquareToCircle@Base 2.1.0~alpha~ gdImageString16@Base 2.1.0~alpha~ gdImageString@Base 2.1.0~alpha~ gdImageStringFT@Base 2.1.0~alpha~ gdImageStringFTCircle@Base 2.1.0~alpha~ gdImageStringFTEx@Base 2.1.0~alpha~ gdImageStringTTF@Base 2.1.0~alpha~ gdImageStringUp16@Base 2.1.0~alpha~ gdImageStringUp@Base 2.1.0~alpha~ gdImageTiff@Base 2.1.0~alpha~ gdImageTiffCtx@Base 2.1.0~alpha~ gdImageTiffPtr@Base 2.1.0~alpha~ gdImageTrueColorToPalette@Base 2.1.0~alpha~ gdImageTrueColorToPaletteSetMethod@Base 2.1.0~alpha~ gdImageTrueColorToPaletteSetQuality@Base 2.1.0~alpha~ gdImageWBMP@Base 2.1.0~alpha~ gdImageWBMPCtx@Base 2.1.0~alpha~ gdImageWBMPPtr@Base 2.1.0~alpha~ gdImageWebp@Base 2.1.0~alpha~ gdImageWebpCtx@Base 2.1.0~alpha~ gdImageWebpEx@Base 2.1.0~alpha~ gdImageWebpPtr@Base 2.1.0~alpha~ gdImageWebpPtrEx@Base 2.1.0~alpha~ gdImageXbmCtx@Base 2.1.0~alpha~ gdNewDynamicCtx@Base 2.1.0~alpha~ gdNewDynamicCtxEx@Base 2.1.0~alpha~ gdNewFileCtx@Base 2.1.0~alpha~ gdNewSSCtx@Base 2.1.0~alpha~ gdSetErrorMethod@Base 2.1.0~alpha~ gdTransformAffineBoundingBox@Base 2.1.0~alpha~ gdTransformAffineCopy@Base 2.1.0~alpha~ gdTransformAffineGetImage@Base 2.1.0~alpha~ debian/gdlib-config.10000644000000000000000000000361212222240036011567 0ustar .TH GD 1 .SH NAME gdlib-config - script to get information about the installed version of GD .SH SYNOPSIS .B gdlib-config [\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-cflags] .SH DESCRIPTION \fIgdlib-config\fP is a tool that is used to configure to determine the compiler and linker flags that should be used to compile and link programs that use the \fIGD\fP library. It is also used internally to the .m4 macros for GNU autoconf that are included with the \fIGD\fP library. . .SH OPTIONS \fIgdlib-config\fP accepts the following options (and more - run \fIgdlib-config\fP with no options for the rest): .TP 8 .B \-\-version Print the currently installed version of the \fIGD\fP library on the standard output. .TP 8 .B \-\-libs Print the linker flags that are necessary to link a \fIGD\fP program. .TP 8 .B \-\-cflags Print the compiler flags that are necessary to compile a \fIGD\fP program. .TP 8 .B \-\-prefix=PREFIX If specified, use PREFIX instead of the installation prefix that \fIGD\fP was built with when computing the output for the \-\-cflags and \-\-libs options. This option is also used for the exec prefix if \-\-exec\-prefix was not specified. This option must be specified before any \-\-libs or \-\-cflags options. .TP 8 .B \-\-exec\-prefix=PREFIX If specified, use PREFIX instead of the installation exec prefix that \fIGD\fP was built with when computing the output for the \-\-cflags and \-\-libs options. This option must be specified before any \-\-libs or \-\-cflags options. .SH COPYRIGHT Copyright \(co 1998 Owen Taylor Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Modified for GD by Jonas Smedegaard debian/libgd-tools.install0000644000000000000000000000031412222240036012764 0ustar usr/bin/gd2togif usr/bin/gd2copypal usr/bin/pngtogd2 usr/bin/gdcmpgif usr/bin/giftogd2 usr/bin/annotate usr/bin/pngtogd usr/bin/gdtopng usr/bin/webpng usr/bin/gdparttopng usr/bin/gd2topng usr/bin/bdftogd debian/copyright0000644000000000000000000002404112222240036011113 0ustar Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174 Upstream-Name: GD Upstream-Contact: Pierre-Alain Joye Source: http://www.libgd.org/releases/ Files-Excluded: VMS/* test/* Files: * Copyright: 1991-2002, Thomas G. Lane 1994-2002, Cold Spring Harbor Laboratory 1996-2002, Thomas Boutell (Boutell.Com, Inc.) 1999-2002, Greg Roelofs 1999-2002, John Ellson 1999-2002, Philip Warner 2000-2002, Maurice Szmurlo 2000-2002, Johan Van den Brande 2000-2002, Doug Becker 2000-2007 Pierre-Alain Joye License: GD Files: */Makefile.in Copyright: 1994-2006, Free Software Foundation, Inc. License: GAP~Makefile.in Files: depcomp ltmain.sh missing Copyright: 1996-2005, Free Software Foundation, Inc License: GPL-2+ with Autoconf exception As a special exception to the GNU General Public License, if you distribute this file as part of a program that contains a configuration script generated by Autoconf, you may include it under the same distribution terms that you use for the rest of that program. Files: src/strlcpy.c Copyright: 1998, Todd C. Miller License: BSD-3-clause Files: configure Copyright: 1992-1996, 1998-2006 License: GAP~configure Files: install-sh Copyright: 1991, the Massachusetts Institute of Technology License: MIT Files: src/gd_wbmp.c Copyright: 2000, Maurice Szmurlo ????, Johan Van den Brande License: HPND Files: src/gd_gif_out.c Copyright: 1989, Jef Poskanzer License: HPND Files: src/gd_nnquant.c Copyright: 1994, Anthony Dekker 2004-2007, Stuart Coyle 2013, Pierre A. Joye License: XFIG Files: src/webpimg.c src/webpimg.h Copyright: 2010, Google Inc. All rights reserved. License: WEBP Files: cmake/modules/CheckDIRSymbolExists.cmake cmake/modules/CheckPrototypeExists.cmake cmake/modules/CMakeParseArguments.cmake cmake/modules/FindFontConfig.cmake cmake/modules/FindFreetype.cmake cmake/modules/FindJPEG.cmake cmake/modules/FindPackageHandleStandardArgs.cmake cmake/modules/FindPNG.cmake cmake/modules/FindVPX.cmake cmake/modules/FindXPM.cmake Copyright: 2002-2013, Kitware, Inc., Insight Consortium 2010 Alexander Neundorf 2013 Pierre A. Joye 2006,2007 Laurent Montel License: BSD-3-clause Files: cmake/modules/FindPTHREAD.cmake Copyright: 2005 - 2013 by INRIA License: GPL-2+ Files: cmake/modules/TestForHighBitCharacters.cmake cmake/modules/TestForHighBitCharacters.c cmake/modules/TestForStandardHeaderwait.cmake Copyright: 2006 Alan W. Irwin License: GPL-2+ Files: debian/* Copyright: 2001, Ivo Timmermans 2002-2010, Jonas Smedegaard 2013, Ondřej Surý License: GPL-2+ License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Comment: On Debian systems the 'GNU General Public License' version 2 is located in '/usr/share/common-licenses/GPL-2'. License: GAP~Makefile.in This Makefile.in is free software; the Free Software Foundation gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved. License: GAP~configure This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. License: GD 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. License: HPND Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty. License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: MIT Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of M.I.T. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. M.I.T. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. License: XFIG Any party obtaining a copy of these files from the author, directly or indirectly, is granted, free of charge, a full and unrestricted irrevocable, world-wide, paid up, royalty-free, nonexclusive right and license to deal in this software and documentation files (the "Software"), including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons who receive copies from any such party to do so, with the only requirement being that this copyright notice remain intact. License: WEBP Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . * Neither the name of Google nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . Additional IP Rights Grant (Patents) . “This implementation” means the copyrightable works distributed by Google as part of the WebM Project. . Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, transfer, and otherwise run, modify and propagate the contents of this implementation of VP8, where such license applies only to those patent claims, both currently owned by Google and acquired in the future, licensable by Google that are necessarily infringed by this implementation of VP8. This grant does not include claims that would be infringed only as a consequence of further modification of this implementation. If you or your agent or exclusive licensee institute or order or agree to the institution of patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that this implementation of VP8 or any code incorporated within this implementation of VP8 constitutes direct or contributory patent infringement, or inducement of patent infringement, then any patent rights granted to you under this License for this implementation of VP8 shall terminate as of the date such litigation is filed. debian/doc_cleaner.pl0000644000000000000000000000246312222240036011757 0ustar #!/usr/bin/perl # These corrections makes index.html from the libgd 2.0.11 source # pass the weblint check. my @lines=<>; my $text = join "", @lines; # must contain all or none of the parameters $text =~ s|<(body)[^>]*>|<$1>|i; # is of higher order than $text =~ s|(]*)?>)|$2$1|gis; $text =~ s|()([^<]*)|$2$1|gi; # requires closing $text =~ s|(][^<]*<(a)\s[^<]*)()|$1$3|gis; $text =~ s|(
<(a)\sname=[^<]+?()?([^<]*$4$7|gis; # cannot be nested $text =~ s|([^<]*\)[^<]*)()|$1$3$2|gis; # HREF parameter of must be quoted $text =~ s|href=([^"][^\s">]*)|href="$1"|gi; # <> not defining a tag must be escaped $text =~ s|<([^\s"@<>]+\@[^\s"@<>]+)>|<$1>|g; $text =~ s|(\s)<(\s)|$1<$2|g; $text =~ s|([^-]-)>|$1>|g; $text =~ s||<xxx>|; # Correct typos... $text =~ s|(void gdImageJpegCtx[^<]*)|$1|; $text =~ s|\n(
)|$1|; $text =~ s|
\n(
)|$1gdImageAlpha$2|; $text =~ s|(int gdImageBlue[^<]*)|
$1|; $text =~ s|VALIGN="TOP >|VALIGN="TOP">|g; $text =~ s|(

\n

)|\n$1|gis; print $text; debian/README.source0000644000000000000000000000376312222240036011347 0ustar Building this package for Debian -------------------------------- This source package uses quilt to apply and remove its patches. Please refer to /usr/share/doc/quilt/README.source for information about how to use quilt for source packages. Developing this package for Debian ---------------------------------- The source of this package is developed using git and the helper tool git-buildpackage, with all official releases tagged and signed and binary diffs of tarballs stored using pristine-tar. This is documented below /usr/share/doc/git-buildpackage/manual-html/ . A custom build target shows current upstream and packaging versions: debian/rules print-version Current upstream tarball can be prepared using this other build target: debian/rules get-orig-source To switch to newer upstream source, first add a dummy changelog entry and comment out DEB_UPSTREAM_TARBALL_MD5 before getting the source: dch -v ${new_upstream_version}-1 "Dummy changelog entry" sed -i -e 's/^\(DEB_UPSTREAM_TARBALL_MD5\b\)/#\1/' debian/rules debian/rules get-orig-source Store new md5sum to help ensure identical source is received later. Setting DEB_MAINTAINER_MODE=1 enables additional build routines helpful during development of the package, but unfit for normal builds. This typically includes the CDBS feature of auto-updating debian/control with CDBS-related build-dependencies, which is forbidden by Debian Policy as build environment must not change during automated builds. Maintaining packaging build routines ------------------------------------ This source package wraps debhelper commands and other tedious parts of the build routines using the CDBS framework. Please refer to the actual makefile snippets included from debian/rules for details on their purpose and ways to override defaults. Additionally, makefile snippets included from below /usr/share/cdbs may also be documented in /usr/share/doc/cdbs/cdbs-doc.pdf.gz . -- Jonas Smedegaard Thu, 26 Feb 2009 21:28:29 +0100 debian/libgd2-xpm-dev.lintian-overrides0000644000000000000000000000013012222240036015252 0ustar libgd2-xpm-dev: virtual-package-depends-without-real-package-depends depends: libgd-dev debian/libgd-tools.links0000644000000000000000000000117712222240036012446 0ustar /usr/share/man/man1/libgd-tools.1.gz /usr/share/man/man1/annotate.1.gz /usr/share/man/man1/libgd-tools.1.gz /usr/share/man/man1/bdftogd.1.gz /usr/share/man/man1/libgd-tools.1.gz /usr/share/man/man1/pngtogd.1.gz /usr/share/man/man1/libgd-tools.1.gz /usr/share/man/man1/pngtogd2.1.gz /usr/share/man/man1/libgd-tools.1.gz /usr/share/man/man1/gdtopng.1.gz /usr/share/man/man1/libgd-tools.1.gz /usr/share/man/man1/gd2topng.1.gz /usr/share/man/man1/libgd-tools.1.gz /usr/share/man/man1/gd2copypal.1.gz /usr/share/man/man1/libgd-tools.1.gz /usr/share/man/man1/gdparttopng.1.gz /usr/share/man/man1/libgd-tools.1.gz /usr/share/man/man1/webpng.1.gz debian/libgd-dev.manpages0000644000000000000000000000002612222240036012527 0ustar debian/gdlib-config.1 debian/libgd3.dirs0000644000000000000000000000001012222240036011175 0ustar usr/lib debian/libgd2-noxpm-dev.postinst0000644000000000000000000000027612222240036014047 0ustar #!/bin/sh set -e DOCDIR=/usr/share/doc/libgd2-noxpm-dev DOCLINK=libgd-dev if [ -d $DOCDIR ] && [ ! -L $DOCDIR ]; then rmdir $DOCDIR ln -s $DOCLINK $DOCDIR fi #DEBHELPER# exit 0 debian/source/0000755000000000000000000000000012222240036010457 5ustar debian/source/format0000644000000000000000000000001412222240036011665 0ustar 3.0 (quilt) debian/libgd-dev.install0000644000000000000000000000013412222240036012402 0ustar usr/bin/gdlib-config usr/include/* usr/lib/*/lib*.a usr/lib/*/lib*.so usr/lib/*/pkgconfig/* debian/libgd-tools.10000644000000000000000000000165612222240036011470 0ustar .TH LIBGD-TOOLS 1 "13 July 2002" .SH NAME libgd-tools \- programs to convert between gd and other graphics formats .SH SYNOPSIS .B libgd-tools .RI [ options ] " files" ... .br .B bar .RI [ options ] " files" ... .SH DESCRIPTION This manual page documents briefly the .B annotate , .B bdftogd , .B pngtogd , .B pngtogd2 , .B gdtopng , .B gd2topng , .B gd2copypal , .B gdparttopng and .B webpng commands, which are all distributed as part of the gd library. This manual page was written for the Debian distribution because the original program does not have a manual page. .PP .B libgd-tools are programs that convert between gd and other graphics formats. .SH OPTIONS These programs usually takes two options: input file and output file. If in doubt, simply run the program with no options for a tiny help. .SH AUTHOR This manual page was written by Jonas Smedegaard , for the Debian GNU/Linux system (but may be used by others). debian/libgd2-noxpm-dev.lintian-overrides0000644000000000000000000000013212222240036015611 0ustar libgd2-noxpm-dev: virtual-package-depends-without-real-package-depends depends: libgd-dev debian/changelog0000644000000000000000000013035112222240036011034 0ustar libgd2 (2.1.0-3) unstable; urgency=low * Enable subdir-objects in AC_INIT_AUTOMAKE (Closes: #724841) -- Ondřej Surý Mon, 30 Sep 2013 11:10:16 +0200 libgd2 (2.1.0-2) unstable; urgency=low * Properly quote GD_EXTRA_VERSIOn and GD_VERSION_STRING (Courtesy of Marc Deslauriers) (Closes: #714363) -- Ondřej Surý Fri, 28 Jun 2013 15:44:28 +0200 libgd2 (2.1.0-1) unstable; urgency=low * New upstream version 2.1.0 * Remove patches merged upstream and pull a fix for incorrect compiled-in version -- Ondřej Surý Thu, 27 Jun 2013 10:02:00 +0200 libgd2 (2.1.0~rc2-2) unstable; urgency=low * Pull new upstream tests and fixes (fixes the FTBFS on 32-bit archs) -- Ondřej Surý Mon, 10 Jun 2013 09:46:52 +0200 libgd2 (2.1.0~rc2-1) unstable; urgency=low * New upstream version 2.1.0~rc2 * font-pattern-pointer-deref.patch: Remove, merged upstream * Add new gdImageClone symbol in upstream libgd3 library -- Ondřej Surý Fri, 07 Jun 2013 13:30:36 +0200 libgd2 (2.1.0~rc1-2) unstable; urgency=low [ Colin Watson ] * Add missing pointer dereference in font_pattern (closes: #709050). [ Ondřej Surý ] * "I will test my changes with piuparts" release (Closes: #708111) -- Ondřej Surý Sat, 25 May 2013 19:43:22 +0200 libgd2 (2.1.0~rc1-1) unstable; urgency=low * Imported Upstream version 2.1.0~rc1 * Remove patches merged in upstream -- Ondřej Surý Fri, 24 May 2013 09:09:47 +0200 libgd2 (2.1.0~alpha1-6) unstable; urgency=low * Fix libgd2-dev -> libgd-dev in transitional packages (Closes: #708111) -- Ondřej Surý Thu, 23 May 2013 13:24:57 +0200 libgd2 (2.1.0~alpha1-5) unstable; urgency=low * Drop chrpath, it's not needed when we switched to libtiff-dev and it was broken anyway. -- Ondřej Surý Wed, 22 May 2013 10:28:27 +0200 libgd2 (2.1.0~alpha1-4) unstable; urgency=low * Build-Depend and Depend on libtiff-dev to make binNMUs easier * Fix libgd-dev dependency from libpng12-dev to libpng-dev * Don't ignore errors in postinst scripts * Fix debhelper-but-no-misc-depends in transitional packages * Silence invalid warning about virtual package depends on libgd-dev * Add missing Files: * to debian/copyright main License block * Explicitly call --with-tiff=/usr to catch tiff 3.x without pkg-config * Enable full hardening build -- Ondřej Surý Tue, 21 May 2013 17:47:54 +0200 libgd2 (2.1.0~alpha1-3) unstable; urgency=low * Build-depend on libtiff5-alt-dev to easy the transition * Pull some upstream fixes (Closes: #709074, #709074) * Add pkg-config support for tiff-4 (and others) to allow compilation against libtiff5-alt-dev (pull from upstream) * libgd-dev now depends on libtiff5-alt-dev | libtiff5-dev | libtiff-dev * Remove RPATH from binaries, it's not needed -- Ondřej Surý Fri, 17 May 2013 15:32:27 +0200 libgd2 (2.1.0~alpha1-2) unstable; urgency=low * Upload to unstable * Build-depend on libtiff5-dev | libtiff-dev to allow easier backports * Remove libjpeg skip test patch, add HAVE_CONFIG_H patch (Closes: #708413) * Yet another rename when uploading to unstable: + development library package to libgd-dev + shared library package to libgd3 -- Ondřej Surý Wed, 15 May 2013 13:42:49 +0200 libgd2 (2.1.0~alpha1-1) experimental; urgency=low * Update copyright with correct cmake module authors * Imported Upstream version 2.1.0~alpha1 * Update debian/watch to bitbucket.org * Add docdir symlinks in postinst for transitional packages when upgrading (Closes: #708111) -- Ondřej Surý Mon, 13 May 2013 16:57:19 +0200 libgd2 (2.1.0~alpha~8+ecc535-2) experimental; urgency=low * Build-Depend on libpng-dev (Closes: #662401) -- Ondřej Surý Tue, 07 May 2013 12:09:12 +0200 libgd2 (2.1.0~alpha~8+ecc535-1) experimental; urgency=low * Imported Upstream version 2.1.0~alpha~8+ecc535 * Imported Upstream version 2.1.0~alpha~7+292b0a * Imported Upstream version 2.1.0~alpha~6+bc7015 * Remove Breaks: php5-common, since it also clashes with PHP 5.4 * Introduce libgd2-dbg package with debug symbols -- Ondřej Surý Sun, 05 May 2013 10:42:20 +0200 libgd2 (2.1.0~alpha~5+9ca645-1) experimental; urgency=low * Imported Upstream version 2.1.0~alpha~5+9ca645 + This build changes the double->int conversion in clip_1d hopefully allowing the tests to pass correctly -- Ondřej Surý Sat, 27 Apr 2013 09:15:08 +0200 libgd2 (2.1.0~alpha~4+cf9d7f-1) experimental; urgency=low * Imported Upstream version 2.1.0~alpha~3 * Imported Upstream version 2.1.0~alpha~4+cf9d7f * Disable jpeg_read test which is broken with libjpeg8 * Add couple of new symbols and remove gdImageAntialias, that didn't make it to 2.1.0; add Breaks: php5 (<< 5.5.0~beta4) -- Ondřej Surý Thu, 25 Apr 2013 12:17:06 +0200 libgd2 (2.1.0~alpha~2-1) experimental; urgency=low * Imported Upstream version 2.1.0~alpha~2 * Update debian/libgd2-3.symbols with new functions -- Ondřej Surý Thu, 18 Apr 2013 09:35:28 +0200 libgd2 (2.1.0~alpha~1-2) experimental; urgency=low * Introduce transitional packages for libgd2-{noxpm,xpm}-dev * Don't install separate docs for transitional packages * Fix some formatting errors in gdlib-config.1 manpage * Fix the xmp->xpm typo -- Ondřej Surý Tue, 16 Apr 2013 08:58:45 +0200 libgd2 (2.1.0~alpha~1-1) experimental; urgency=low * Imported Upstream version 2.1.0~alpha~1 (upstream 2.1.0-alpha git snapshot) * Update uploaders to include me and remove Jonas * Update gbp.conf for experimental * Switch the build system to debhelper * Drop gnulib dependency (I have updated config.rpath upstream) (Closes: #396172) * Get rid of xpm vs noxpm library dichotomy (Closes: #443654, #376098) + Rename libgd2-{xpm,noxpm} to libgd2-3 to match bumped SONAME + Rename libgd2-{xpm,noxpm}-dev to libgd2-dev * Update debian/copyright; add license for gd_nnquant.c and gd_wepimp.* * Override dh_install to add --fail-missing to catch all new files * Remove obsolete patches from 2.0.x series, all have been merged upstream * Add autoreconf to dh invocation to generate configure * Add VPX and TIFF support to GD library * Update libgd2-3.symbols for latest git upstream version (Closes: #661543) * Install pkgconfig files * Patch gdlib-config to use pkg-config internally (Closes: #672953) -- Ondřej Surý Sun, 14 Apr 2013 11:12:25 +0200 libgd2 (2.0.36~rc1~dfsg-6.1) unstable; urgency=low * Non-maintainer upload. * Support multi-arch: (closes: #652496) - Mark libgd2-xpm, libgd2-noxpm, libgd2-xpm-dev and libgd2-noxpm-dev as same. - Adjust d-shlibs and dh-buildinfo build-dependency. * Drop .la files. -- Bastian Blank Sun, 13 May 2012 09:16:37 +0000 libgd2 (2.0.36~rc1~dfsg-6) unstable; urgency=low * Acknowledge NMU. Closes: bug#619537, #621612. Thanks to Luk Claes. * Rewrite copyright file using draft 174 of DEP-5 format. * Add patch 0003 to fix support large images. Closes: bug#595368. Thanks to Teodor Milkov. * Add patch 0004 to fix printf string formatting. Closes: bug#643422. Thanks to Didier Raboud and Thorsten Glaser. * Bump Standards-Version to 3.9.2. * Bump debhelper compatibility level to 7. * Update package relations: + Tighten build-dependency on cdbs: Needed to support debhelper 7. + Relax build-depend unversioned on debhelper and devscripts: Needed versions satisfied even in oldstable. -- Jonas Smedegaard Sat, 15 Oct 2011 22:23:42 +0200 libgd2 (2.0.36~rc1~dfsg-5.1) unstable; urgency=low * Non-maintainer upload. * Remove references to other libraries from dependency_libs field Closes: #619537,#621612. -- Luk Claes Mon, 30 May 2011 07:51:27 +0200 libgd2 (2.0.36~rc1~dfsg-5) unstable; urgency=low * Workaround CDBS not honoring per-flavor configure flags yet. Closes: bug#595709. Thanks to brian m. carlson. * Ease building with git-buildpackage: + Git-ignore quilt .pc dir. + Add dpkg source local-options. * Update copyright-check suppression: + Fix add ./ prefix. + Suppress demo/test graphics. + Avoid suppressing the whole debian subdir. -- Jonas Smedegaard Sun, 17 Oct 2010 15:11:45 +0200 libgd2 (2.0.36~rc1~dfsg-4) unstable; urgency=low * Acknowledge NMUs. Thanks to Giuseppe Iuculano and Robert Lemmen. * Drop local CDBS snippets: All included in main cdbs package now. As local snippets conflicted with recent releases of the cdbs package this closes: bug#564374. Thanks to Lucas Nussbaum and Philipp Kern. Tighten build-dependency on cdbs. * Use dpkg source format "3.0 (quilt)". Drop patchsys-quilt.mk and related dependencies. * Packaging moved to Git: + Update Vcs-* stanzas. + Add git-buildpackage config enabling pristine-tar and signed tags. * Add README.source documenting use of CDBS and git-buildpackage, and drop README.cdbs-tweaks. Drop cdbs comments in debian/rules. * Add DEP3 hints ot patch. * Update packaging hall of shame in TODO. * Rewrite debian/copyright using draft DEP5 format rev. 135. * Preserve (not clean) upstream-shipped tempfile during build. * Depend on ${misc:Depends}. Thanks to lintian. * Bump up standards-version to 3.9.1. * Use $(filter ...) instead of $(findstring ...) to extract space- separated options from DEB_BUILD_OPTIONS in debian/rules. * Build-depend unversioned on d-shlibs (needed version satisfied in oldstable). -- Jonas Smedegaard Sun, 05 Sep 2010 14:36:52 +0200 libgd2 (2.0.36~rc1~dfsg-3.2) unstable; urgency=low * Non-maintainer upload. * Fixed libjpeg dependency (Closes: #569682) -- Robert Lemmen Tue, 23 Mar 2010 17:06:39 +0000 libgd2 (2.0.36~rc1~dfsg-3.1) unstable; urgency=high * Non-maintainer upload by the Security Team. * Fixed CVE-2009-3546: possible buffer overflow or buffer over-read attacks via crafted files (Closes: #552534) -- Giuseppe Iuculano Mon, 09 Nov 2009 21:19:11 +0100 libgd2 (2.0.36~rc1~dfsg-3) unstable; urgency=medium * Drop bogus "-Wl,--disable-rpath" ld flags. Closes: bug#478534, #476018, thanks to Kumar Appaiah. * Install (cleaned copy of) index.html as both README and README.html. * Build-depend on html2text (pulled in by debhelper too, but also used explicitly so we must depend on it ourselves according to Policy). * Update local cdbs snippets: + Add and use local autotools.mk extended to support multiple build flavors (instead of custom-invoked configure + make). As extra bonus this fixes support for cross-compilation (thanks to Kumar Appaiah for pointing it out in bug#476018). + Add local autotools-vars.mk, makefile.mk and makefile-vars.mk needed by local autotools.mk above. + Strip non-printable characters in copyright-check.mk. + Relaxed copyright-check.mk to only warn by default. + Update dependency cleanup to strip cdbs 0.4.27 (not 0.4.27-1). * Update debian/copyright-hints. * Bump debhelper compatibility level to 6. * Semi-auto-update debian/control to update build-dependencies: DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean * Set urgency=medium as this fixes serious FTBFS bugs. -- Jonas Smedegaard Sat, 28 Jun 2008 16:54:40 +0200 libgd2 (2.0.36~rc1~dfsg-2) unstable; urgency=medium * Add symbols file. * Add patch 0001 to fix leak in gdImageCopyResized. * Set urgency=medium, as the bugfix above seems security-related. * Update local cdbs snippets: + Enable patchsys-quilt.mk. + Major improvements to update-tarball (but none of them affecting this current packaging). + Major improvements to copyright-check, including new versioned build-dependency on devscripts. Update debian/copyright_hints. Closes: bug#466642. + Drop buildcore.mk override. Set DEB_AUTO_UPDATE_DEBIAN_CONTROL directly instead when needed. + Update debian/README.cdbs-tweaks * Avoid copyright-check choking on config/install.sh and aclocal.m4. * Semi-auto-update debian/control to update build-dependencies: DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean -- Jonas Smedegaard Sat, 12 Apr 2008 00:49:13 +0200 libgd2 (2.0.36~rc1~dfsg-1) unstable; urgency=medium * New upstream prerelease. + Fixed gdImageCopy with true color image, the transparent color was ignored + Fixed support of PNG grayscale image with alpha channel + _gdCreateFromFile() can crash if gdImageCreate fails + gdImageCreateFrom*Ptr() can crash if gdNewDynamicCtxEx() fails + gdImageRectangle draws 1x1 rectangles as 1x3 rectangles + Possible integer overflow in gdImageFill() + Optimization for single pixel line not in correct order + gdImageColorDeallocate can write outside buffer + gdImageColorTransparent can write outside buffer + gdImageWBMPCtx can crash when createwbmp fails * Set urgency=medium due to this being a bugfix-only release, and some of the fixes seems security-related. * Move Homepage to own field (from pseudo-field in long description). * Move XS-Vcs-* control fields to Vcs-*. * Add patch 0003 to fix segfault when createwbmp fails. * Adjust watch file: + Include upstream prereleases + Ignore local trailing ~dfsg repackaging hint + Invoke svn-upgrade (not uupdate) * Update cdbs tweaks: + Support zip in upstream-tarball.mk (unneeded here) + Use ~ as repackaging delimiter in upstream-tarball.mk to make room for point releases and cleaned up rerelease + Rename top srcdir in repackaged tarball to $pkg-$ver.orig to comply with Developers Reference 6.7.8.2. + Support mangling upstream version string in upstream-tarball.mk + Drop buildcore.mk override (set DEB_AUTO_UPDATE_DEBIAN_CONTROL manually when needed instead) * Drop all patches: applied upstream. * Strip tests from repackaged source tarball: newly added truetype font comes without license, and all tests are unusable anyway without cmake modules that are already stripped. * Document stripped files in debian/copyright. * Update debian/copyright_hints (newer years for automade files). * Bump standards-version to 3.7.3 (no changes needed). * Semi-auto-update debian/control: DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules -- Jonas Smedegaard Thu, 03 Jan 2008 16:14:46 +0100 libgd2 (2.0.35.dfsg-3) unstable; urgency=high * Add patch hand-picked from upstream CVS: + gdImageColorTransparent can write outside buffer * Raise to urgency=high as this a small, security-related bugfix. -- Jonas Smedegaard Sun, 16 Sep 2007 21:57:28 +0200 libgd2 (2.0.35.dfsg-2) unstable; urgency=medium * Add patch (using patchsystem-quilt.mk cdbs snippet) hand-picked from upstream CVS to fix various security-related issues: + _gdCreateFromFile() can crash if gdImageCreate fails + gdImageCreateFrom*Ptr() can crash if gdNewDynamicCtxEx() + gdImageRectangle draws 1x1 rectangles as 1x3 rectangles + Possible integer overflow in gdImageFill() + Optimization for single pixel line not in correct order + gdImageColorDeallocate can write outside buffer * Add XS-Vcs-Svn and XS-Vcs-Browser fields to debian/control. * Update cdbs tweaks: + Support non-dot-delimited repackaging tag in update-tarball. + update-tarball needs recent cdbs (only relevant for backports). * Cleanup duplicate build-dependencies in debian/rules. * Semi-auto-update debian/control: DEB_BUILD_OPTIONS=cdbs-autoupdate fakeroot debian/rules pre-build * Fix shlibs dependencies: Use DEB_UPSTREAM_VERSION (instead of custom version variables). * Set urgenvy=medium due to the security-related fixes. -- Jonas Smedegaard Tue, 04 Sep 2007 20:28:46 +0200 libgd2 (2.0.35.dfsg-1) unstable; urgency=low * New upstream release. Closes: bug#431443, thanks to Sean Finney. * Repackage source tarball to avoid files below VMS and cmake that contains copyrights with questionable or missing licensing info. * Switch to team maintainance using Alioth project pkg-gd, and myself and Sean Finney as uploaders. Others interested in helping out maintaining packaging of GD and related packages, please get in touch with us at pgk-gd-devel@lists.alioth.debian.org . * Update CDBS tweaks: + Minor improvements to upstream-tarball.mk. + Advertise debian/README.cdbs-tweaks in debian/rules. * Replace deprecated ${Source-Version} with Use binNMU-safe ${binary:Version} in debian/control. Thanks to Lintian. * Update debian/copyright to include new copyright (BSD) for the file strlcpy.c. -- Jonas Smedegaard Sun, 12 Aug 2007 13:40:55 +0200 libgd2 (2.0.34-1) unstable; urgency=low * New upstream release. * Update cdbs tweaks: + Switch from vcs.mk to improved upstream-tarball.mk. + Minor updates to copyright-check. + Minor documentation updates. * Use debhelper.mk cdbs snippet (greatly simplifies custom rules). * No longer set library version (upstream takes care of this now). * Use www.libgd.org (not just libgd.org) as homepage. * Update watch file to use new upstream source (ignoring prereleases). * Cleanup package dependencies: + Provide virtual packages libgd-dev and libgd2. + Drop conflicts on pre-Sarge packages. + Fix conflicting with libgd-noxpm-dev (was libgd-xpm-dev twice). * Fix old changelog entry closing bug#167976, to please lintian. -- Jonas Smedegaard Thu, 17 May 2007 12:29:12 +0200 libgd2 (2.0.34~rc1-1) unstable; urgency=high * New upstream prerelease. * Drop all patches. Bugfixing patches are all either adopted or differently implemented upstream now, and the only feature patch to improve anti-aliasing is recommended by upstream to be avoided for now (will be included in later releases of GD). * Drop pthreads workaround. Upstream now properly handles this. * Avoid fallback build-dependencies on xlibs-dev, thanks to lintian. Avoid *-dev package dependencies too, and tighten build-dependency on d-shlibs to versions supporting the neat new runtime override feature of d-devlibdeps used for this. * Drop duplicate build-dependency on autotools-dev, thanks to lintian. * Bump up standards-version to 3.7.2. * Update debian/copyright and long descriptions with new upstream author and new upstream URLs. * Semi-autoupdate debian/control to have the above take effect: $ DEB_BUILD_OPTIONS=cdbs-autoupdate fakeroot debian/rules clean * Update debian/copyright-hints due to the relibtoolization. * Add new CDBS snippet vcs.mk hinting about the source environment. * Fix copyright-check CDBS snippet to properly ignore also CDBS-overridden autotools files. * Set urgency high, as the older pathced code is known to contain several bugs fixed in current upstream code. Work is ongoing about resolving if any of those bugs have known security issues with an official CVE. -- Jonas Smedegaard Tue, 30 Jan 2007 15:06:48 +0100 libgd2 (2.0.33-6) unstable; urgency=high * Acknowledge NMUs. Closes: bug#384838, #383747. Thanks to Paul and Martín Ferrari, and to Andreas Barth and Steinar H. Gunderson for watching my back. * Update local cdbs snippets (and add debian/README.cdbs-tweaks to source, documenting their purpose), fixing a FTBFS. Closes: bug#396174, thanks to Martin Pitt. * Semi-autoupdate debian/control to have the above take effect: $ DEB_BUILD_OPTIONS=cdbs-autoupdate fakeroot debian/rules clean * Add patch 1009 to fix segfaults due to lack of boundary checks for anti-aliasing. Closes: bug#404774, thanks (again!) to Paul. * Set urgency=high as the above is important to include with etch. -- Jonas Smedegaard Mon, 1 Jan 2007 20:18:13 +0100 libgd2 (2.0.33-5.2) unstable; urgency=high * Non-maintainer upload. * remove 1006_western_european_fonts.patch, as this breaks (at least) two different packages, and creates issues for people with central european encoding. It is also an unnecessary derivation from upstream. Closes: #383747 -- Andreas Barth Wed, 29 Nov 2006 16:34:54 +0000 libgd2 (2.0.33-5.1) unstable; urgency=medium * Non-maintainer upload. * 1008_segfault_invalid_gif.patch: New patch, adapted by Stefan Fritsch; fixes segfault (and possible security issue) when reading some forms of corrupted GIFs. (Closes: #384838) -- Steinar H. Gunderson Mon, 11 Sep 2006 01:24:24 +0200 libgd2 (2.0.33-5) unstable; urgency=low * Merge patch 1002 with different approach from ubuntu, and rename as 1002_CVE-2006-2906 now that the bug (infinite loop in GIF code) has an official name. Closes: bug#372912 (thanks to Alec Berryman for reporting, and to Martin Pitt for providing a patch). * Add patch to switch to western european fonts (ISO8859-1/ISO8859-15) instead of the current eastern european (ISO8859-2). * Add --without-xpm option to configure when compiling -noxpm variant. Closes: bug#370572 (thanks to Omniflux ). * Indent Homepage string in long descriptions. * Add patch 1007 to avoid advertising external libraries in gdlib-config script (advertise them in new --static-libs instead). Closes: bug#375806 (thanks to Samuel Thibault ). -- Jonas Smedegaard Mon, 17 Jul 2006 02:15:53 +0200 libgd2 (2.0.33-4) unstable; urgency=low * Have libgd-noxpm-dev provide libgd2-dev (a virtual package since woody). libgd-xpm-dev does not provide it, as the two packages does not provide same shlibdeps info: Both provide same ABI but not same package dependencies, so those requiring XPM support will want to explicitly (build-)depend on that variant. Closes: bug#350704, #358306 (thanks to Daniel Schepler and Martin Michlmayr for reporting, and to Junichi Uekawa for patience and helpful input). * Use quilt (instead of CDBS builtin patch routines). * Use local cdbs snippet to enable debian-control (semi-)auto-update. * Update local cdbs snippet buildinfo.mk: + Correct namespace. * Update local cdbs snippet copyright-check.mk: + Correct namespace. + Treat all found files as non-binary. + Broaden scan to also look for "(c)" by default. + Make egrep options configurable. * Semi-auto-update debian/control (nothing remarkable). * Semi-auto-update debian/copyright_hints (nothing remarkable). * Renumber and unfuzz patches, and add debian/patches/README documenting the new numbering scheme. * Add patch 1003 fixing an antialiasing segfault. Closes: bug#364024 (thanks to Paul ). * Add patch 1004 improving antialiasing lines at image edges (thanks to Paul ). * Add patch 1005 to more sanely bail out on missing or wrong data, and include config.h also for tools and examples. This closes: bug#360966 (thanks to the Graphviz project were these was extracted from, and to Matthias Klose reporting it). -- Jonas Smedegaard Sun, 21 May 2006 09:51:07 +0200 libgd2 (2.0.33-3) unstable; urgency=low * Update debian/rules only if DEB_BUILD_OPTIONS contains "update". * Auto-update debian/rules (and manually strip bogus build-dependency on build-essential). * Upgrade watch file to version 3. * Standards version 3.6.2. * Mention homepage (not website) on long descriptions. * Add new local cdbs snippet copyright-check.mk. * Update debian/copyright with differing (but still DFSG-free) licensing of gd_gif_out.c (thanks to copyright-check.mk). * Update TODO with a bunch of entries to the "packaging hall of shame" (list of packages without -noxpm support). * Add patch to not treat negative return values from buffer routines as ok. Closes: bug#308981, #312500 (both thanks to Jim Meyering ). * Dropped old transitional packages libgd2 and libgd2-dev. Closes: bug#322044 (thanks to Javier Fernández-Sanguino Peña ). -- Jonas Smedegaard Thu, 8 Dec 2005 02:29:44 +0100 libgd2 (2.0.33-2) unstable; urgency=low * Acknowledge NMU. Closes: bug#278625, #283991 (thanks to Martin Pitt , Steve Kemp and others). * Revert order of dependencies for transitional packages to favor -xpm over -noxpm, and thus avoid surprises when upgrading from woody. Closes: bug#291783 (thanks to Don Armstrong ). * Rerun "libtoolize -c -f; aclocal-1.9; autoconf" with newer autotools. * Use cdbs (except debhelper snippet: too big change for now). * Define version strings "simply expanded" (small compile speedup). -- Jonas Smedegaard Thu, 21 Apr 2005 16:10:34 +0200 libgd2 (2.0.33-1.1) unstable; urgency=high * Non-maintainer upload with permission from Jonas * Apply patch to close security hole CAN-2004-0941 -- Steve Kemp Thur, 3 Dec 2004 19:09:54 +0000 libgd2 (2.0.33-1) unstable; urgency=low * New upstream release. + Improved font handling. Closes: Bug#281349 (thanks to Alexander Schories ). * Improve build rules to support kfreebsd-gnu. Closes: Bug#268280 (thanks to Robert Millan ), and probably also bug#276441 (but leaving open until confirmed). + Patch autoconf.ac to work around broken detection of pthreads. + Run "libtoolize -c -f; aclocal-1.9; autoconf" once. + Include the above patch with source, for use with newer upstream releases. + Update config.guess and config.sub at build time. + Build-depend on autotools-dev for the above. + Update config.rpath from http://savannah.gnu.org/projects/gnulib (grabbed from CVS). * Build -noxpm variant without fontconfig support as well (and add TODO note about possibly renaming to -nobloat in the future). * Mention fontconfig support (or lack thereof) to long descriptions. Closes: bug#280369 (thanks to Josip Rodin and Julian Mehnle ). * Drop obsolete and unused debian/rocks file. * Update TODO: rrdtool now properly acknowledges -noxpm (at last!). -- Jonas Smedegaard Sun, 7 Nov 2004 14:08:29 +0100 libgd2 (2.0.30-1) unstable; urgency=high * New upstream release: + Security fix: potential buffer overflow (CAN-2004-0990). Closes: bug#278625 (thanks to Martin Pitt ). * Tightened d-devlibdeps build-dependency (local hack is adopted now). * New fontconfig support enabled. * Include "hall of shame" to TODO. * Set urgency=high as this closes a security-related bug in sarge. -- Jonas Smedegaard Sat, 30 Oct 2004 22:22:10 +0200 libgd2 (2.0.28-3) unstable; urgency=high * Acknowledge NMU (thanks to Simon Richter for noticing and Steve Langasek for providing the fix). The bugreport contains other less urgent parts not fixed by this package, so will be split/closed manually. * Temporarily use local hacked d-devlibdeps that correctly (more or less, but at least better than before) resolve the recent X11 package split (bugreport filed against devlibs). * Clean out test gif's on clean target (in addition to png's). * Keep urgency=high for the RC bugfix to reach sarge, and because all the changes affects no binaries, only packaging hints. -- Jonas Smedegaard Mon, 13 Sep 2004 18:29:45 +0200 libgd2 (2.0.28-2.1) unstable; urgency=high * Non-maintainer upload. * High-urgency upload for sarge-targetted RC fix. * Add build-dependency on libxt-dev to ensure that libgd2-xpm really does support XPMs (closes: #270655). -- Steve Langasek Wed, 22 Sep 2004 04:32:23 -0700 libgd2 (2.0.28-2) unstable; urgency=low * Build-depend on libx11-dev (in addition to libxpm-dev) to actually include XPM support in the -xpm packages (broken on all but powerpc since 2.0.23-1), and configure explicitly using --with-xpm to hopfully fail less silently in the future. Thanks to Matt Zimmerman for spotting the bug. -- Jonas Smedegaard Wed, 28 Jul 2004 11:17:10 +0200 libgd2 (2.0.28-1) unstable; urgency=low * New upstream release. Closes:Bug#260793 (thanks to Adam Conrad ). * Drop TODO about dropping noxpm packages: Even with the new fine- grained packaging of X11 libraries XPM support still pulls in several megabytes irrelevant for most web server applications (the most popular usage of GD). * Minor corrections to gdlib-config man page. -- Jonas Smedegaard Thu, 22 Jul 2004 14:18:45 +0200 libgd2 (2.0.27-1) unstable; urgency=low * New upstream release. Closes: Bug# 254569 (except request for LZW support - I rely on the good judgement of upstream. Thanks anyway to Domenico Andreoli for the suggestion). * Cleaned up debian/copyright: + Replace info contained in changelog with note on "GNU systems". + Declare each topic more strictly. + Mention "licensing info" together with copyright. * Improved long descriptions: + General introduction to GD in all (non-transitional) packages + Website URL added -- Jonas Smedegaard Sat, 17 Jul 2004 15:03:27 +0200 libgd2 (2.0.23-2) unstable; urgency=low * Rebuild to override secret NMU (HEY!!! when did we change rules to not need to warn before doing an NMU?!?). Still closes: Bug#243500, #238890. -- Jonas Smedegaard Thu, 22 Apr 2004 00:36:44 +0200 libgd2 (2.0.23-1) unstable; urgency=low * New upstream release. Closes: Bug#243500 (thanks to Jan-Åke Larsson ). * Acknowledge NMU. Closes: Bug#238890 (thanks to Domenico Andreoli ). * Build-depend on libxpm-dev, with only a fallback to older xlibs-dev. * Use (and build-depend on) dh_buildinfo. * Add debian/TODO to source package, with notes on noxpm branch and interest in switching to cdbs (bzzzt, this changelog entry should *not* count in the "taking over the world" statistics of cdbs ;-) ). -- Jonas Smedegaard Wed, 21 Apr 2004 23:36:28 +0200 libgd2 (2.0.22-0.1) unstable; urgency=low * New upstream release. Closes: Bug#238890. * This is a NMU. -- Domenico Andreoli Fri, 19 Mar 2004 18:09:11 +0100 libgd2 (2.0.20-1) unstable; urgency=low * New upstream release. Closes: Bug#226179. -- Jonas Smedegaard Fri, 9 Jan 2004 03:58:46 +0100 libgd2 (2.0.16-1) unstable; urgency=low * New upstream release. * FreeType headers are now properly handled. Closes: Bug#224789. * Bump up (and correct syntax of) standards-version to 3.6.1 (no changes needed). Closes: Bug#210415. -- Jonas Smedegaard Thu, 25 Dec 2003 00:35:51 +0100 libgd2 (2.0.15-1) unstable; urgency=low * New upstream release. * Standards version 3.6 (no changes needed). -- Jonas Smedegaard Tue, 22 Jul 2003 11:54:41 +0200 libgd2 (2.0.12-2) unstable; urgency=low * Have development packages conflict with libgd-gif1-dev. This relates to Bug#191039 (thanks to Martin Schulze ). * This package complies with Debian Policy 3.5.10. -- Jonas Smedegaard Fri, 16 May 2003 17:56:22 +0200 libgd2 (2.0.12-1) unstable; urgency=low * New upstream release. * Correct paths to shared libraries for generating -dev dependencies. * Switch debhelper hint from DH_COMPAT to debian/compat. * Claim compliance with Policy 3.5.9 (no changes needed). * Change section devel to libdevel. * Run configure using --disable-rpath (although it is still ignored). -- Jonas Smedegaard Sun, 13 Apr 2003 22:39:43 +0200 libgd2 (2.0.11-3) unstable; urgency=low * Update doc_cleaner.pl to make html file completely weblint-clean (required for woody, so closes: Bug#185492). -- Jonas Smedegaard Wed, 19 Mar 2003 23:38:54 +0100 libgd2 (2.0.11-2) unstable; urgency=low * Simplify debian/rules a bit: Remove the INSTALL* definitions that may have stripped the binaries (not sure if it is honoured by the automade Makefile, but better safe than sorry). -- Jonas Smedegaard Fri, 7 Mar 2003 01:29:49 +0100 libgd2 (2.0.11-1) unstable; urgency=low * New upstream release (closes: Bug#170353). * Adapt debian/rules to the new proper configure script. * Drop DBS and use plain debhelper instead. Adapt build-depends. * Use homebrewn debian/doc_cleaner.pl to clean the html doc instead of a patch (more sustainable if upstream chooses to not fix the horrible html with next release). * Mention new binary annotate in libgd-tools.1 manpage and add a symlink. * Remove obsolete dh_undocumented from debian/rules. * Add a minimal manpage for the new helper script gdlib-config. -- Jonas Smedegaard Sun, 16 Feb 2003 02:00:42 +0100 libgd2 (2.0.4-11) unstable; urgency=low * Relax dependency for transitional packages of their real counterparts. -- Jonas Smedegaard Mon, 16 Dec 2002 02:02:35 +0100 libgd2 (2.0.4-10) unstable; urgency=low * Use d-shlibdeps package again, and build-depend on corrected versions of the package. * Declare compliance with Policy version 3.5.8.0 (no changed needed). * Remove full stop in description to please lintian. -- Jonas Smedegaard Mon, 16 Dec 2002 01:50:10 +0100 libgd2 (2.0.4-9) unstable; urgency=medium * The "Will we ever make it in time...?" release. * Use a local hacked d-devlibdeps (to properly handle libXpm dependency), and remove build-depend on d-shlibs. * Use html2text instead of w3m (as w3m doesn't build on all platforms). Thanks to Adam Conrad for pointing it out. Hack the html to be weblint-clean for html2text to accept it. * Set urgency=medium - same argument as below. -- Jonas Smedegaard Sun, 24 Nov 2002 21:01:27 +0100 libgd2 (2.0.4-8) unstable; urgency=high * Have libgd2-(no)xpm replace libgd2 older than 2.0.4-2 (when it became a transitional package, instead of a virtual on (which is ignored by Replaces:), and instead of the old plain package). * Set urgency=high, as only change is with this extra hint, and we really want this in testing soon - even with the current (unreported) bug it does more good than harm to let it in. -- Jonas Smedegaard Thu, 21 Nov 2002 06:36:41 +0100 libgd2 (2.0.4-7) unstable; urgency=low * Conflict with old virtual libgd2(-dev) packages (closes: Bug#16881). -- Jonas Smedegaard Wed, 13 Nov 2002 00:16:26 +0100 libgd2 (2.0.4-6) unstable; urgency=low * Preload libgd.so when running tests. Allows building without libgd2 already installed, and closes: Bug#167976. -- Jonas Smedegaard Wed, 6 Nov 2002 06:03:09 +0100 libgd2 (2.0.4-5) unstable; urgency=low * Have -dev packages conflict on libgd-(no)xpm-dev. * Have only transitional packages provide and conflict libgd1g, libgd1-altdev and old -tools packages. * Change build-depends to only the virtual libz-dev and libpng12-dev (not their real counterparts as well). * Add watch file. -- Jonas Smedegaard Wed, 6 Nov 2002 05:25:56 +0100 libgd2 (2.0.4-4) unstable; urgency=low * Use (and build-depend on) d-shlibs to make proper depends for -dev packages. * Tidy debian/ by generating debhelper files in configure target and remove it on clean. -- Jonas Smedegaard Mon, 4 Nov 2002 19:00:36 +0100 libgd2 (2.0.4-3) unstable; urgency=low * Correct dependencies for transitional packages. -- Jonas Smedegaard Mon, 4 Nov 2002 17:33:31 +0100 libgd2 (2.0.4-2) unstable; urgency=low * Provide transitional packages (a virtual package cannot satisfy a versioned dependency). * Tighten libgd2-xpm-dev to only same lib (noxpm binaries work well with xpm lib, but not the other way around). * Generate shlibs files without debhelper (to correctly do the above). * Simplify dh_shlibdeps invocation (it is really only used for libgd-tools anyway) and avoid using -L flag (to allow rebuild on woody with debhelper << 4.1.1 where the flag first appeared). * Enable tests (gddemo and gdtest). * Include test images as examples in -dev packages. * Remove TODO.Debian (the item - warnings possibly caused by signedness problems - have been dealt with upstream). -- Jonas Smedegaard Mon, 4 Nov 2002 15:30:29 +0100 libgd2 (2.0.4-1) unstable; urgency=low * New upstream release. * Update gdft patch 02add_gdImageStringFTEx. * Update configure patch 01makefile_generic_install. * Make sure not to compile libgd.a with -fPIC. * Corrections to debian/rules to adapt to new configure. -- Jonas Smedegaard Mon, 28 Oct 2002 02:40:39 +0100 libgd2 (2.0.2-2) unstable; urgency=low * Add unofficial function gdImageStringFTEx to not break binary compatibility with 2.0.1 (thanks to Nils Rennebarth for complaining and providing the patch. * Fix building without libgd2-dev already installed. * Fix linking libgd-tools against libgd2-noxpm (not static built). * Suggest noxpm in favor of xpm for packages built against noxpm. * Build-depend on new libpng12-0-dev and on zlib1g-dev, with fallback to their virtual packages. -- Jonas Smedegaard Sat, 26 Oct 2002 10:32:56 +0200 libgd2 (2.0.2-1) unstable; urgency=low * New upstream version. + Antialiased freetype text output now works properly in both truecolor and non-truecolor contexts! + By default, alpha blending is now done within the library. Also, by default, alpha channel is not saved with PNG images. * Repackage using dbs (with no patches applied for now). * Readme only html now, so build a text version (and build-depend on w3m). * Update debian/copyright (years added, and contact address changed). * Correct libgd-tools dependency on libgd2-(no)xpm. * Build and run tests. -- Jonas Smedegaard Tue, 22 Oct 2002 01:46:22 +0200 libgd2 (2.0.1-19) unstable; urgency=low * Conflict with libgd2 (and closes: #158639, #157920). -- Jonas Smedegaard Thu, 29 Aug 2002 03:50:26 +0200 libgd2 (2.0.1-18) unstable; urgency=low * Build against libpng3 (thanks to Junichi Uekawa for cleaning up the mess finally!). -- Jonas Smedegaard Sun, 18 Aug 2002 18:30:28 +0200 libgd2 (2.0.1-17) unstable; urgency=low * Install libgd-tools.1 (closes: #130499). -- Jonas Smedegaard Sun, 11 Aug 2002 02:41:02 +0200 libgd2 (2.0.1-16) unstable; urgency=low * Correct shlibs dependency on libgd2-xpm (not the virtual libgd2). Thanks to Chris Halls for spotting the error, which closes: #155498. -- Jonas Smedegaard Mon, 5 Aug 2002 16:58:06 +0200 libgd2 (2.0.1-15) unstable; urgency=low * Patch gdft.c for truecolor antialiasing. Patch found at http://www.coupin.net/gd-freetype/ thanks to Michael Ganss , and closes: #154112. -- Jonas Smedegaard Mon, 29 Jul 2002 04:04:52 +0200 libgd2 (2.0.1-14) unstable; urgency=low * Correct bug related to color resolving, thanks to Egon Eckert . -- Jonas Smedegaard Sun, 28 Jul 2002 10:28:30 +0200 libgd2 (2.0.1-13) unstable; urgency=low * libgd2-xpm-dev should depend on libgd2-xpm, not libgd2. -- Jonas Smedegaard Sat, 13 Jul 2002 17:33:04 +0200 libgd2 (2.0.1-12) unstable; urgency=low * Include docs in all packages. -- Jonas Smedegaard Sat, 13 Jul 2002 17:21:20 +0200 libgd2 (2.0.1-11) unstable; urgency=low * The "No more potatoes" release. * Major rewrite of debian/* to use debhelper V4. * Remove libgd.a from libgd-tools. * Rename libgd2 to libgd2-xpm and use libgd2 as a virtual package. * Add new package libgd2-noxpm-dev and do the same rename as above with -dev. * Include all header files (some where left out) in -dev packages. * Tighten shlib dependency to at least this build to avoid the old mess... * Add all demos from libgd-tools as example source in -dev. Remove compiled demos from -tools. * Add debug and nostrip support to debian/rules. * Add contact address gd@boutell.com to debian/copyright. * Remove libgd-tools Conflicts on libgd2-noxpm - they should work fine together (none of the tools use xpm). * Move libgd-tools Conflicts and Replaces on older libgd-tools to libgd2-xpm and -noxpm to make lintian happier. Suggest -tools as well. * Include/improve comment about XPM for long descriptions. * Set sane access rights on whole source as part of clean target. * Write a manpage for the libgd-tools applications to please lintian (and the rest of the world). This closes: Bug#130499. -- Jonas Smedegaard Sat, 13 Jul 2002 16:20:27 +0200 libgd2 (2.0.1-10) unstable; urgency=low * Correct a typo (my fault!) whith the patch. This closes: bug#142946. -- Jonas Smedegaard Mon, 15 Apr 2002 11:22:32 +0200 libgd2 (2.0.1-9) unstable; urgency=low * Change ligd-tools priority from extra to optional. * Include patch from Stephen to handle antialiasing (let's hope we make it for Woody). -- Jonas Smedegaard Wed, 10 Apr 2002 12:48:11 +0200 libgd2 (2.0.1-8) unstable; urgency=low * Add both xpm and non-xpm to substvars files, thanks to Joey Hess. * Now that we are at it: Loosen up shlibs dependencies. -- Jonas Smedegaard Mon, 25 Mar 2002 22:46:10 +0100 libgd2 (2.0.1-7) unstable; urgency=low * Oops - now _really_ loosen up libpng2-dev dependency... -- Jonas Smedegaard Fri, 22 Feb 2002 04:43:53 +0100 libgd2 (2.0.1-6) unstable; urgency=low * Reflect changes in (NMU of) libpng3 and only Build-conflicts: the badly hinted one, to loosen up libpng2 dependency to all _real_ releases available (and possibly libpng3 if indeed it is/becomes as compatible as claimed!). * Change libgd-tools priority and libgd2-dev section to make Debian Installer happy. -- Jonas Smedegaard Fri, 22 Feb 2002 02:10:37 +0100 libgd2 (2.0.1-5) unstable; urgency=low * Build a -noxpm variant. -- Jonas Smedegaard Fri, 1 Feb 2002 02:49:59 +0100 libgd2 (2.0.1-4) unstable; urgency=low * Another workaround to the libpng{2,3} mess: build-depend on specific version to avoid illegal versioned build-conflict on (sometimes!) virtual package. This will probably cause problems on autobuilders as well (if they still see replacing libpng-dev with libpng2-dev as a downgrade), but should at least be legal. * Add readme.* to libgd2-dev. -- Jonas Smedegaard Sun, 20 Jan 2002 15:08:43 +0100 libgd2 (2.0.1-3) unstable; urgency=low * Put back conflicts/replaces on libgd-tools (<<2.0.0). They where needed after all (even though lintian complains). -- Jonas Smedegaard Sun, 13 Jan 2002 16:19:51 +0100 libgd2 (2.0.1-2) unstable; urgency=low * New maintainer (thanks, Ivo :-). Updating maintainer field. * Strip non-libgd2 part of changelog (go read the one from libgd package if interested in older changes). * Updating copyright file (Closes: #119288). * Cleanup old freetype2 (FreeType1) mess. * Use debhelper V3, tighten Build-Dependency on debhelper accordingly and remove postinst to have debhelper handle ldconfig correctly. * Build-Conflicts: libpng-dev (>= 1.2) (stuff like libgd-perl needs to know wether png2 or png3 is used - let's be conservative for a start). * Remove duplicate dependencies and strange conflicts/replaces (probably wrongly converted from those against libgd1g in libgd) in debian/control. -- Jonas Smedegaard Sun, 13 Jan 2002 15:50:02 +0100 libgd2 (2.0.1-1) unstable; urgency=low * Initial package, based upon libgd1. (Closes: #102179, #102494) -- Ivo Timmermans Sat, 18 Aug 2001 19:55:14 +0200 debian/control0000644000000000000000000001002212222240036010555 0ustar Source: libgd2 Section: graphics Priority: optional Maintainer: GD team Uploaders: Ondřej Surý , Sean Finney Build-Depends: autotools-dev, debhelper (>= 9), libpng-dev, libz-dev, libjpeg-dev, libfreetype6-dev, libxpm-dev, libx11-dev, libxt-dev, libfontconfig-dev, libvpx-dev, libtiff-dev, dh-autoreconf, html2text Vcs-Git: git://anonscm.debian.org/git/collab-maint/libgd Vcs-Browser: http://anonscm.debian.org/?p=collab-maint/libgd.git;a=summary Standards-Version: 3.9.3 Homepage: http://www.libgd.org/ Package: libgd-tools Architecture: any Depends: ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends} Suggests: libgd-dev Description: GD command line tools and example code GD is a graphics library. It allows your code to quickly draw images complete with lines, arcs, text, multiple colours, cut and paste from other images, flood fills, and write out the result as a PNG file. This is particularly useful in World Wide Web applications, where PNG is one of the formats accepted for inline images by most browsers. . This is some simple command line tools and example code that use the GD graphics library. Package: libgd-dev Architecture: any Multi-Arch: same Section: libdevel Depends: libgd3 (= ${binary:Version}), ${misc:Depends}, libpng-dev, libz-dev, libjpeg-dev, libfreetype6-dev, libxpm-dev, libx11-dev, libxt-dev, libfontconfig-dev, libvpx-dev, libtiff-dev Breaks: libgd2-xpm-dev (<< 2.1.0~), libgd2-noxpm-dev (<< 2.1.0~), libgd2-dev (<< 2.1.0~alpha1-2~) Replaces: libgd2-xpm-dev (<< 2.1.0~), libgd2-noxpm-dev (<< 2.1.0~), libgd2-dev (<< 2.1.0~alpha1-2~) Provides: libgd2-xpm-dev, libgd2-noxpm-dev, libgd2-dev Description: GD Graphics Library (development version) GD is a graphics library. It allows your code to quickly draw images complete with lines, arcs, text, multiple colours, cut and paste from other images, flood fills, and write out the result as a PNG file. This is particularly useful in World Wide Web applications, where PNG is one of the formats accepted for inline images by most browsers. . This is the full development version of the library. Package: libgd3 Architecture: any Multi-Arch: same Section: libs Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: libgd-tools Description: GD Graphics Library GD is a graphics library. It allows your code to quickly draw images complete with lines, arcs, text, multiple colours, cut and paste from other images, flood fills, and write out the result as a PNG file. This is particularly useful in World Wide Web applications, where PNG is one of the formats accepted for inline images by most browsers. . This is the runtime package of the library. Package: libgd-dbg Architecture: any Multi-Arch: same Section: debug Priority: extra Recommends: gdb Depends: ${misc:Depends}, libgd3 (= ${binary:Version}) | libgd-tools (= ${binary:Version}) Description: Debug symbols for GD Graphics Library GD is a graphics library. It allows your code to quickly draw images complete with lines, arcs, text, multiple colours, cut and paste from other images, flood fills, and write out the result as a PNG file. This is particularly useful in World Wide Web applications, where PNG is one of the formats accepted for inline images by most browsers. . These are the debug symbols for the library and tools. Package: libgd2-xpm-dev Architecture: all Section: oldlibs Priority: extra Depends: ${misc:Depends}, libgd-dev Multi-Arch: foreign Description: GD Graphics Library (transitional package) This is a dummy transition package that can be safely removed once no package depend on it. Package: libgd2-noxpm-dev Architecture: all Section: oldlibs Priority: extra Depends: ${misc:Depends}, libgd-dev Multi-Arch: foreign Description: GD Graphics Library (transitional package) This is a dummy transition package that can be safely removed once no package depend on it. debian/rules0000755000000000000000000000200212222240036010231 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DPKG_GENSYMBOLS_CHECK_LEVEL=4 export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed %: dh $@ --with autoreconf override_dh_auto_configure: dh_auto_configure -- --disable-rpath --with-tiff=/usr --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) override_dh_install: dh_install --fail-missing -Xlibgd.la override_dh_installdocs: dh_installdocs -plibgd2-xpm-dev -plibgd2-noxpm-dev --link-doc=libgd-dev dh_installdocs --remaining-packages override_dh_strip: dh_strip --dbg-package=libgd-dbg debian/patches/0000755000000000000000000000000012222240036010606 5ustar debian/patches/series0000644000000000000000000000012512222240036012021 0ustar gdlib-config-uses-pkgconfig.patch fix-compiled-in-version.patch subdir-objects.patch debian/patches/fix-compiled-in-version.patch0000644000000000000000000027342112222240036016307 0ustar --- libgd2.orig/configure.ac +++ libgd2/configure.ac @@ -6,12 +6,12 @@ AC_PREREQ(2.54) # Some m4 magic to have correct version number everywhere m4_define([gd_MAJOR],[2])dnl m4_define([gd_MINOR],[1])dnl -m4_define([gd_REVISION],[0])dnl -dnl m4_define([gd_EXTRA],[rc2]) +m4_define([gd_REVISION],[1])dnl +m4_define([gd_EXTRA],[dev])dnl -m4_ifdef([gd_EXTRA], - [m4_define([gd_PKG_VERSION],[gd_MAJOR.gd_MINOR.gd_REVISION-gd_EXTRA])], - [m4_define([gd_PKG_VERSION],[gd_MAJOR.gd_MINOR.gd_REVISION])] +m4_if(m4_len(gd_EXTRA), 0,dnl + [m4_define([gd_PKG_VERSION],[gd_MAJOR.gd_MINOR.gd_REVISION])],dnl + [m4_define([gd_PKG_VERSION],[gd_MAJOR.gd_MINOR.gd_REVISION-gd_EXTRA])]dnl )dnl AC_INIT([GD], gd_PKG_VERSION, [https://bitbucket.org/libgd/gd-libgd/issues], [libgd], [http://lib.gd]) @@ -25,10 +25,12 @@ GDLIB_MAJOR=gd_MAJOR GDLIB_MINOR=gd_MINOR GDLIB_REVISION=gd_REVISION GDLIB_EXTRA=gd_EXTRA +GDLIB_VERSION=gd_PKG_VERSION AC_SUBST(GDLIB_MAJOR) AC_SUBST(GDLIB_MINOR) AC_SUBST(GDLIB_REVISION) AC_SUBST(GDLIB_EXTRA) +AC_SUBST(GDLIB_VERSION) # Dynamic library version information # See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info @@ -455,6 +457,7 @@ AC_MSG_RESULT([ AC_CONFIG_FILES([Makefile src/Makefile + src/gd.h tests/Makefile tests/test_config.h config/Makefile --- libgd2.orig/src/gd.h +++ /dev/null @@ -1,1113 +0,0 @@ -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef GD_H -#define GD_H 1 - -#define GD_MAJOR_VERSION 2 -#define GD_MINOR_VERSION 1 -#define GD_RELEASE_VERSION 0 -#define GD_EXTRA_VERSION "alpha" -#define GD_VERSION_STRING "2.1.0-alpha" - -/* Do the DLL dance: dllexport when building the DLL, - dllimport when importing from it, nothing when - not on Silly Silly Windows (tm Aardman Productions). */ - -/* 2.0.20: for headers */ - -/* 2.0.24: __stdcall also needed for Visual BASIC - and other languages. This breaks ABI compatibility - with previous DLL revs, but it's necessary. */ - -/* 2.0.29: WIN32 programmers can declare the NONDLL macro if they - wish to build gd as a static library or by directly including - the gd sources in a project. */ - -/* http://gcc.gnu.org/wiki/Visibility */ -#if defined(_WIN32) || defined(CYGWIN) || defined(_WIN32_WCE) -# ifdef BGDWIN32 -# ifdef NONDLL -# define BGD_EXPORT_DATA_PROT -# else -# ifdef __GNUC__ -# define BGD_EXPORT_DATA_PROT __attribute__ ((dllexport)) -# else -# define BGD_EXPORT_DATA_PROT __declspec(dllexport) -# endif -# endif -# else -# ifdef __GNUC__ -# define BGD_EXPORT_DATA_PROT __attribute__ ((dllimport)) -# else -# define BGD_EXPORT_DATA_PROT __declspec(dllimport) -# endif -# endif -# define BGD_STDCALL __stdcall -# define BGD_EXPORT_DATA_IMPL -#else -# ifdef HAVE_VISIBILITY -# define BGD_EXPORT_DATA_PROT __attribute__ ((visibility ("default"))) -# define BGD_EXPORT_DATA_IMPL __attribute__ ((visibility ("hidden"))) -# else -# define BGD_EXPORT_DATA_PROT -# define BGD_EXPORT_DATA_IMPL -# endif -# define BGD_STDCALL -#endif - -#define BGD_DECLARE(rt) BGD_EXPORT_DATA_PROT rt BGD_STDCALL - -#ifdef __cplusplus - extern "C" - { -#endif - -/* gd.h: declarations file for the graphic-draw module. - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation. This software is provided "AS IS." Thomas Boutell and - * Boutell.Com, Inc. 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. */ - -/* stdio is needed for file I/O. */ -#include -#include -#include "gd_io.h" - -/* The maximum number of palette entries in palette-based images. - In the wonderful new world of gd 2.0, you can of course have - many more colors when using truecolor mode. */ - -#define gdMaxColors 256 - -/* Image type. See functions below; you will not need to change - the elements directly. Use the provided macros to - access sx, sy, the color table, and colorsTotal for - read-only purposes. */ - -/* If 'truecolor' is set true, the image is truecolor; - pixels are represented by integers, which - must be 32 bits wide or more. - - True colors are repsented as follows: - - ARGB - - Where 'A' (alpha channel) occupies only the - LOWER 7 BITS of the MSB. This very small - loss of alpha channel resolution allows gd 2.x - to keep backwards compatibility by allowing - signed integers to be used to represent colors, - and negative numbers to represent special cases, - just as in gd 1.x. */ - -#define gdAlphaMax 127 -#define gdAlphaOpaque 0 -#define gdAlphaTransparent 127 -#define gdRedMax 255 -#define gdGreenMax 255 -#define gdBlueMax 255 -#define gdTrueColorGetAlpha(c) (((c) & 0x7F000000) >> 24) -#define gdTrueColorGetRed(c) (((c) & 0xFF0000) >> 16) -#define gdTrueColorGetGreen(c) (((c) & 0x00FF00) >> 8) -#define gdTrueColorGetBlue(c) ((c) & 0x0000FF) -#define gdEffectReplace 0 -#define gdEffectAlphaBlend 1 -#define gdEffectNormal 2 -#define gdEffectOverlay 3 - -#define GD_TRUE 1 -#define GD_FALSE 0 - -#define GD_EPSILON 1e-6 -#ifndef M_PI -# define M_PI 3.14159265358979323846 -#endif - -/* This function accepts truecolor pixel values only. The - source color is composited with the destination color - based on the alpha channel value of the source color. - The resulting color is opaque. */ - -BGD_DECLARE(int) gdAlphaBlend (int dest, int src); - -enum gdPaletteQuantizationMethod { - GD_QUANT_DEFAULT = 0, - GD_QUANT_JQUANT = 1, /* libjpeg's old median cut. Fast, but only uses 16-bit color. */ - GD_QUANT_NEUQUANT = 2, /* neuquant - approximation using kohonen neural network. */ - GD_QUANT_LIQ = 3 /* combination of algorithms used in libimagequant/pngquant2 aiming for highest quality at cost of speed */ -}; - -/** - * Group: Transform - * - * Constants: gdInterpolationMethod - - * GD_BELL - Bell - * GD_BESSEL - Bessel - * GD_BILINEAR_FIXED - fixed point bilinear - * GD_BICUBIC - Bicubic - * GD_BICUBIC_FIXED - fixed point bicubic integer - * GD_BLACKMAN - Blackman - * GD_BOX - Box - * GD_BSPLINE - BSpline - * GD_CATMULLROM - Catmullrom - * GD_GAUSSIAN - Gaussian - * GD_GENERALIZED_CUBIC - Generalized cubic - * GD_HERMITE - Hermite - * GD_HAMMING - Hamming - * GD_HANNING - Hannig - * GD_MITCHELL - Mitchell - * GD_NEAREST_NEIGHBOUR - Nearest neighbour interpolation - * GD_POWER - Power - * GD_QUADRATIC - Quadratic - * GD_SINC - Sinc - * GD_TRIANGLE - Triangle - * GD_WEIGHTED4 - 4 pixels weighted bilinear interpolation - * - * See also: - * - **/ -typedef enum { - GD_DEFAULT = 0, - GD_BELL, - GD_BESSEL, - GD_BILINEAR_FIXED, - GD_BICUBIC, - GD_BICUBIC_FIXED, - GD_BLACKMAN, - GD_BOX, - GD_BSPLINE, - GD_CATMULLROM, - GD_GAUSSIAN, - GD_GENERALIZED_CUBIC, - GD_HERMITE, - GD_HAMMING, - GD_HANNING, - GD_MITCHELL, - GD_NEAREST_NEIGHBOUR, - GD_POWER, - GD_QUADRATIC, - GD_SINC, - GD_TRIANGLE, - GD_WEIGHTED4, - GD_METHOD_COUNT = 21 -} gdInterpolationMethod; - -/* define struct with name and func ptr and add it to gdImageStruct gdInterpolationMethod interpolation; */ - -/* Interpolation function ptr */ -typedef double (* interpolation_method )(double); - -typedef struct gdImageStruct { - /* Palette-based image pixels */ - unsigned char **pixels; - int sx; - int sy; - /* These are valid in palette images only. See also - 'alpha', which appears later in the structure to - preserve binary backwards compatibility */ - int colorsTotal; - int red[gdMaxColors]; - int green[gdMaxColors]; - int blue[gdMaxColors]; - int open[gdMaxColors]; - /* For backwards compatibility, this is set to the - first palette entry with 100% transparency, - and is also set and reset by the - gdImageColorTransparent function. Newer - applications can allocate palette entries - with any desired level of transparency; however, - bear in mind that many viewers, notably - many web browsers, fail to implement - full alpha channel for PNG and provide - support for full opacity or transparency only. */ - int transparent; - int *polyInts; - int polyAllocated; - struct gdImageStruct *brush; - struct gdImageStruct *tile; - int brushColorMap[gdMaxColors]; - int tileColorMap[gdMaxColors]; - int styleLength; - int stylePos; - int *style; - int interlace; - /* New in 2.0: thickness of line. Initialized to 1. */ - int thick; - /* New in 2.0: alpha channel for palettes. Note that only - Macintosh Internet Explorer and (possibly) Netscape 6 - really support multiple levels of transparency in - palettes, to my knowledge, as of 2/15/01. Most - common browsers will display 100% opaque and - 100% transparent correctly, and do something - unpredictable and/or undesirable for levels - in between. TBB */ - int alpha[gdMaxColors]; - /* Truecolor flag and pixels. New 2.0 fields appear here at the - end to minimize breakage of existing object code. */ - int trueColor; - int **tpixels; - /* Should alpha channel be copied, or applied, each time a - pixel is drawn? This applies to truecolor images only. - No attempt is made to alpha-blend in palette images, - even if semitransparent palette entries exist. - To do that, build your image as a truecolor image, - then quantize down to 8 bits. */ - int alphaBlendingFlag; - /* Should the alpha channel of the image be saved? This affects - PNG at the moment; other future formats may also - have that capability. JPEG doesn't. */ - int saveAlphaFlag; - - /* There should NEVER BE ACCESSOR MACROS FOR ITEMS BELOW HERE, so this - part of the structure can be safely changed in new releases. */ - - /* 2.0.12: anti-aliased globals. 2.0.26: just a few vestiges after - switching to the fast, memory-cheap implementation from PHP-gd. */ - int AA; - int AA_color; - int AA_dont_blend; - - /* 2.0.12: simple clipping rectangle. These values - must be checked for safety when set; please use - gdImageSetClip */ - int cx1; - int cy1; - int cx2; - int cy2; - - /* 2.1.0: allows to specify resolution in dpi */ - unsigned int res_x; - unsigned int res_y; - - /* Selects quantization method, see gdImageTrueColorToPaletteSetMethod() and gdPaletteQuantizationMethod enum. */ - int paletteQuantizationMethod; - /* speed/quality trade-off. 1 = best quality, 10 = best speed. 0 = method-specific default. - Applicable to GD_QUANT_LIQ and GD_QUANT_NEUQUANT. */ - int paletteQuantizationSpeed; - /* Image will remain true-color if conversion to palette cannot achieve given quality. - Value from 1 to 100, 1 = ugly, 100 = perfect. Applicable to GD_QUANT_LIQ.*/ - int paletteQuantizationMinQuality; - /* Image will use minimum number of palette colors needed to achieve given quality. Must be higher than paletteQuantizationMinQuality - Value from 1 to 100, 1 = ugly, 100 = perfect. Applicable to GD_QUANT_LIQ.*/ - int paletteQuantizationMaxQuality; - gdInterpolationMethod interpolation_id; - interpolation_method interpolation; -} -gdImage; - -typedef gdImage *gdImagePtr; - - -/* Point type for use in polygon drawing. */ - -/** - * Group: Types - * - * typedef: gdPointF - * Defines a point in a 2D coordinate system using floating point - * values. - * x - Floating point position (increase from left to right) - * y - Floating point Row position (increase from top to bottom) - * - * typedef: gdPointFPtr - * Pointer to a - * - * See also: - * , , - **/ -typedef struct -{ - double x, y; -} -gdPointF, *gdPointFPtr; - -typedef struct { - /* # of characters in font */ - int nchars; - /* First character is numbered... (usually 32 = space) */ - int offset; - /* Character width and height */ - int w; - int h; - /* Font data; array of characters, one row after another. - Easily included in code, also easily loaded from - data files. */ - char *data; -} -gdFont; - -/* Text functions take these. */ -typedef gdFont *gdFontPtr; - -typedef void(*gdErrorMethod)(int, const char *, va_list); - -BGD_DECLARE(void) gdSetErrorMethod(gdErrorMethod); -BGD_DECLARE(void) gdClearErrorMethod(void); - -/* For backwards compatibility only. Use gdImageSetStyle() - for MUCH more flexible line drawing. Also see - gdImageSetBrush(). */ -#define gdDashSize 4 - -/* Special colors. */ - -#define gdStyled (-2) -#define gdBrushed (-3) -#define gdStyledBrushed (-4) -#define gdTiled (-5) - -/* NOT the same as the transparent color index. - This is used in line styles only. */ -#define gdTransparent (-6) - -#define gdAntiAliased (-7) - -/* Functions to manipulate images. */ - -/* Creates a palette-based image (up to 256 colors). */ -BGD_DECLARE(gdImagePtr) gdImageCreate (int sx, int sy); - -/* An alternate name for the above (2.0). */ -#define gdImageCreatePalette gdImageCreate - -/* Creates a truecolor image (millions of colors). */ -BGD_DECLARE(gdImagePtr) gdImageCreateTrueColor (int sx, int sy); - -/* Creates an image from various file types. These functions - return a palette or truecolor image based on the - nature of the file being loaded. Truecolor PNG - stays truecolor; palette PNG stays palette-based; - JPEG is always truecolor. */ -BGD_DECLARE(gdImagePtr) gdImageCreateFromPng (FILE * fd); -BGD_DECLARE(gdImagePtr) gdImageCreateFromPngCtx (gdIOCtxPtr in); -BGD_DECLARE(gdImagePtr) gdImageCreateFromPngPtr (int size, void *data); - -/* These read the first frame only */ -BGD_DECLARE(gdImagePtr) gdImageCreateFromGif (FILE * fd); -BGD_DECLARE(gdImagePtr) gdImageCreateFromGifCtx (gdIOCtxPtr in); -BGD_DECLARE(gdImagePtr) gdImageCreateFromGifPtr (int size, void *data); -BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMP (FILE * inFile); -BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMPCtx (gdIOCtx * infile); -BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMPPtr (int size, void *data); -BGD_DECLARE(gdImagePtr) gdImageCreateFromJpeg (FILE * infile); -BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegEx (FILE * infile, int ignore_warning); -BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegCtx (gdIOCtx * infile); -BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegCtxEx (gdIOCtx * infile, int ignore_warning); -BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegPtr (int size, void *data); -BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegPtrEx (int size, void *data, int ignore_warning); -BGD_DECLARE(gdImagePtr) gdImageCreateFromWebp (FILE * inFile); -BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpPtr (int size, void *data); -BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpCtx (gdIOCtx * infile); - -BGD_DECLARE(gdImagePtr) gdImageCreateFromTiff(FILE *inFile); -BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffCtx(gdIOCtx *infile); -BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffPtr(int size, void *data); - -BGD_DECLARE(gdImagePtr) gdImageCreateFromTga( FILE * fp ); -BGD_DECLARE(gdImagePtr) gdImageCreateFromTgaCtx(gdIOCtx* ctx); -BGD_DECLARE(gdImagePtr) gdImageCreateFromTgaPtr(int size, void *data); - -BGD_DECLARE(gdImagePtr) gdImageCreateFromBmp (FILE * inFile); -BGD_DECLARE(gdImagePtr) gdImageCreateFromBmpPtr (int size, void *data); -BGD_DECLARE(gdImagePtr) gdImageCreateFromBmpCtx (gdIOCtxPtr infile); - -/* A custom data source. */ -/* The source function must return -1 on error, otherwise the number - of bytes fetched. 0 is EOF, not an error! */ -/* context will be passed to your source function. */ - -typedef struct { - int (*source) (void *context, char *buffer, int len); - void *context; -} -gdSource, *gdSourcePtr; - -/* Deprecated in favor of gdImageCreateFromPngCtx */ -BGD_DECLARE(gdImagePtr) gdImageCreateFromPngSource (gdSourcePtr in); - -BGD_DECLARE(gdImagePtr) gdImageCreateFromGd (FILE * in); -BGD_DECLARE(gdImagePtr) gdImageCreateFromGdCtx (gdIOCtxPtr in); -BGD_DECLARE(gdImagePtr) gdImageCreateFromGdPtr (int size, void *data); - -BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2 (FILE * in); -BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ctx (gdIOCtxPtr in); -BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ptr (int size, void *data); - -BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Part (FILE * in, int srcx, int srcy, int w, - int h); -BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartCtx (gdIOCtxPtr in, int srcx, int srcy, - int w, int h); -BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy, - int w, int h); -/* 2.0.10: prototype was missing */ -BGD_DECLARE(gdImagePtr) gdImageCreateFromXbm (FILE * in); -BGD_DECLARE(void) gdImageXbmCtx(gdImagePtr image, char* file_name, int fg, gdIOCtx * out); - -/* NOTE: filename, not FILE */ -BGD_DECLARE(gdImagePtr) gdImageCreateFromXpm (char *filename); - -BGD_DECLARE(void) gdImageDestroy (gdImagePtr im); - -/* Replaces or blends with the background depending on the - most recent call to gdImageAlphaBlending and the - alpha channel value of 'color'; default is to overwrite. - Tiling and line styling are also implemented - here. All other gd drawing functions pass through this call, - allowing for many useful effects. */ - -BGD_DECLARE(void) gdImageSetPixel (gdImagePtr im, int x, int y, int color); -/* FreeType 2 text output with hook to extra flags */ - -BGD_DECLARE(int) gdImageGetPixel (gdImagePtr im, int x, int y); -BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y); - -BGD_DECLARE(void) gdImageAABlend (gdImagePtr im); - -BGD_DECLARE(void) gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color); - -/* For backwards compatibility only. Use gdImageSetStyle() - for much more flexible line drawing. */ -BGD_DECLARE(void) gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, - int color); -/* Corners specified (not width and height). Upper left first, lower right - second. */ -BGD_DECLARE(void) gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, - int color); -/* Solid bar. Upper left corner first, lower right corner second. */ -BGD_DECLARE(void) gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, - int color); -BGD_DECLARE(void) gdImageSetClip(gdImagePtr im, int x1, int y1, int x2, int y2); -BGD_DECLARE(void) gdImageGetClip(gdImagePtr im, int *x1P, int *y1P, int *x2P, int *y2P); -BGD_DECLARE(void) gdImageSetResolution(gdImagePtr im, const unsigned int res_x, const unsigned int res_y); -BGD_DECLARE(int) gdImageBoundsSafe (gdImagePtr im, int x, int y); -BGD_DECLARE(void) gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c, - int color); -BGD_DECLARE(void) gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c, - int color); -BGD_DECLARE(void) gdImageString (gdImagePtr im, gdFontPtr f, int x, int y, - unsigned char *s, int color); -BGD_DECLARE(void) gdImageStringUp (gdImagePtr im, gdFontPtr f, int x, int y, - unsigned char *s, int color); -BGD_DECLARE(void) gdImageString16 (gdImagePtr im, gdFontPtr f, int x, int y, - unsigned short *s, int color); -BGD_DECLARE(void) gdImageStringUp16 (gdImagePtr im, gdFontPtr f, int x, int y, - unsigned short *s, int color); - -/* 2.0.16: for thread-safe use of gdImageStringFT and friends, - call this before allowing any thread to call gdImageStringFT. - Otherwise it is invoked by the first thread to invoke - gdImageStringFT, with a very small but real risk of a race condition. - Return 0 on success, nonzero on failure to initialize freetype. */ -BGD_DECLARE(int) gdFontCacheSetup (void); - -/* Optional: clean up after application is done using fonts in - gdImageStringFT(). */ -BGD_DECLARE(void) gdFontCacheShutdown (void); -/* 2.0.20: for backwards compatibility. A few applications did start calling - this function when it first appeared although it was never documented. - Simply invokes gdFontCacheShutdown. */ -BGD_DECLARE(void) gdFreeFontCache (void); - -/* Calls gdImageStringFT. Provided for backwards compatibility only. */ -BGD_DECLARE(char *) gdImageStringTTF (gdImage * im, int *brect, int fg, char *fontlist, - double ptsize, double angle, int x, int y, - char *string); - -/* FreeType 2 text output */ -BGD_DECLARE(char *) gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist, - double ptsize, double angle, int x, int y, - char *string); - -/* 2.0.5: provides an extensible way to pass additional parameters. - Thanks to Wez Furlong, sorry for the delay. */ - -typedef struct { - int flags; /* Logical OR of gdFTEX_ values */ - double linespacing; /* fine tune line spacing for '\n' */ - int charmap; /* TBB: 2.0.12: may be gdFTEX_Unicode, - gdFTEX_Shift_JIS, gdFTEX_Big5, - or gdFTEX_Adobe_Custom; - when not specified, maps are searched - for in the above order. */ - int hdpi; /* if (flags & gdFTEX_RESOLUTION) */ - int vdpi; /* if (flags & gdFTEX_RESOLUTION) */ - char *xshow; /* if (flags & gdFTEX_XSHOW) - then, on return, xshow is a malloc'ed - string containing xshow position data for - the last string. - - NB. The caller is responsible for gdFree'ing - the xshow string. - */ - char *fontpath; /* if (flags & gdFTEX_RETURNFONTPATHNAME) - then, on return, fontpath is a malloc'ed - string containing the actual font file path name - used, which can be interesting when fontconfig - is in use. - - The caller is responsible for gdFree'ing the - fontpath string. - */ - -} -gdFTStringExtra, *gdFTStringExtraPtr; - -#define gdFTEX_LINESPACE 1 -#define gdFTEX_CHARMAP 2 -#define gdFTEX_RESOLUTION 4 -#define gdFTEX_DISABLE_KERNING 8 -#define gdFTEX_XSHOW 16 -/* The default unless gdFTUseFontConfig(1); has been called: - fontlist is a full or partial font file pathname or list thereof - (i.e. just like before 2.0.29) */ -#define gdFTEX_FONTPATHNAME 32 -/* Necessary to use fontconfig patterns instead of font pathnames - as the fontlist argument, unless gdFTUseFontConfig(1); has - been called. New in 2.0.29 */ -#define gdFTEX_FONTCONFIG 64 -/* Sometimes interesting when fontconfig is used: the fontpath - element of the structure above will contain a gdMalloc'd string - copy of the actual font file pathname used, if this flag is set - when the call is made */ -#define gdFTEX_RETURNFONTPATHNAME 128 - -/* If flag is nonzero, the fontlist parameter to gdImageStringFT - and gdImageStringFTEx shall be assumed to be a fontconfig font pattern - if fontconfig was compiled into gd. This function returns zero - if fontconfig is not available, nonzero otherwise. */ -BGD_DECLARE(int) gdFTUseFontConfig(int flag); - -/* These are NOT flags; set one in 'charmap' if you set the - gdFTEX_CHARMAP bit in 'flags'. */ -#define gdFTEX_Unicode 0 -#define gdFTEX_Shift_JIS 1 -#define gdFTEX_Big5 2 -#define gdFTEX_Adobe_Custom 3 - -BGD_DECLARE(char *) gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, - double ptsize, double angle, int x, int y, - char *string, gdFTStringExtraPtr strex); - -/* Point type for use in polygon drawing. */ -typedef struct { - int x, y; -} -gdPoint, *gdPointPtr; - -typedef struct { - int x, y; - int width, height; -} -gdRect, *gdRectPtr; - - -BGD_DECLARE(void) gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c); -BGD_DECLARE(void) gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c); -BGD_DECLARE(void) gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c); - -/* These functions still work with truecolor images, - for which they never return error. */ -BGD_DECLARE(int) gdImageColorAllocate (gdImagePtr im, int r, int g, int b); -/* gd 2.0: palette entries with non-opaque transparency are permitted. */ -BGD_DECLARE(int) gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b, int a); -/* Assumes opaque is the preferred alpha channel value */ -BGD_DECLARE(int) gdImageColorClosest (gdImagePtr im, int r, int g, int b); -/* Closest match taking all four parameters into account. - A slightly different color with the same transparency - beats the exact same color with radically different - transparency */ -BGD_DECLARE(int) gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a); -/* An alternate method */ -BGD_DECLARE(int) gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b); -/* Returns exact, 100% opaque matches only */ -BGD_DECLARE(int) gdImageColorExact (gdImagePtr im, int r, int g, int b); -/* Returns an exact match only, including alpha */ -BGD_DECLARE(int) gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a); -/* Opaque only */ -BGD_DECLARE(int) gdImageColorResolve (gdImagePtr im, int r, int g, int b); -/* Based on gdImageColorExactAlpha and gdImageColorClosestAlpha */ -BGD_DECLARE(int) gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a); - -/* A simpler way to obtain an opaque truecolor value for drawing on a - truecolor image. Not for use with palette images! */ - -#define gdTrueColor(r, g, b) (((r) << 16) + \ - ((g) << 8) + \ - (b)) - -/* Returns a truecolor value with an alpha channel component. - gdAlphaMax (127, **NOT 255**) is transparent, 0 is completely - opaque. */ - -#define gdTrueColorAlpha(r, g, b, a) (((a) << 24) + \ - ((r) << 16) + \ - ((g) << 8) + \ - (b)) - -BGD_DECLARE(void) gdImageColorDeallocate (gdImagePtr im, int color); - -/* Converts a truecolor image to a palette-based image, - using a high-quality two-pass quantization routine - which attempts to preserve alpha channel information - as well as R/G/B color information when creating - a palette. If ditherFlag is set, the image will be - dithered to approximate colors better, at the expense - of some obvious "speckling." colorsWanted can be - anything up to 256. If the original source image - includes photographic information or anything that - came out of a JPEG, 256 is strongly recommended. - - Better yet, don't use these function -- write real - truecolor PNGs and JPEGs. The disk space gain of - conversion to palette is not great (for small images - it can be negative) and the quality loss is ugly. - - DIFFERENCES: gdImageCreatePaletteFromTrueColor creates and - returns a new image. gdImageTrueColorToPalette modifies - an existing image, and the truecolor pixels are discarded. - - gdImageTrueColorToPalette() returns TRUE on success, FALSE on failure. -*/ - -BGD_DECLARE(gdImagePtr) gdImageCreatePaletteFromTrueColor (gdImagePtr im, int ditherFlag, - int colorsWanted); - -BGD_DECLARE(int) gdImageTrueColorToPalette (gdImagePtr im, int ditherFlag, - int colorsWanted); - -BGD_DECLARE(int) gdImagePaletteToTrueColor(gdImagePtr src); - -/* An attempt at getting the results of gdImageTrueColorToPalette to - * look a bit more like the original (im1 is the original and im2 is - * the palette version */ - -BGD_DECLARE(int) gdImageColorMatch(gdImagePtr im1, gdImagePtr im2); - -/* Selects quantization method used for subsequent gdImageTrueColorToPalette calls. - See gdPaletteQuantizationMethod enum (e.g. GD_QUANT_NEUQUANT, GD_QUANT_LIQ). - Speed is from 1 (highest quality) to 10 (fastest). - Speed 0 selects method-specific default (recommended). - - Returns FALSE if the given method is invalid or not available. -*/ -BGD_DECLARE(int) gdImageTrueColorToPaletteSetMethod (gdImagePtr im, int method, int speed); - -/* - Chooses quality range that subsequent call to gdImageTrueColorToPalette will aim for. - Min and max quality is in range 1-100 (1 = ugly, 100 = perfect). Max must be higher than min. - If palette cannot represent image with at least min_quality, then image will remain true-color. - If palette can represent image with quality better than max_quality, then lower number of colors will be used. - This function has effect only when GD_QUANT_LIQ method has been selected and the source image is true-color. -*/ -BGD_DECLARE(void) gdImageTrueColorToPaletteSetQuality (gdImagePtr im, int min_quality, int max_quality); - -/* Specifies a color index (if a palette image) or an - RGB color (if a truecolor image) which should be - considered 100% transparent. FOR TRUECOLOR IMAGES, - THIS IS IGNORED IF AN ALPHA CHANNEL IS BEING - SAVED. Use gdImageSaveAlpha(im, 0); to - turn off the saving of a full alpha channel in - a truecolor image. Note that gdImageColorTransparent - is usually compatible with older browsers that - do not understand full alpha channels well. TBB */ -BGD_DECLARE(void) gdImageColorTransparent (gdImagePtr im, int color); - -BGD_DECLARE(void) gdImagePaletteCopy (gdImagePtr dst, gdImagePtr src); - -typedef int (*gdCallbackImageColor)(gdImagePtr im, int src); - -BGD_DECLARE(int) gdImageColorReplace(gdImagePtr im, int src, int dst); -BGD_DECLARE(int) gdImageColorReplaceThreshold(gdImagePtr im, int src, int dst, float threshold); -BGD_DECLARE(int) gdImageColorReplaceArray(gdImagePtr im, int len, int *src, int *dst); -BGD_DECLARE(int) gdImageColorReplaceCallback(gdImagePtr im, gdCallbackImageColor callback); - -BGD_DECLARE(void) gdImageGif (gdImagePtr im, FILE * out); -BGD_DECLARE(void) gdImagePng (gdImagePtr im, FILE * out); -BGD_DECLARE(void) gdImagePngCtx (gdImagePtr im, gdIOCtx * out); -BGD_DECLARE(void) gdImageGifCtx (gdImagePtr im, gdIOCtx * out); -BGD_DECLARE(void) gdImageTiff(gdImagePtr im, FILE *outFile); -BGD_DECLARE(void *) gdImageTiffPtr(gdImagePtr im, int *size); -BGD_DECLARE(void) gdImageTiffCtx(gdImagePtr image, gdIOCtx *out); - -BGD_DECLARE(void *) gdImageBmpPtr(gdImagePtr im, int *size, int compression); -BGD_DECLARE(void) gdImageBmp(gdImagePtr im, FILE *outFile, int compression); -BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression); - -/* 2.0.12: Compression level: 0-9 or -1, where 0 is NO COMPRESSION at all, - 1 is FASTEST but produces larger files, 9 provides the best - compression (smallest files) but takes a long time to compress, and - -1 selects the default compiled into the zlib library. */ -BGD_DECLARE(void) gdImagePngEx (gdImagePtr im, FILE * out, int level); -BGD_DECLARE(void) gdImagePngCtxEx (gdImagePtr im, gdIOCtx * out, int level); - -BGD_DECLARE(void) gdImageWBMP (gdImagePtr image, int fg, FILE * out); -BGD_DECLARE(void) gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out); - -/* Guaranteed to correctly free memory returned by the gdImage*Ptr - functions */ -BGD_DECLARE(void) gdFree (void *m); - -/* Best to free this memory with gdFree(), not free() */ -BGD_DECLARE(void *) gdImageWBMPPtr (gdImagePtr im, int *size, int fg); - -/* 100 is highest quality (there is always a little loss with JPEG). - 0 is lowest. 10 is about the lowest useful setting. */ -BGD_DECLARE(void) gdImageJpeg (gdImagePtr im, FILE * out, int quality); -BGD_DECLARE(void) gdImageJpegCtx (gdImagePtr im, gdIOCtx * out, int quality); - -/* Best to free this memory with gdFree(), not free() */ -BGD_DECLARE(void *) gdImageJpegPtr (gdImagePtr im, int *size, int quality); - -BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization); -BGD_DECLARE(void) gdImageWebp (gdImagePtr im, FILE * outFile); -BGD_DECLARE(void *) gdImageWebpPtr (gdImagePtr im, int *size); -BGD_DECLARE(void *) gdImageWebpPtrEx (gdImagePtr im, int *size, int quantization); -BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization); - -/* Legal values for Disposal. gdDisposalNone is always used by - the built-in optimizer if previm is passed. */ - -enum { - gdDisposalUnknown, - gdDisposalNone, - gdDisposalRestoreBackground, - gdDisposalRestorePrevious -}; - -BGD_DECLARE(void) gdImageGifAnimBegin(gdImagePtr im, FILE *outFile, int GlobalCM, int Loops); -BGD_DECLARE(void) gdImageGifAnimAdd(gdImagePtr im, FILE *outFile, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm); -BGD_DECLARE(void) gdImageGifAnimEnd(FILE *outFile); -BGD_DECLARE(void) gdImageGifAnimBeginCtx(gdImagePtr im, gdIOCtx *out, int GlobalCM, int Loops); -BGD_DECLARE(void) gdImageGifAnimAddCtx(gdImagePtr im, gdIOCtx *out, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm); -BGD_DECLARE(void) gdImageGifAnimEndCtx(gdIOCtx *out); -BGD_DECLARE(void *) gdImageGifAnimBeginPtr(gdImagePtr im, int *size, int GlobalCM, int Loops); -BGD_DECLARE(void *) gdImageGifAnimAddPtr(gdImagePtr im, int *size, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm); -BGD_DECLARE(void *) gdImageGifAnimEndPtr(int *size); - -/* A custom data sink. For backwards compatibility. Use gdIOCtx - instead. The sink function must return -1 on error, otherwise the - number of bytes written, which must be equal to len. Context will - be passed to your sink function. -*/ -typedef struct { - int (*sink) (void *context, const char *buffer, int len); - void *context; -} -gdSink, *gdSinkPtr; - -BGD_DECLARE(void) gdImagePngToSink (gdImagePtr im, gdSinkPtr out); - -BGD_DECLARE(void) gdImageGd (gdImagePtr im, FILE * out); -BGD_DECLARE(void) gdImageGd2 (gdImagePtr im, FILE * out, int cs, int fmt); - -/* Best to free this memory with gdFree(), not free() */ -BGD_DECLARE(void *) gdImageGifPtr (gdImagePtr im, int *size); - -/* Best to free this memory with gdFree(), not free() */ -BGD_DECLARE(void *) gdImagePngPtr (gdImagePtr im, int *size); -BGD_DECLARE(void *) gdImagePngPtrEx (gdImagePtr im, int *size, int level); - -/* Best to free this memory with gdFree(), not free() */ -BGD_DECLARE(void *) gdImageGdPtr (gdImagePtr im, int *size); - -/* Best to free this memory with gdFree(), not free() */ -BGD_DECLARE(void *) gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size); - -/* Style is a bitwise OR ( | operator ) of these. - gdArc and gdChord are mutually exclusive; - gdChord just connects the starting and ending - angles with a straight line, while gdArc produces - a rounded edge. gdPie is a synonym for gdArc. - gdNoFill indicates that the arc or chord should be - outlined, not filled. gdEdged, used together with - gdNoFill, indicates that the beginning and ending - angles should be connected to the center; this is - a good way to outline (rather than fill) a - 'pie slice'. */ -#define gdArc 0 -#define gdPie gdArc -#define gdChord 1 -#define gdNoFill 2 -#define gdEdged 4 - -BGD_DECLARE(void) gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, - int e, int color, int style); -BGD_DECLARE(void) gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e, - int color); -BGD_DECLARE(void) gdImageEllipse(gdImagePtr im, int cx, int cy, int w, int h, int color); -BGD_DECLARE(void) gdImageFilledEllipse (gdImagePtr im, int cx, int cy, int w, int h, - int color); -BGD_DECLARE(void) gdImageFillToBorder (gdImagePtr im, int x, int y, int border, - int color); -BGD_DECLARE(void) gdImageFill (gdImagePtr im, int x, int y, int color); -BGD_DECLARE(void) gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, - int srcX, int srcY, int w, int h); -BGD_DECLARE(void) gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, - int srcX, int srcY, int w, int h, int pct); -BGD_DECLARE(void) gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX, - int dstY, int srcX, int srcY, int w, int h, - int pct); - -/* Stretches or shrinks to fit, as needed. Does NOT attempt - to average the entire set of source pixels that scale down onto the - destination pixel. */ -BGD_DECLARE(void) gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, - int srcX, int srcY, int dstW, int dstH, int srcW, - int srcH); - -/* gd 2.0: stretches or shrinks to fit, as needed. When called with a - truecolor destination image, this function averages the - entire set of source pixels that scale down onto the - destination pixel, taking into account what portion of the - destination pixel each source pixel represents. This is a - floating point operation, but this is not a performance issue - on modern hardware, except for some embedded devices. If the - destination is a palette image, gdImageCopyResized is - substituted automatically. */ -BGD_DECLARE(void) gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX, - int dstY, int srcX, int srcY, int dstW, int dstH, - int srcW, int srcH); - -/* gd 2.0.8: gdImageCopyRotated is added. Source - is a rectangle, with its upper left corner at - srcX and srcY. Destination is the *center* of - the rotated copy. Angle is in degrees, same as - gdImageArc. Floating point destination center - coordinates allow accurate rotation of - objects of odd-numbered width or height. */ -BGD_DECLARE(void) gdImageCopyRotated (gdImagePtr dst, - gdImagePtr src, - double dstX, double dstY, - int srcX, int srcY, - int srcWidth, int srcHeight, int angle); - -BGD_DECLARE(gdImagePtr) gdImageClone (gdImagePtr src); - -BGD_DECLARE(void) gdImageSetBrush (gdImagePtr im, gdImagePtr brush); -BGD_DECLARE(void) gdImageSetTile (gdImagePtr im, gdImagePtr tile); -BGD_DECLARE(void) gdImageSetAntiAliased (gdImagePtr im, int c); -BGD_DECLARE(void) gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont_blend); -BGD_DECLARE(void) gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels); -/* Line thickness (defaults to 1). Affects lines, ellipses, - rectangles, polygons and so forth. */ -BGD_DECLARE(void) gdImageSetThickness (gdImagePtr im, int thickness); -/* On or off (1 or 0) for all three of these. */ -BGD_DECLARE(void) gdImageInterlace (gdImagePtr im, int interlaceArg); -BGD_DECLARE(void) gdImageAlphaBlending (gdImagePtr im, int alphaBlendingArg); -BGD_DECLARE(void) gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg); - -BGD_DECLARE(gdImagePtr) gdImageNeuQuant(gdImagePtr im, const int max_color, int sample_factor); - -enum gdPixelateMode { - GD_PIXELATE_UPPERLEFT, - GD_PIXELATE_AVERAGE -}; - -BGD_DECLARE(int) gdImagePixelate(gdImagePtr im, int block_size, const unsigned int mode); - -typedef struct { - int sub; - int plus; - unsigned int num_colors; - int *colors; - unsigned int seed; -} gdScatter, *gdScatterPtr; - -BGD_DECLARE(int) gdImageScatter(gdImagePtr im, int sub, int plus); -BGD_DECLARE(int) gdImageScatterColor(gdImagePtr im, int sub, int plus, int colors[], unsigned int num_colors); -BGD_DECLARE(int) gdImageScatterEx(gdImagePtr im, gdScatterPtr s); -BGD_DECLARE(int) gdImageSmooth(gdImagePtr im, float weight); -BGD_DECLARE(int) gdImageMeanRemoval(gdImagePtr im); -BGD_DECLARE(int) gdImageEmboss(gdImagePtr im); -BGD_DECLARE(int) gdImageGaussianBlur(gdImagePtr im); -BGD_DECLARE(int) gdImageEdgeDetectQuick(gdImagePtr src); -BGD_DECLARE(int) gdImageSelectiveBlur( gdImagePtr src); -BGD_DECLARE(int) gdImageConvolution(gdImagePtr src, float filter[3][3], float filter_div, float offset); -BGD_DECLARE(int) gdImageColor(gdImagePtr src, const int red, const int green, const int blue, const int alpha); -BGD_DECLARE(int) gdImageContrast(gdImagePtr src, double contrast); -BGD_DECLARE(int) gdImageBrightness(gdImagePtr src, int brightness); -BGD_DECLARE(int) gdImageGrayScale(gdImagePtr src); -BGD_DECLARE(int) gdImageNegate(gdImagePtr src); - -/* Macros to access information about images. */ - -/* Returns nonzero if the image is a truecolor image, - zero for a palette image. */ -#define gdImageTrueColor(im) ((im)->trueColor) - -#define gdImageSX(im) ((im)->sx) -#define gdImageSY(im) ((im)->sy) -#define gdImageColorsTotal(im) ((im)->colorsTotal) -#define gdImageRed(im, c) ((im)->trueColor ? gdTrueColorGetRed(c) : \ - (im)->red[(c)]) -#define gdImageGreen(im, c) ((im)->trueColor ? gdTrueColorGetGreen(c) : \ - (im)->green[(c)]) -#define gdImageBlue(im, c) ((im)->trueColor ? gdTrueColorGetBlue(c) : \ - (im)->blue[(c)]) -#define gdImageAlpha(im, c) ((im)->trueColor ? gdTrueColorGetAlpha(c) : \ - (im)->alpha[(c)]) -#define gdImageGetTransparent(im) ((im)->transparent) -#define gdImageGetInterlaced(im) ((im)->interlace) - -/* These macros provide direct access to pixels in - palette-based and truecolor images, respectively. - If you use these macros, you must perform your own - bounds checking. Use of the macro for the correct type - of image is also your responsibility. */ -#define gdImagePalettePixel(im, x, y) (im)->pixels[(y)][(x)] -#define gdImageTrueColorPixel(im, x, y) (im)->tpixels[(y)][(x)] - -#define gdImageResolutionX(im) (im)->res_x -#define gdImageResolutionY(im) (im)->res_y - -/* I/O Support routines. */ - -BGD_DECLARE(gdIOCtx *) gdNewFileCtx (FILE *); -/* If data is null, size is ignored and an initial data buffer is - allocated automatically. NOTE: this function assumes gd has the right - to free or reallocate "data" at will! Also note that gd will free - "data" when the IO context is freed. If data is not null, it must point - to memory allocated with gdMalloc, or by a call to gdImage[something]Ptr. - If not, see gdNewDynamicCtxEx for an alternative. */ -BGD_DECLARE(gdIOCtx *) gdNewDynamicCtx (int size, void *data); -/* 2.0.21: if freeFlag is nonzero, gd will free and/or reallocate "data" as - needed as described above. If freeFlag is zero, gd will never free - or reallocate "data", which means that the context should only be used - for *reading* an image from a memory buffer, or writing an image to a - memory buffer which is already large enough. If the memory buffer is - not large enough and an image write is attempted, the write operation - will fail. Those wishing to write an image to a buffer in memory have - a much simpler alternative in the gdImage[something]Ptr functions. */ -BGD_DECLARE(gdIOCtx *) gdNewDynamicCtxEx (int size, void *data, int freeFlag); -BGD_DECLARE(gdIOCtx *) gdNewSSCtx (gdSourcePtr in, gdSinkPtr out); -BGD_DECLARE(void *) gdDPExtractData (struct gdIOCtx *ctx, int *size); - -#define GD2_CHUNKSIZE 128 -#define GD2_CHUNKSIZE_MIN 64 -#define GD2_CHUNKSIZE_MAX 4096 - -#define GD2_VERS 2 -#define GD2_ID "gd2" - -#define GD2_FMT_RAW 1 -#define GD2_FMT_COMPRESSED 2 - -/* Image comparison definitions */ -BGD_DECLARE(int) gdImageCompare (gdImagePtr im1, gdImagePtr im2); - -BGD_DECLARE(void) gdImageFlipHorizontal(gdImagePtr im); -BGD_DECLARE(void) gdImageFlipVertical(gdImagePtr im); -BGD_DECLARE(void) gdImageFlipBoth(gdImagePtr im); - -#define GD_FLIP_HORINZONTAL 1 -#define GD_FLIP_VERTICAL 2 -#define GD_FLIP_BOTH 3 - -/** - * Group: Crop - * - * Constants: gdCropMode - * GD_CROP_DEFAULT - Default crop mode (4 corners or background) - * GD_CROP_TRANSPARENT - Crop using the transparent color - * GD_CROP_BLACK - Crop black borders - * GD_CROP_WHITE - Crop white borders - * GD_CROP_SIDES - Crop using colors of the 4 corners - * - * See also: - * - **/ -enum gdCropMode { - GD_CROP_DEFAULT = 0, - GD_CROP_TRANSPARENT, - GD_CROP_BLACK, - GD_CROP_WHITE, - GD_CROP_SIDES, - GD_CROP_THRESHOLD -}; - -BGD_DECLARE(gdImagePtr) gdImageCrop(gdImagePtr src, const gdRect *crop); -BGD_DECLARE(gdImagePtr) gdImageCropAuto(gdImagePtr im, const unsigned int mode); -BGD_DECLARE(gdImagePtr) gdImageCropThreshold(gdImagePtr im, const unsigned int color, const float threshold); - -BGD_DECLARE(int) gdImageSetInterpolationMethod(gdImagePtr im, gdInterpolationMethod id); - -gdImagePtr gdImageScaleBilinear(gdImagePtr im, const unsigned int new_width, const unsigned int new_height); -gdImagePtr gdImageScaleBicubic(gdImagePtr src_img, const unsigned int new_width, const unsigned int new_height); -gdImagePtr gdImageScaleBicubicFixed(gdImagePtr src, const unsigned int width, const unsigned int height); -gdImagePtr gdImageScaleNearestNeighbour(gdImagePtr im, const unsigned int width, const unsigned int height); -gdImagePtr gdImageScaleTwoPass(const gdImagePtr pOrigImage, const unsigned int uOrigWidth, const unsigned int uOrigHeight, const unsigned int uNewWidth, const unsigned int uNewHeight); -BGD_DECLARE(gdImagePtr) gdImageScale(const gdImagePtr src, const unsigned int new_width, const unsigned int new_height); - -gdImagePtr gdImageRotate90(gdImagePtr src, int ignoretransparent); -gdImagePtr gdImageRotate180(gdImagePtr src, int ignoretransparent); -gdImagePtr gdImageRotate270(gdImagePtr src, int ignoretransparent); -gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees, const int bgColor); -gdImagePtr gdImageRotateBilinear(gdImagePtr src, const float degrees, const int bgColor); -gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, const float degrees, const int bgColor); -gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int bgColor); -BGD_DECLARE(gdImagePtr) gdImageRotateInterpolated(const gdImagePtr src, const float angle, int bgcolor); - -typedef enum { - GD_AFFINE_TRANSLATE = 0, - GD_AFFINE_SCALE, - GD_AFFINE_ROTATE, - GD_AFFINE_SHEAR_HORIZONTAL, - GD_AFFINE_SHEAR_VERTICAL -} gdAffineStandardMatrix; - -BGD_DECLARE(int) gdAffineApplyToPointF (gdPointFPtr dst, const gdPointFPtr src, const double affine[6]); -BGD_DECLARE(int) gdAffineInvert (double dst[6], const double src[6]); -BGD_DECLARE(int) gdAffineFlip (double dst_affine[6], const double src_affine[6], const int flip_h, const int flip_v); -BGD_DECLARE(int) gdAffineConcat (double dst[6], const double m1[6], const double m2[6]); - -BGD_DECLARE(int) gdAffineIdentity (double dst[6]); -BGD_DECLARE(int) gdAffineScale (double dst[6], const double scale_x, const double scale_y); -BGD_DECLARE(int) gdAffineRotate (double dst[6], const double angle); -BGD_DECLARE(int) gdAffineShearHorizontal (double dst[6], const double angle); -BGD_DECLARE(int) gdAffineShearVertical(double dst[6], const double angle); -BGD_DECLARE(int) gdAffineTranslate (double dst[6], const double offset_x, const double offset_y); -BGD_DECLARE(double) gdAffineExpansion (const double src[6]); -BGD_DECLARE(int) gdAffineRectilinear (const double src[6]); -BGD_DECLARE(int) gdAffineEqual (const double matrix1[6], const double matrix2[6]); -BGD_DECLARE(int) gdTransformAffineGetImage(gdImagePtr *dst, const gdImagePtr src, gdRectPtr src_area, const double affine[6]); -BGD_DECLARE(int) gdTransformAffineCopy(gdImagePtr dst, int dst_x, int dst_y, const gdImagePtr src, gdRectPtr src_region, const double affine[6]); -/* -gdTransformAffineCopy(gdImagePtr dst, int x0, int y0, int x1, int y1, - const gdImagePtr src, int src_width, int src_height, - const double affine[6]); -*/ -BGD_DECLARE(int) gdTransformAffineBoundingBox(gdRectPtr src, const double affine[6], gdRectPtr bbox); - -#define GD_CMP_IMAGE 1 /* Actual image IS different */ -#define GD_CMP_NUM_COLORS 2 /* Number of Colours in pallette differ */ -#define GD_CMP_COLOR 4 /* Image colours differ */ -#define GD_CMP_SIZE_X 8 /* Image width differs */ -#define GD_CMP_SIZE_Y 16 /* Image heights differ */ -#define GD_CMP_TRANSPARENT 32 /* Transparent colour */ -#define GD_CMP_BACKGROUND 64 /* Background colour */ -#define GD_CMP_INTERLACE 128 /* Interlaced setting */ -#define GD_CMP_TRUECOLOR 256 /* Truecolor vs palette differs */ - -/* resolution affects ttf font rendering, particularly hinting */ -#define GD_RESOLUTION 96 /* pixels per inch */ - -#ifdef __cplusplus -} -#endif - -/* newfangled special effects */ -#include "gdfx.h" - -#endif /* GD_H */ - -#ifdef __cplusplus -} -#endif --- /dev/null +++ libgd2/src/gd.h.in @@ -0,0 +1,1113 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef GD_H +#define GD_H 1 + +#define GD_MAJOR_VERSION @GDLIB_MAJOR@ +#define GD_MINOR_VERSION @GDLIB_MINOR@ +#define GD_RELEASE_VERSION @GDLIB_REVISION@ +#define GD_EXTRA_VERSION "@GDLIB_EXTRA@" +#define GD_VERSION_STRING "@GDLIB_VERSION@" + +/* Do the DLL dance: dllexport when building the DLL, + dllimport when importing from it, nothing when + not on Silly Silly Windows (tm Aardman Productions). */ + +/* 2.0.20: for headers */ + +/* 2.0.24: __stdcall also needed for Visual BASIC + and other languages. This breaks ABI compatibility + with previous DLL revs, but it's necessary. */ + +/* 2.0.29: WIN32 programmers can declare the NONDLL macro if they + wish to build gd as a static library or by directly including + the gd sources in a project. */ + +/* http://gcc.gnu.org/wiki/Visibility */ +#if defined(_WIN32) || defined(CYGWIN) || defined(_WIN32_WCE) +# ifdef BGDWIN32 +# ifdef NONDLL +# define BGD_EXPORT_DATA_PROT +# else +# ifdef __GNUC__ +# define BGD_EXPORT_DATA_PROT __attribute__ ((dllexport)) +# else +# define BGD_EXPORT_DATA_PROT __declspec(dllexport) +# endif +# endif +# else +# ifdef __GNUC__ +# define BGD_EXPORT_DATA_PROT __attribute__ ((dllimport)) +# else +# define BGD_EXPORT_DATA_PROT __declspec(dllimport) +# endif +# endif +# define BGD_STDCALL __stdcall +# define BGD_EXPORT_DATA_IMPL +#else +# ifdef HAVE_VISIBILITY +# define BGD_EXPORT_DATA_PROT __attribute__ ((visibility ("default"))) +# define BGD_EXPORT_DATA_IMPL __attribute__ ((visibility ("hidden"))) +# else +# define BGD_EXPORT_DATA_PROT +# define BGD_EXPORT_DATA_IMPL +# endif +# define BGD_STDCALL +#endif + +#define BGD_DECLARE(rt) BGD_EXPORT_DATA_PROT rt BGD_STDCALL + +#ifdef __cplusplus + extern "C" + { +#endif + +/* gd.h: declarations file for the graphic-draw module. + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. This software is provided "AS IS." Thomas Boutell and + * Boutell.Com, Inc. 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. */ + +/* stdio is needed for file I/O. */ +#include +#include +#include "gd_io.h" + +/* The maximum number of palette entries in palette-based images. + In the wonderful new world of gd 2.0, you can of course have + many more colors when using truecolor mode. */ + +#define gdMaxColors 256 + +/* Image type. See functions below; you will not need to change + the elements directly. Use the provided macros to + access sx, sy, the color table, and colorsTotal for + read-only purposes. */ + +/* If 'truecolor' is set true, the image is truecolor; + pixels are represented by integers, which + must be 32 bits wide or more. + + True colors are repsented as follows: + + ARGB + + Where 'A' (alpha channel) occupies only the + LOWER 7 BITS of the MSB. This very small + loss of alpha channel resolution allows gd 2.x + to keep backwards compatibility by allowing + signed integers to be used to represent colors, + and negative numbers to represent special cases, + just as in gd 1.x. */ + +#define gdAlphaMax 127 +#define gdAlphaOpaque 0 +#define gdAlphaTransparent 127 +#define gdRedMax 255 +#define gdGreenMax 255 +#define gdBlueMax 255 +#define gdTrueColorGetAlpha(c) (((c) & 0x7F000000) >> 24) +#define gdTrueColorGetRed(c) (((c) & 0xFF0000) >> 16) +#define gdTrueColorGetGreen(c) (((c) & 0x00FF00) >> 8) +#define gdTrueColorGetBlue(c) ((c) & 0x0000FF) +#define gdEffectReplace 0 +#define gdEffectAlphaBlend 1 +#define gdEffectNormal 2 +#define gdEffectOverlay 3 + +#define GD_TRUE 1 +#define GD_FALSE 0 + +#define GD_EPSILON 1e-6 +#ifndef M_PI +# define M_PI 3.14159265358979323846 +#endif + +/* This function accepts truecolor pixel values only. The + source color is composited with the destination color + based on the alpha channel value of the source color. + The resulting color is opaque. */ + +BGD_DECLARE(int) gdAlphaBlend (int dest, int src); + +enum gdPaletteQuantizationMethod { + GD_QUANT_DEFAULT = 0, + GD_QUANT_JQUANT = 1, /* libjpeg's old median cut. Fast, but only uses 16-bit color. */ + GD_QUANT_NEUQUANT = 2, /* neuquant - approximation using kohonen neural network. */ + GD_QUANT_LIQ = 3 /* combination of algorithms used in libimagequant/pngquant2 aiming for highest quality at cost of speed */ +}; + +/** + * Group: Transform + * + * Constants: gdInterpolationMethod + + * GD_BELL - Bell + * GD_BESSEL - Bessel + * GD_BILINEAR_FIXED - fixed point bilinear + * GD_BICUBIC - Bicubic + * GD_BICUBIC_FIXED - fixed point bicubic integer + * GD_BLACKMAN - Blackman + * GD_BOX - Box + * GD_BSPLINE - BSpline + * GD_CATMULLROM - Catmullrom + * GD_GAUSSIAN - Gaussian + * GD_GENERALIZED_CUBIC - Generalized cubic + * GD_HERMITE - Hermite + * GD_HAMMING - Hamming + * GD_HANNING - Hannig + * GD_MITCHELL - Mitchell + * GD_NEAREST_NEIGHBOUR - Nearest neighbour interpolation + * GD_POWER - Power + * GD_QUADRATIC - Quadratic + * GD_SINC - Sinc + * GD_TRIANGLE - Triangle + * GD_WEIGHTED4 - 4 pixels weighted bilinear interpolation + * + * See also: + * + **/ +typedef enum { + GD_DEFAULT = 0, + GD_BELL, + GD_BESSEL, + GD_BILINEAR_FIXED, + GD_BICUBIC, + GD_BICUBIC_FIXED, + GD_BLACKMAN, + GD_BOX, + GD_BSPLINE, + GD_CATMULLROM, + GD_GAUSSIAN, + GD_GENERALIZED_CUBIC, + GD_HERMITE, + GD_HAMMING, + GD_HANNING, + GD_MITCHELL, + GD_NEAREST_NEIGHBOUR, + GD_POWER, + GD_QUADRATIC, + GD_SINC, + GD_TRIANGLE, + GD_WEIGHTED4, + GD_METHOD_COUNT = 21 +} gdInterpolationMethod; + +/* define struct with name and func ptr and add it to gdImageStruct gdInterpolationMethod interpolation; */ + +/* Interpolation function ptr */ +typedef double (* interpolation_method )(double); + +typedef struct gdImageStruct { + /* Palette-based image pixels */ + unsigned char **pixels; + int sx; + int sy; + /* These are valid in palette images only. See also + 'alpha', which appears later in the structure to + preserve binary backwards compatibility */ + int colorsTotal; + int red[gdMaxColors]; + int green[gdMaxColors]; + int blue[gdMaxColors]; + int open[gdMaxColors]; + /* For backwards compatibility, this is set to the + first palette entry with 100% transparency, + and is also set and reset by the + gdImageColorTransparent function. Newer + applications can allocate palette entries + with any desired level of transparency; however, + bear in mind that many viewers, notably + many web browsers, fail to implement + full alpha channel for PNG and provide + support for full opacity or transparency only. */ + int transparent; + int *polyInts; + int polyAllocated; + struct gdImageStruct *brush; + struct gdImageStruct *tile; + int brushColorMap[gdMaxColors]; + int tileColorMap[gdMaxColors]; + int styleLength; + int stylePos; + int *style; + int interlace; + /* New in 2.0: thickness of line. Initialized to 1. */ + int thick; + /* New in 2.0: alpha channel for palettes. Note that only + Macintosh Internet Explorer and (possibly) Netscape 6 + really support multiple levels of transparency in + palettes, to my knowledge, as of 2/15/01. Most + common browsers will display 100% opaque and + 100% transparent correctly, and do something + unpredictable and/or undesirable for levels + in between. TBB */ + int alpha[gdMaxColors]; + /* Truecolor flag and pixels. New 2.0 fields appear here at the + end to minimize breakage of existing object code. */ + int trueColor; + int **tpixels; + /* Should alpha channel be copied, or applied, each time a + pixel is drawn? This applies to truecolor images only. + No attempt is made to alpha-blend in palette images, + even if semitransparent palette entries exist. + To do that, build your image as a truecolor image, + then quantize down to 8 bits. */ + int alphaBlendingFlag; + /* Should the alpha channel of the image be saved? This affects + PNG at the moment; other future formats may also + have that capability. JPEG doesn't. */ + int saveAlphaFlag; + + /* There should NEVER BE ACCESSOR MACROS FOR ITEMS BELOW HERE, so this + part of the structure can be safely changed in new releases. */ + + /* 2.0.12: anti-aliased globals. 2.0.26: just a few vestiges after + switching to the fast, memory-cheap implementation from PHP-gd. */ + int AA; + int AA_color; + int AA_dont_blend; + + /* 2.0.12: simple clipping rectangle. These values + must be checked for safety when set; please use + gdImageSetClip */ + int cx1; + int cy1; + int cx2; + int cy2; + + /* 2.1.0: allows to specify resolution in dpi */ + unsigned int res_x; + unsigned int res_y; + + /* Selects quantization method, see gdImageTrueColorToPaletteSetMethod() and gdPaletteQuantizationMethod enum. */ + int paletteQuantizationMethod; + /* speed/quality trade-off. 1 = best quality, 10 = best speed. 0 = method-specific default. + Applicable to GD_QUANT_LIQ and GD_QUANT_NEUQUANT. */ + int paletteQuantizationSpeed; + /* Image will remain true-color if conversion to palette cannot achieve given quality. + Value from 1 to 100, 1 = ugly, 100 = perfect. Applicable to GD_QUANT_LIQ.*/ + int paletteQuantizationMinQuality; + /* Image will use minimum number of palette colors needed to achieve given quality. Must be higher than paletteQuantizationMinQuality + Value from 1 to 100, 1 = ugly, 100 = perfect. Applicable to GD_QUANT_LIQ.*/ + int paletteQuantizationMaxQuality; + gdInterpolationMethod interpolation_id; + interpolation_method interpolation; +} +gdImage; + +typedef gdImage *gdImagePtr; + + +/* Point type for use in polygon drawing. */ + +/** + * Group: Types + * + * typedef: gdPointF + * Defines a point in a 2D coordinate system using floating point + * values. + * x - Floating point position (increase from left to right) + * y - Floating point Row position (increase from top to bottom) + * + * typedef: gdPointFPtr + * Pointer to a + * + * See also: + * , , + **/ +typedef struct +{ + double x, y; +} +gdPointF, *gdPointFPtr; + +typedef struct { + /* # of characters in font */ + int nchars; + /* First character is numbered... (usually 32 = space) */ + int offset; + /* Character width and height */ + int w; + int h; + /* Font data; array of characters, one row after another. + Easily included in code, also easily loaded from + data files. */ + char *data; +} +gdFont; + +/* Text functions take these. */ +typedef gdFont *gdFontPtr; + +typedef void(*gdErrorMethod)(int, const char *, va_list); + +BGD_DECLARE(void) gdSetErrorMethod(gdErrorMethod); +BGD_DECLARE(void) gdClearErrorMethod(void); + +/* For backwards compatibility only. Use gdImageSetStyle() + for MUCH more flexible line drawing. Also see + gdImageSetBrush(). */ +#define gdDashSize 4 + +/* Special colors. */ + +#define gdStyled (-2) +#define gdBrushed (-3) +#define gdStyledBrushed (-4) +#define gdTiled (-5) + +/* NOT the same as the transparent color index. + This is used in line styles only. */ +#define gdTransparent (-6) + +#define gdAntiAliased (-7) + +/* Functions to manipulate images. */ + +/* Creates a palette-based image (up to 256 colors). */ +BGD_DECLARE(gdImagePtr) gdImageCreate (int sx, int sy); + +/* An alternate name for the above (2.0). */ +#define gdImageCreatePalette gdImageCreate + +/* Creates a truecolor image (millions of colors). */ +BGD_DECLARE(gdImagePtr) gdImageCreateTrueColor (int sx, int sy); + +/* Creates an image from various file types. These functions + return a palette or truecolor image based on the + nature of the file being loaded. Truecolor PNG + stays truecolor; palette PNG stays palette-based; + JPEG is always truecolor. */ +BGD_DECLARE(gdImagePtr) gdImageCreateFromPng (FILE * fd); +BGD_DECLARE(gdImagePtr) gdImageCreateFromPngCtx (gdIOCtxPtr in); +BGD_DECLARE(gdImagePtr) gdImageCreateFromPngPtr (int size, void *data); + +/* These read the first frame only */ +BGD_DECLARE(gdImagePtr) gdImageCreateFromGif (FILE * fd); +BGD_DECLARE(gdImagePtr) gdImageCreateFromGifCtx (gdIOCtxPtr in); +BGD_DECLARE(gdImagePtr) gdImageCreateFromGifPtr (int size, void *data); +BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMP (FILE * inFile); +BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMPCtx (gdIOCtx * infile); +BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMPPtr (int size, void *data); +BGD_DECLARE(gdImagePtr) gdImageCreateFromJpeg (FILE * infile); +BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegEx (FILE * infile, int ignore_warning); +BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegCtx (gdIOCtx * infile); +BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegCtxEx (gdIOCtx * infile, int ignore_warning); +BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegPtr (int size, void *data); +BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegPtrEx (int size, void *data, int ignore_warning); +BGD_DECLARE(gdImagePtr) gdImageCreateFromWebp (FILE * inFile); +BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpPtr (int size, void *data); +BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpCtx (gdIOCtx * infile); + +BGD_DECLARE(gdImagePtr) gdImageCreateFromTiff(FILE *inFile); +BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffCtx(gdIOCtx *infile); +BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffPtr(int size, void *data); + +BGD_DECLARE(gdImagePtr) gdImageCreateFromTga( FILE * fp ); +BGD_DECLARE(gdImagePtr) gdImageCreateFromTgaCtx(gdIOCtx* ctx); +BGD_DECLARE(gdImagePtr) gdImageCreateFromTgaPtr(int size, void *data); + +BGD_DECLARE(gdImagePtr) gdImageCreateFromBmp (FILE * inFile); +BGD_DECLARE(gdImagePtr) gdImageCreateFromBmpPtr (int size, void *data); +BGD_DECLARE(gdImagePtr) gdImageCreateFromBmpCtx (gdIOCtxPtr infile); + +/* A custom data source. */ +/* The source function must return -1 on error, otherwise the number + of bytes fetched. 0 is EOF, not an error! */ +/* context will be passed to your source function. */ + +typedef struct { + int (*source) (void *context, char *buffer, int len); + void *context; +} +gdSource, *gdSourcePtr; + +/* Deprecated in favor of gdImageCreateFromPngCtx */ +BGD_DECLARE(gdImagePtr) gdImageCreateFromPngSource (gdSourcePtr in); + +BGD_DECLARE(gdImagePtr) gdImageCreateFromGd (FILE * in); +BGD_DECLARE(gdImagePtr) gdImageCreateFromGdCtx (gdIOCtxPtr in); +BGD_DECLARE(gdImagePtr) gdImageCreateFromGdPtr (int size, void *data); + +BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2 (FILE * in); +BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ctx (gdIOCtxPtr in); +BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ptr (int size, void *data); + +BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Part (FILE * in, int srcx, int srcy, int w, + int h); +BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartCtx (gdIOCtxPtr in, int srcx, int srcy, + int w, int h); +BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy, + int w, int h); +/* 2.0.10: prototype was missing */ +BGD_DECLARE(gdImagePtr) gdImageCreateFromXbm (FILE * in); +BGD_DECLARE(void) gdImageXbmCtx(gdImagePtr image, char* file_name, int fg, gdIOCtx * out); + +/* NOTE: filename, not FILE */ +BGD_DECLARE(gdImagePtr) gdImageCreateFromXpm (char *filename); + +BGD_DECLARE(void) gdImageDestroy (gdImagePtr im); + +/* Replaces or blends with the background depending on the + most recent call to gdImageAlphaBlending and the + alpha channel value of 'color'; default is to overwrite. + Tiling and line styling are also implemented + here. All other gd drawing functions pass through this call, + allowing for many useful effects. */ + +BGD_DECLARE(void) gdImageSetPixel (gdImagePtr im, int x, int y, int color); +/* FreeType 2 text output with hook to extra flags */ + +BGD_DECLARE(int) gdImageGetPixel (gdImagePtr im, int x, int y); +BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y); + +BGD_DECLARE(void) gdImageAABlend (gdImagePtr im); + +BGD_DECLARE(void) gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color); + +/* For backwards compatibility only. Use gdImageSetStyle() + for much more flexible line drawing. */ +BGD_DECLARE(void) gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, + int color); +/* Corners specified (not width and height). Upper left first, lower right + second. */ +BGD_DECLARE(void) gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, + int color); +/* Solid bar. Upper left corner first, lower right corner second. */ +BGD_DECLARE(void) gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, + int color); +BGD_DECLARE(void) gdImageSetClip(gdImagePtr im, int x1, int y1, int x2, int y2); +BGD_DECLARE(void) gdImageGetClip(gdImagePtr im, int *x1P, int *y1P, int *x2P, int *y2P); +BGD_DECLARE(void) gdImageSetResolution(gdImagePtr im, const unsigned int res_x, const unsigned int res_y); +BGD_DECLARE(int) gdImageBoundsSafe (gdImagePtr im, int x, int y); +BGD_DECLARE(void) gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c, + int color); +BGD_DECLARE(void) gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c, + int color); +BGD_DECLARE(void) gdImageString (gdImagePtr im, gdFontPtr f, int x, int y, + unsigned char *s, int color); +BGD_DECLARE(void) gdImageStringUp (gdImagePtr im, gdFontPtr f, int x, int y, + unsigned char *s, int color); +BGD_DECLARE(void) gdImageString16 (gdImagePtr im, gdFontPtr f, int x, int y, + unsigned short *s, int color); +BGD_DECLARE(void) gdImageStringUp16 (gdImagePtr im, gdFontPtr f, int x, int y, + unsigned short *s, int color); + +/* 2.0.16: for thread-safe use of gdImageStringFT and friends, + call this before allowing any thread to call gdImageStringFT. + Otherwise it is invoked by the first thread to invoke + gdImageStringFT, with a very small but real risk of a race condition. + Return 0 on success, nonzero on failure to initialize freetype. */ +BGD_DECLARE(int) gdFontCacheSetup (void); + +/* Optional: clean up after application is done using fonts in + gdImageStringFT(). */ +BGD_DECLARE(void) gdFontCacheShutdown (void); +/* 2.0.20: for backwards compatibility. A few applications did start calling + this function when it first appeared although it was never documented. + Simply invokes gdFontCacheShutdown. */ +BGD_DECLARE(void) gdFreeFontCache (void); + +/* Calls gdImageStringFT. Provided for backwards compatibility only. */ +BGD_DECLARE(char *) gdImageStringTTF (gdImage * im, int *brect, int fg, char *fontlist, + double ptsize, double angle, int x, int y, + char *string); + +/* FreeType 2 text output */ +BGD_DECLARE(char *) gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist, + double ptsize, double angle, int x, int y, + char *string); + +/* 2.0.5: provides an extensible way to pass additional parameters. + Thanks to Wez Furlong, sorry for the delay. */ + +typedef struct { + int flags; /* Logical OR of gdFTEX_ values */ + double linespacing; /* fine tune line spacing for '\n' */ + int charmap; /* TBB: 2.0.12: may be gdFTEX_Unicode, + gdFTEX_Shift_JIS, gdFTEX_Big5, + or gdFTEX_Adobe_Custom; + when not specified, maps are searched + for in the above order. */ + int hdpi; /* if (flags & gdFTEX_RESOLUTION) */ + int vdpi; /* if (flags & gdFTEX_RESOLUTION) */ + char *xshow; /* if (flags & gdFTEX_XSHOW) + then, on return, xshow is a malloc'ed + string containing xshow position data for + the last string. + + NB. The caller is responsible for gdFree'ing + the xshow string. + */ + char *fontpath; /* if (flags & gdFTEX_RETURNFONTPATHNAME) + then, on return, fontpath is a malloc'ed + string containing the actual font file path name + used, which can be interesting when fontconfig + is in use. + + The caller is responsible for gdFree'ing the + fontpath string. + */ + +} +gdFTStringExtra, *gdFTStringExtraPtr; + +#define gdFTEX_LINESPACE 1 +#define gdFTEX_CHARMAP 2 +#define gdFTEX_RESOLUTION 4 +#define gdFTEX_DISABLE_KERNING 8 +#define gdFTEX_XSHOW 16 +/* The default unless gdFTUseFontConfig(1); has been called: + fontlist is a full or partial font file pathname or list thereof + (i.e. just like before 2.0.29) */ +#define gdFTEX_FONTPATHNAME 32 +/* Necessary to use fontconfig patterns instead of font pathnames + as the fontlist argument, unless gdFTUseFontConfig(1); has + been called. New in 2.0.29 */ +#define gdFTEX_FONTCONFIG 64 +/* Sometimes interesting when fontconfig is used: the fontpath + element of the structure above will contain a gdMalloc'd string + copy of the actual font file pathname used, if this flag is set + when the call is made */ +#define gdFTEX_RETURNFONTPATHNAME 128 + +/* If flag is nonzero, the fontlist parameter to gdImageStringFT + and gdImageStringFTEx shall be assumed to be a fontconfig font pattern + if fontconfig was compiled into gd. This function returns zero + if fontconfig is not available, nonzero otherwise. */ +BGD_DECLARE(int) gdFTUseFontConfig(int flag); + +/* These are NOT flags; set one in 'charmap' if you set the + gdFTEX_CHARMAP bit in 'flags'. */ +#define gdFTEX_Unicode 0 +#define gdFTEX_Shift_JIS 1 +#define gdFTEX_Big5 2 +#define gdFTEX_Adobe_Custom 3 + +BGD_DECLARE(char *) gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, + double ptsize, double angle, int x, int y, + char *string, gdFTStringExtraPtr strex); + +/* Point type for use in polygon drawing. */ +typedef struct { + int x, y; +} +gdPoint, *gdPointPtr; + +typedef struct { + int x, y; + int width, height; +} +gdRect, *gdRectPtr; + + +BGD_DECLARE(void) gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c); +BGD_DECLARE(void) gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c); +BGD_DECLARE(void) gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c); + +/* These functions still work with truecolor images, + for which they never return error. */ +BGD_DECLARE(int) gdImageColorAllocate (gdImagePtr im, int r, int g, int b); +/* gd 2.0: palette entries with non-opaque transparency are permitted. */ +BGD_DECLARE(int) gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b, int a); +/* Assumes opaque is the preferred alpha channel value */ +BGD_DECLARE(int) gdImageColorClosest (gdImagePtr im, int r, int g, int b); +/* Closest match taking all four parameters into account. + A slightly different color with the same transparency + beats the exact same color with radically different + transparency */ +BGD_DECLARE(int) gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a); +/* An alternate method */ +BGD_DECLARE(int) gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b); +/* Returns exact, 100% opaque matches only */ +BGD_DECLARE(int) gdImageColorExact (gdImagePtr im, int r, int g, int b); +/* Returns an exact match only, including alpha */ +BGD_DECLARE(int) gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a); +/* Opaque only */ +BGD_DECLARE(int) gdImageColorResolve (gdImagePtr im, int r, int g, int b); +/* Based on gdImageColorExactAlpha and gdImageColorClosestAlpha */ +BGD_DECLARE(int) gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a); + +/* A simpler way to obtain an opaque truecolor value for drawing on a + truecolor image. Not for use with palette images! */ + +#define gdTrueColor(r, g, b) (((r) << 16) + \ + ((g) << 8) + \ + (b)) + +/* Returns a truecolor value with an alpha channel component. + gdAlphaMax (127, **NOT 255**) is transparent, 0 is completely + opaque. */ + +#define gdTrueColorAlpha(r, g, b, a) (((a) << 24) + \ + ((r) << 16) + \ + ((g) << 8) + \ + (b)) + +BGD_DECLARE(void) gdImageColorDeallocate (gdImagePtr im, int color); + +/* Converts a truecolor image to a palette-based image, + using a high-quality two-pass quantization routine + which attempts to preserve alpha channel information + as well as R/G/B color information when creating + a palette. If ditherFlag is set, the image will be + dithered to approximate colors better, at the expense + of some obvious "speckling." colorsWanted can be + anything up to 256. If the original source image + includes photographic information or anything that + came out of a JPEG, 256 is strongly recommended. + + Better yet, don't use these function -- write real + truecolor PNGs and JPEGs. The disk space gain of + conversion to palette is not great (for small images + it can be negative) and the quality loss is ugly. + + DIFFERENCES: gdImageCreatePaletteFromTrueColor creates and + returns a new image. gdImageTrueColorToPalette modifies + an existing image, and the truecolor pixels are discarded. + + gdImageTrueColorToPalette() returns TRUE on success, FALSE on failure. +*/ + +BGD_DECLARE(gdImagePtr) gdImageCreatePaletteFromTrueColor (gdImagePtr im, int ditherFlag, + int colorsWanted); + +BGD_DECLARE(int) gdImageTrueColorToPalette (gdImagePtr im, int ditherFlag, + int colorsWanted); + +BGD_DECLARE(int) gdImagePaletteToTrueColor(gdImagePtr src); + +/* An attempt at getting the results of gdImageTrueColorToPalette to + * look a bit more like the original (im1 is the original and im2 is + * the palette version */ + +BGD_DECLARE(int) gdImageColorMatch(gdImagePtr im1, gdImagePtr im2); + +/* Selects quantization method used for subsequent gdImageTrueColorToPalette calls. + See gdPaletteQuantizationMethod enum (e.g. GD_QUANT_NEUQUANT, GD_QUANT_LIQ). + Speed is from 1 (highest quality) to 10 (fastest). + Speed 0 selects method-specific default (recommended). + + Returns FALSE if the given method is invalid or not available. +*/ +BGD_DECLARE(int) gdImageTrueColorToPaletteSetMethod (gdImagePtr im, int method, int speed); + +/* + Chooses quality range that subsequent call to gdImageTrueColorToPalette will aim for. + Min and max quality is in range 1-100 (1 = ugly, 100 = perfect). Max must be higher than min. + If palette cannot represent image with at least min_quality, then image will remain true-color. + If palette can represent image with quality better than max_quality, then lower number of colors will be used. + This function has effect only when GD_QUANT_LIQ method has been selected and the source image is true-color. +*/ +BGD_DECLARE(void) gdImageTrueColorToPaletteSetQuality (gdImagePtr im, int min_quality, int max_quality); + +/* Specifies a color index (if a palette image) or an + RGB color (if a truecolor image) which should be + considered 100% transparent. FOR TRUECOLOR IMAGES, + THIS IS IGNORED IF AN ALPHA CHANNEL IS BEING + SAVED. Use gdImageSaveAlpha(im, 0); to + turn off the saving of a full alpha channel in + a truecolor image. Note that gdImageColorTransparent + is usually compatible with older browsers that + do not understand full alpha channels well. TBB */ +BGD_DECLARE(void) gdImageColorTransparent (gdImagePtr im, int color); + +BGD_DECLARE(void) gdImagePaletteCopy (gdImagePtr dst, gdImagePtr src); + +typedef int (*gdCallbackImageColor)(gdImagePtr im, int src); + +BGD_DECLARE(int) gdImageColorReplace(gdImagePtr im, int src, int dst); +BGD_DECLARE(int) gdImageColorReplaceThreshold(gdImagePtr im, int src, int dst, float threshold); +BGD_DECLARE(int) gdImageColorReplaceArray(gdImagePtr im, int len, int *src, int *dst); +BGD_DECLARE(int) gdImageColorReplaceCallback(gdImagePtr im, gdCallbackImageColor callback); + +BGD_DECLARE(void) gdImageGif (gdImagePtr im, FILE * out); +BGD_DECLARE(void) gdImagePng (gdImagePtr im, FILE * out); +BGD_DECLARE(void) gdImagePngCtx (gdImagePtr im, gdIOCtx * out); +BGD_DECLARE(void) gdImageGifCtx (gdImagePtr im, gdIOCtx * out); +BGD_DECLARE(void) gdImageTiff(gdImagePtr im, FILE *outFile); +BGD_DECLARE(void *) gdImageTiffPtr(gdImagePtr im, int *size); +BGD_DECLARE(void) gdImageTiffCtx(gdImagePtr image, gdIOCtx *out); + +BGD_DECLARE(void *) gdImageBmpPtr(gdImagePtr im, int *size, int compression); +BGD_DECLARE(void) gdImageBmp(gdImagePtr im, FILE *outFile, int compression); +BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression); + +/* 2.0.12: Compression level: 0-9 or -1, where 0 is NO COMPRESSION at all, + 1 is FASTEST but produces larger files, 9 provides the best + compression (smallest files) but takes a long time to compress, and + -1 selects the default compiled into the zlib library. */ +BGD_DECLARE(void) gdImagePngEx (gdImagePtr im, FILE * out, int level); +BGD_DECLARE(void) gdImagePngCtxEx (gdImagePtr im, gdIOCtx * out, int level); + +BGD_DECLARE(void) gdImageWBMP (gdImagePtr image, int fg, FILE * out); +BGD_DECLARE(void) gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out); + +/* Guaranteed to correctly free memory returned by the gdImage*Ptr + functions */ +BGD_DECLARE(void) gdFree (void *m); + +/* Best to free this memory with gdFree(), not free() */ +BGD_DECLARE(void *) gdImageWBMPPtr (gdImagePtr im, int *size, int fg); + +/* 100 is highest quality (there is always a little loss with JPEG). + 0 is lowest. 10 is about the lowest useful setting. */ +BGD_DECLARE(void) gdImageJpeg (gdImagePtr im, FILE * out, int quality); +BGD_DECLARE(void) gdImageJpegCtx (gdImagePtr im, gdIOCtx * out, int quality); + +/* Best to free this memory with gdFree(), not free() */ +BGD_DECLARE(void *) gdImageJpegPtr (gdImagePtr im, int *size, int quality); + +BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization); +BGD_DECLARE(void) gdImageWebp (gdImagePtr im, FILE * outFile); +BGD_DECLARE(void *) gdImageWebpPtr (gdImagePtr im, int *size); +BGD_DECLARE(void *) gdImageWebpPtrEx (gdImagePtr im, int *size, int quantization); +BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization); + +/* Legal values for Disposal. gdDisposalNone is always used by + the built-in optimizer if previm is passed. */ + +enum { + gdDisposalUnknown, + gdDisposalNone, + gdDisposalRestoreBackground, + gdDisposalRestorePrevious +}; + +BGD_DECLARE(void) gdImageGifAnimBegin(gdImagePtr im, FILE *outFile, int GlobalCM, int Loops); +BGD_DECLARE(void) gdImageGifAnimAdd(gdImagePtr im, FILE *outFile, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm); +BGD_DECLARE(void) gdImageGifAnimEnd(FILE *outFile); +BGD_DECLARE(void) gdImageGifAnimBeginCtx(gdImagePtr im, gdIOCtx *out, int GlobalCM, int Loops); +BGD_DECLARE(void) gdImageGifAnimAddCtx(gdImagePtr im, gdIOCtx *out, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm); +BGD_DECLARE(void) gdImageGifAnimEndCtx(gdIOCtx *out); +BGD_DECLARE(void *) gdImageGifAnimBeginPtr(gdImagePtr im, int *size, int GlobalCM, int Loops); +BGD_DECLARE(void *) gdImageGifAnimAddPtr(gdImagePtr im, int *size, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm); +BGD_DECLARE(void *) gdImageGifAnimEndPtr(int *size); + +/* A custom data sink. For backwards compatibility. Use gdIOCtx + instead. The sink function must return -1 on error, otherwise the + number of bytes written, which must be equal to len. Context will + be passed to your sink function. +*/ +typedef struct { + int (*sink) (void *context, const char *buffer, int len); + void *context; +} +gdSink, *gdSinkPtr; + +BGD_DECLARE(void) gdImagePngToSink (gdImagePtr im, gdSinkPtr out); + +BGD_DECLARE(void) gdImageGd (gdImagePtr im, FILE * out); +BGD_DECLARE(void) gdImageGd2 (gdImagePtr im, FILE * out, int cs, int fmt); + +/* Best to free this memory with gdFree(), not free() */ +BGD_DECLARE(void *) gdImageGifPtr (gdImagePtr im, int *size); + +/* Best to free this memory with gdFree(), not free() */ +BGD_DECLARE(void *) gdImagePngPtr (gdImagePtr im, int *size); +BGD_DECLARE(void *) gdImagePngPtrEx (gdImagePtr im, int *size, int level); + +/* Best to free this memory with gdFree(), not free() */ +BGD_DECLARE(void *) gdImageGdPtr (gdImagePtr im, int *size); + +/* Best to free this memory with gdFree(), not free() */ +BGD_DECLARE(void *) gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size); + +/* Style is a bitwise OR ( | operator ) of these. + gdArc and gdChord are mutually exclusive; + gdChord just connects the starting and ending + angles with a straight line, while gdArc produces + a rounded edge. gdPie is a synonym for gdArc. + gdNoFill indicates that the arc or chord should be + outlined, not filled. gdEdged, used together with + gdNoFill, indicates that the beginning and ending + angles should be connected to the center; this is + a good way to outline (rather than fill) a + 'pie slice'. */ +#define gdArc 0 +#define gdPie gdArc +#define gdChord 1 +#define gdNoFill 2 +#define gdEdged 4 + +BGD_DECLARE(void) gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, + int e, int color, int style); +BGD_DECLARE(void) gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e, + int color); +BGD_DECLARE(void) gdImageEllipse(gdImagePtr im, int cx, int cy, int w, int h, int color); +BGD_DECLARE(void) gdImageFilledEllipse (gdImagePtr im, int cx, int cy, int w, int h, + int color); +BGD_DECLARE(void) gdImageFillToBorder (gdImagePtr im, int x, int y, int border, + int color); +BGD_DECLARE(void) gdImageFill (gdImagePtr im, int x, int y, int color); +BGD_DECLARE(void) gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, + int srcX, int srcY, int w, int h); +BGD_DECLARE(void) gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, + int srcX, int srcY, int w, int h, int pct); +BGD_DECLARE(void) gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX, + int dstY, int srcX, int srcY, int w, int h, + int pct); + +/* Stretches or shrinks to fit, as needed. Does NOT attempt + to average the entire set of source pixels that scale down onto the + destination pixel. */ +BGD_DECLARE(void) gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, + int srcX, int srcY, int dstW, int dstH, int srcW, + int srcH); + +/* gd 2.0: stretches or shrinks to fit, as needed. When called with a + truecolor destination image, this function averages the + entire set of source pixels that scale down onto the + destination pixel, taking into account what portion of the + destination pixel each source pixel represents. This is a + floating point operation, but this is not a performance issue + on modern hardware, except for some embedded devices. If the + destination is a palette image, gdImageCopyResized is + substituted automatically. */ +BGD_DECLARE(void) gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX, + int dstY, int srcX, int srcY, int dstW, int dstH, + int srcW, int srcH); + +/* gd 2.0.8: gdImageCopyRotated is added. Source + is a rectangle, with its upper left corner at + srcX and srcY. Destination is the *center* of + the rotated copy. Angle is in degrees, same as + gdImageArc. Floating point destination center + coordinates allow accurate rotation of + objects of odd-numbered width or height. */ +BGD_DECLARE(void) gdImageCopyRotated (gdImagePtr dst, + gdImagePtr src, + double dstX, double dstY, + int srcX, int srcY, + int srcWidth, int srcHeight, int angle); + +BGD_DECLARE(gdImagePtr) gdImageClone (gdImagePtr src); + +BGD_DECLARE(void) gdImageSetBrush (gdImagePtr im, gdImagePtr brush); +BGD_DECLARE(void) gdImageSetTile (gdImagePtr im, gdImagePtr tile); +BGD_DECLARE(void) gdImageSetAntiAliased (gdImagePtr im, int c); +BGD_DECLARE(void) gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont_blend); +BGD_DECLARE(void) gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels); +/* Line thickness (defaults to 1). Affects lines, ellipses, + rectangles, polygons and so forth. */ +BGD_DECLARE(void) gdImageSetThickness (gdImagePtr im, int thickness); +/* On or off (1 or 0) for all three of these. */ +BGD_DECLARE(void) gdImageInterlace (gdImagePtr im, int interlaceArg); +BGD_DECLARE(void) gdImageAlphaBlending (gdImagePtr im, int alphaBlendingArg); +BGD_DECLARE(void) gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg); + +BGD_DECLARE(gdImagePtr) gdImageNeuQuant(gdImagePtr im, const int max_color, int sample_factor); + +enum gdPixelateMode { + GD_PIXELATE_UPPERLEFT, + GD_PIXELATE_AVERAGE +}; + +BGD_DECLARE(int) gdImagePixelate(gdImagePtr im, int block_size, const unsigned int mode); + +typedef struct { + int sub; + int plus; + unsigned int num_colors; + int *colors; + unsigned int seed; +} gdScatter, *gdScatterPtr; + +BGD_DECLARE(int) gdImageScatter(gdImagePtr im, int sub, int plus); +BGD_DECLARE(int) gdImageScatterColor(gdImagePtr im, int sub, int plus, int colors[], unsigned int num_colors); +BGD_DECLARE(int) gdImageScatterEx(gdImagePtr im, gdScatterPtr s); +BGD_DECLARE(int) gdImageSmooth(gdImagePtr im, float weight); +BGD_DECLARE(int) gdImageMeanRemoval(gdImagePtr im); +BGD_DECLARE(int) gdImageEmboss(gdImagePtr im); +BGD_DECLARE(int) gdImageGaussianBlur(gdImagePtr im); +BGD_DECLARE(int) gdImageEdgeDetectQuick(gdImagePtr src); +BGD_DECLARE(int) gdImageSelectiveBlur( gdImagePtr src); +BGD_DECLARE(int) gdImageConvolution(gdImagePtr src, float filter[3][3], float filter_div, float offset); +BGD_DECLARE(int) gdImageColor(gdImagePtr src, const int red, const int green, const int blue, const int alpha); +BGD_DECLARE(int) gdImageContrast(gdImagePtr src, double contrast); +BGD_DECLARE(int) gdImageBrightness(gdImagePtr src, int brightness); +BGD_DECLARE(int) gdImageGrayScale(gdImagePtr src); +BGD_DECLARE(int) gdImageNegate(gdImagePtr src); + +/* Macros to access information about images. */ + +/* Returns nonzero if the image is a truecolor image, + zero for a palette image. */ +#define gdImageTrueColor(im) ((im)->trueColor) + +#define gdImageSX(im) ((im)->sx) +#define gdImageSY(im) ((im)->sy) +#define gdImageColorsTotal(im) ((im)->colorsTotal) +#define gdImageRed(im, c) ((im)->trueColor ? gdTrueColorGetRed(c) : \ + (im)->red[(c)]) +#define gdImageGreen(im, c) ((im)->trueColor ? gdTrueColorGetGreen(c) : \ + (im)->green[(c)]) +#define gdImageBlue(im, c) ((im)->trueColor ? gdTrueColorGetBlue(c) : \ + (im)->blue[(c)]) +#define gdImageAlpha(im, c) ((im)->trueColor ? gdTrueColorGetAlpha(c) : \ + (im)->alpha[(c)]) +#define gdImageGetTransparent(im) ((im)->transparent) +#define gdImageGetInterlaced(im) ((im)->interlace) + +/* These macros provide direct access to pixels in + palette-based and truecolor images, respectively. + If you use these macros, you must perform your own + bounds checking. Use of the macro for the correct type + of image is also your responsibility. */ +#define gdImagePalettePixel(im, x, y) (im)->pixels[(y)][(x)] +#define gdImageTrueColorPixel(im, x, y) (im)->tpixels[(y)][(x)] + +#define gdImageResolutionX(im) (im)->res_x +#define gdImageResolutionY(im) (im)->res_y + +/* I/O Support routines. */ + +BGD_DECLARE(gdIOCtx *) gdNewFileCtx (FILE *); +/* If data is null, size is ignored and an initial data buffer is + allocated automatically. NOTE: this function assumes gd has the right + to free or reallocate "data" at will! Also note that gd will free + "data" when the IO context is freed. If data is not null, it must point + to memory allocated with gdMalloc, or by a call to gdImage[something]Ptr. + If not, see gdNewDynamicCtxEx for an alternative. */ +BGD_DECLARE(gdIOCtx *) gdNewDynamicCtx (int size, void *data); +/* 2.0.21: if freeFlag is nonzero, gd will free and/or reallocate "data" as + needed as described above. If freeFlag is zero, gd will never free + or reallocate "data", which means that the context should only be used + for *reading* an image from a memory buffer, or writing an image to a + memory buffer which is already large enough. If the memory buffer is + not large enough and an image write is attempted, the write operation + will fail. Those wishing to write an image to a buffer in memory have + a much simpler alternative in the gdImage[something]Ptr functions. */ +BGD_DECLARE(gdIOCtx *) gdNewDynamicCtxEx (int size, void *data, int freeFlag); +BGD_DECLARE(gdIOCtx *) gdNewSSCtx (gdSourcePtr in, gdSinkPtr out); +BGD_DECLARE(void *) gdDPExtractData (struct gdIOCtx *ctx, int *size); + +#define GD2_CHUNKSIZE 128 +#define GD2_CHUNKSIZE_MIN 64 +#define GD2_CHUNKSIZE_MAX 4096 + +#define GD2_VERS 2 +#define GD2_ID "gd2" + +#define GD2_FMT_RAW 1 +#define GD2_FMT_COMPRESSED 2 + +/* Image comparison definitions */ +BGD_DECLARE(int) gdImageCompare (gdImagePtr im1, gdImagePtr im2); + +BGD_DECLARE(void) gdImageFlipHorizontal(gdImagePtr im); +BGD_DECLARE(void) gdImageFlipVertical(gdImagePtr im); +BGD_DECLARE(void) gdImageFlipBoth(gdImagePtr im); + +#define GD_FLIP_HORINZONTAL 1 +#define GD_FLIP_VERTICAL 2 +#define GD_FLIP_BOTH 3 + +/** + * Group: Crop + * + * Constants: gdCropMode + * GD_CROP_DEFAULT - Default crop mode (4 corners or background) + * GD_CROP_TRANSPARENT - Crop using the transparent color + * GD_CROP_BLACK - Crop black borders + * GD_CROP_WHITE - Crop white borders + * GD_CROP_SIDES - Crop using colors of the 4 corners + * + * See also: + * + **/ +enum gdCropMode { + GD_CROP_DEFAULT = 0, + GD_CROP_TRANSPARENT, + GD_CROP_BLACK, + GD_CROP_WHITE, + GD_CROP_SIDES, + GD_CROP_THRESHOLD +}; + +BGD_DECLARE(gdImagePtr) gdImageCrop(gdImagePtr src, const gdRect *crop); +BGD_DECLARE(gdImagePtr) gdImageCropAuto(gdImagePtr im, const unsigned int mode); +BGD_DECLARE(gdImagePtr) gdImageCropThreshold(gdImagePtr im, const unsigned int color, const float threshold); + +BGD_DECLARE(int) gdImageSetInterpolationMethod(gdImagePtr im, gdInterpolationMethod id); + +gdImagePtr gdImageScaleBilinear(gdImagePtr im, const unsigned int new_width, const unsigned int new_height); +gdImagePtr gdImageScaleBicubic(gdImagePtr src_img, const unsigned int new_width, const unsigned int new_height); +gdImagePtr gdImageScaleBicubicFixed(gdImagePtr src, const unsigned int width, const unsigned int height); +gdImagePtr gdImageScaleNearestNeighbour(gdImagePtr im, const unsigned int width, const unsigned int height); +gdImagePtr gdImageScaleTwoPass(const gdImagePtr pOrigImage, const unsigned int uOrigWidth, const unsigned int uOrigHeight, const unsigned int uNewWidth, const unsigned int uNewHeight); +BGD_DECLARE(gdImagePtr) gdImageScale(const gdImagePtr src, const unsigned int new_width, const unsigned int new_height); + +gdImagePtr gdImageRotate90(gdImagePtr src, int ignoretransparent); +gdImagePtr gdImageRotate180(gdImagePtr src, int ignoretransparent); +gdImagePtr gdImageRotate270(gdImagePtr src, int ignoretransparent); +gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees, const int bgColor); +gdImagePtr gdImageRotateBilinear(gdImagePtr src, const float degrees, const int bgColor); +gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, const float degrees, const int bgColor); +gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int bgColor); +BGD_DECLARE(gdImagePtr) gdImageRotateInterpolated(const gdImagePtr src, const float angle, int bgcolor); + +typedef enum { + GD_AFFINE_TRANSLATE = 0, + GD_AFFINE_SCALE, + GD_AFFINE_ROTATE, + GD_AFFINE_SHEAR_HORIZONTAL, + GD_AFFINE_SHEAR_VERTICAL +} gdAffineStandardMatrix; + +BGD_DECLARE(int) gdAffineApplyToPointF (gdPointFPtr dst, const gdPointFPtr src, const double affine[6]); +BGD_DECLARE(int) gdAffineInvert (double dst[6], const double src[6]); +BGD_DECLARE(int) gdAffineFlip (double dst_affine[6], const double src_affine[6], const int flip_h, const int flip_v); +BGD_DECLARE(int) gdAffineConcat (double dst[6], const double m1[6], const double m2[6]); + +BGD_DECLARE(int) gdAffineIdentity (double dst[6]); +BGD_DECLARE(int) gdAffineScale (double dst[6], const double scale_x, const double scale_y); +BGD_DECLARE(int) gdAffineRotate (double dst[6], const double angle); +BGD_DECLARE(int) gdAffineShearHorizontal (double dst[6], const double angle); +BGD_DECLARE(int) gdAffineShearVertical(double dst[6], const double angle); +BGD_DECLARE(int) gdAffineTranslate (double dst[6], const double offset_x, const double offset_y); +BGD_DECLARE(double) gdAffineExpansion (const double src[6]); +BGD_DECLARE(int) gdAffineRectilinear (const double src[6]); +BGD_DECLARE(int) gdAffineEqual (const double matrix1[6], const double matrix2[6]); +BGD_DECLARE(int) gdTransformAffineGetImage(gdImagePtr *dst, const gdImagePtr src, gdRectPtr src_area, const double affine[6]); +BGD_DECLARE(int) gdTransformAffineCopy(gdImagePtr dst, int dst_x, int dst_y, const gdImagePtr src, gdRectPtr src_region, const double affine[6]); +/* +gdTransformAffineCopy(gdImagePtr dst, int x0, int y0, int x1, int y1, + const gdImagePtr src, int src_width, int src_height, + const double affine[6]); +*/ +BGD_DECLARE(int) gdTransformAffineBoundingBox(gdRectPtr src, const double affine[6], gdRectPtr bbox); + +#define GD_CMP_IMAGE 1 /* Actual image IS different */ +#define GD_CMP_NUM_COLORS 2 /* Number of Colours in pallette differ */ +#define GD_CMP_COLOR 4 /* Image colours differ */ +#define GD_CMP_SIZE_X 8 /* Image width differs */ +#define GD_CMP_SIZE_Y 16 /* Image heights differ */ +#define GD_CMP_TRANSPARENT 32 /* Transparent colour */ +#define GD_CMP_BACKGROUND 64 /* Background colour */ +#define GD_CMP_INTERLACE 128 /* Interlaced setting */ +#define GD_CMP_TRUECOLOR 256 /* Truecolor vs palette differs */ + +/* resolution affects ttf font rendering, particularly hinting */ +#define GD_RESOLUTION 96 /* pixels per inch */ + +#ifdef __cplusplus +} +#endif + +/* newfangled special effects */ +#include "gdfx.h" + +#endif /* GD_H */ + +#ifdef __cplusplus +} +#endif debian/patches/subdir-objects.patch0000644000000000000000000000064212222240036014550 0ustar --- libgd2.orig/configure.ac +++ libgd2/configure.ac @@ -47,7 +47,7 @@ AC_SUBST(GDLIB_AGE) FEATURES="GD_GIF GD_GIFANIM GD_OPENPOLYGON" AC_SUBST(FEATURES) -AM_INIT_AUTOMAKE([foreign dist-bzip2 dist-xz -Wall -Werror]) +AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2 dist-xz -Wall -Werror]) AC_CONFIG_HEADERS([src/config.h:src/config.hin]) dnl newer automake wants this, but we still want to work with older debian/patches/gdlib-config-uses-pkgconfig.patch0000644000000000000000000000331212222240036017074 0ustar --- a/config/gdlib-config.in +++ b/config/gdlib-config.in @@ -2,14 +2,9 @@ # # Return information about the local GD library installation # -# Modeled after pdflib-config +# Modified to use pkgconfig -# installation directories -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ -bindir=@bindir@ +pkg=gdlib usage() { @@ -50,43 +45,43 @@ while test $# -gt 0; do case $1 in --libdir) - echo $libdir + pkg-config --variable=libdir ${pkg} ;; --includedir) - echo $includedir + pkg-config --variable=includedir ${pkg} ;; --version) - echo @VERSION@ + pkg-config --modversion ${pkg} ;; --majorversion) - echo @GDLIB_MAJOR@ + pkg-config --modversion ${pkg} | cut -f 1 -d . ;; --minorversion) - echo @GDLIB_MINOR@ + pkg-config --modversion ${pkg} | cut -f 2 -d . ;; --revision) - echo @GDLIB_REVISION@ + pkg-config --modversion ${pkg} | cut -f 3 -d . ;; --ldflags) - echo @LDFLAGS@ + pkg-config --libs-only-L ${pkg} ;; --libs) - echo -lgd @LIBS@ @LIBICONV@ + pkg-config --libs ${pkg} ;; --cflags|--includes) - echo -I@includedir@ + pkg-config --cflags ${pkg} ;; --features) echo @FEATURES@ ;; --all) - echo "GD library @VERSION@" - echo "includedir: $includedir" - echo "cflags: -I@includedir@" - echo "ldflags: @LDFLAGS@" - echo "libs: @LIBS@ @LIBICONV@" - echo "libdir: $libdir" - echo "features: @FEATURES@" + echo "GD library $($0 --version)@" + echo "includedir: $($0 --includedir)" + echo "cflags: $($0 --cflags)" + echo "ldflags: $($0 --ldflags)" + echo "libs: $($0 --libs)" + echo "libdir: $($0 --libdir)" + echo "features: $($0 --features)" ;; *) usage 1 1>&2 debian/gbp.conf0000644000000000000000000000023012222240036010571 0ustar # Configuration file for git-buildpackage and friends [DEFAULT] pristine-tar = True sign-tags = True debian-branch = master upstream-branch = upstream debian/compat0000644000000000000000000000000212222240036010355 0ustar 9