From 1f3a1e3f83772c4ccc91a723000fb2374014a4d2 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Wed, 18 Jan 2017 23:13:46 +0000 Subject: libgd 2.2.4 git-svn-id: svn://tug.org/texlive/trunk@42987 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/libs/gd/ChangeLog | 5 + Build/source/libs/gd/README | 3 +- Build/source/libs/gd/configure | 20 +- Build/source/libs/gd/libgd-PATCHES/ChangeLog | 7 + Build/source/libs/gd/libgd-PATCHES/TL-Changes | 2 +- Build/source/libs/gd/libgd-PATCHES/patch-01-win32 | 8 +- .../libs/gd/libgd-PATCHES/patch-02-no-stdcall | 8 +- Build/source/libs/gd/libgd-src/CMakeLists.txt | 5 +- Build/source/libs/gd/libgd-src/COPYING | 124 +- Build/source/libs/gd/libgd-src/ChangeLog | 145 -- Build/source/libs/gd/libgd-src/Makefile.am | 3 + Build/source/libs/gd/libgd-src/NEWS | 109 -- Build/source/libs/gd/libgd-src/cmake/distclean.sh | 46 + .../gd/libgd-src/cmake/modules/FindFreetype.cmake | 2 +- Build/source/libs/gd/libgd-src/config/test-driver | 15 +- Build/source/libs/gd/libgd-src/configure.ac | 4 +- .../libs/gd/libgd-src/docs/ChangeLog.historic | 145 ++ Build/source/libs/gd/libgd-src/docs/NEWS.historic | 109 ++ Build/source/libs/gd/libgd-src/docs/README.TESTING | 8 +- .../docs/naturaldocs/html/files/gd-c.html | 193 --- .../docs/naturaldocs/html/files/gd-h.html | 113 -- .../docs/naturaldocs/html/files/gd_bmp-c.html | 53 - .../naturaldocs/html/files/gd_color_map-c.html | 39 - .../naturaldocs/html/files/gd_color_match-c.html | 39 - .../docs/naturaldocs/html/files/gd_crop-c.html | 47 - .../docs/naturaldocs/html/files/gd_filename-c.html | 47 - .../docs/naturaldocs/html/files/gd_filter-c.html | 81 -- .../docs/naturaldocs/html/files/gd_gd-c.html | 57 - .../docs/naturaldocs/html/files/gd_gd2-c.html | 63 - .../docs/naturaldocs/html/files/gd_gif_in-c.html | 54 - .../docs/naturaldocs/html/files/gd_gif_out-c.html | 124 -- .../naturaldocs/html/files/gd_interpolation-c.html | 59 - .../docs/naturaldocs/html/files/gd_io-h.html | 56 - .../docs/naturaldocs/html/files/gd_io_dp-c.html | 47 - .../docs/naturaldocs/html/files/gd_io_file-c.html | 39 - .../docs/naturaldocs/html/files/gd_io_ss-c.html | 39 - .../docs/naturaldocs/html/files/gd_jpeg-c.html | 83 -- .../docs/naturaldocs/html/files/gd_matrix-c.html | 65 - .../docs/naturaldocs/html/files/gd_nnquant-c.html | 39 - .../docs/naturaldocs/html/files/gd_png-c.html | 77 - .../docs/naturaldocs/html/files/gd_ss-c.html | 45 - .../docs/naturaldocs/html/files/gd_tga-c.html | 47 - .../docs/naturaldocs/html/files/gd_tiff-c.html | 53 - .../docs/naturaldocs/html/files/gd_topal-c.html | 49 - .../naturaldocs/html/files/gd_transform-c.html | 47 - .../docs/naturaldocs/html/files/gd_version-c.html | 51 - .../docs/naturaldocs/html/files/gd_wbmp-c.html | 59 - .../docs/naturaldocs/html/files/gd_webp-c.html | 49 - .../docs/naturaldocs/html/files/gd_xbm-c.html | 51 - .../docs/naturaldocs/html/files/gdfontg-c.html | 39 - .../docs/naturaldocs/html/files/gdfontl-c.html | 39 - .../docs/naturaldocs/html/files/gdfontmb-c.html | 39 - .../docs/naturaldocs/html/files/gdfonts-c.html | 39 - .../docs/naturaldocs/html/files/gdfontt-c.html | 39 - .../docs/naturaldocs/html/files/gdft-c.html | 70 - .../docs/naturaldocs/html/files/gdfx-c.html | 47 - .../docs/naturaldocs/html/files/gdhelpers-c.html | 39 - .../docs/naturaldocs/html/files/gdxpm-c.html | 45 - .../docs/naturaldocs/html/files/license-txt.html | 108 -- .../docs/naturaldocs/html/files/preamble-txt.html | 89 -- .../gd/libgd-src/docs/naturaldocs/html/index.html | 1 - .../docs/naturaldocs/html/index/Constants.html | 34 - .../docs/naturaldocs/html/index/Files.html | 34 - .../docs/naturaldocs/html/index/Functions.html | 34 - .../docs/naturaldocs/html/index/General.html | 46 - .../docs/naturaldocs/html/index/General2.html | 34 - .../docs/naturaldocs/html/index/General3.html | 42 - .../docs/naturaldocs/html/index/Types.html | 34 - .../docs/naturaldocs/html/javascript/main.js | 841 ----------- .../docs/naturaldocs/html/javascript/prettify.js | 1526 -------------------- .../docs/naturaldocs/html/javascript/searchdata.js | 152 -- .../docs/naturaldocs/html/search/ConstantsG.html | 20 - .../docs/naturaldocs/html/search/FilesG.html | 20 - .../docs/naturaldocs/html/search/FunctionsG.html | 20 - .../docs/naturaldocs/html/search/GeneralA.html | 20 - .../docs/naturaldocs/html/search/GeneralC.html | 20 - .../docs/naturaldocs/html/search/GeneralF.html | 20 - .../docs/naturaldocs/html/search/GeneralG.html | 20 - .../docs/naturaldocs/html/search/GeneralL.html | 20 - .../docs/naturaldocs/html/search/GeneralM.html | 20 - .../naturaldocs/html/search/GeneralNumbers.html | 20 - .../docs/naturaldocs/html/search/GeneralT.html | 20 - .../docs/naturaldocs/html/search/NoResults.html | 15 - .../docs/naturaldocs/html/search/TypesG.html | 20 - .../docs/naturaldocs/html/styles/main.css | 828 ----------- .../docs/naturaldocs/images/edge_detect_quick.jpg | Bin 0 -> 22444 bytes .../libgd-src/docs/naturaldocs/images/emboss.jpg | Bin 0 -> 20811 bytes .../docs/naturaldocs/images/mean_removal.jpg | Bin 0 -> 27366 bytes .../libgd-src/docs/naturaldocs/images/smooth.jpg | Bin 0 -> 15528 bytes .../libs/gd/libgd-src/docs/naturaldocs/license.txt | 74 - .../libgd-src/docs/naturaldocs/project/.gitignore | 2 + .../naturaldocs/project/Data/ClassHierarchy.nd | Bin 7 -> 0 bytes .../naturaldocs/project/Data/ConfigFileInfo.nd | Bin 26 -> 0 bytes .../docs/naturaldocs/project/Data/FileInfo.nd | 96 -- .../docs/naturaldocs/project/Data/ImageFileInfo.nd | Bin 8 -> 0 bytes .../project/Data/ImageReferenceTable.nd | Bin 8 -> 0 bytes .../docs/naturaldocs/project/Data/IndexInfo.nd | Bin 187 -> 0 bytes .../naturaldocs/project/Data/PreviousMenuState.nd | Bin 3159 -> 0 bytes .../naturaldocs/project/Data/PreviousSettings.nd | Bin 122 -> 0 bytes .../docs/naturaldocs/project/Data/SymbolTable.nd | Bin 64315 -> 0 bytes .../docs/naturaldocs/project/Languages.txt | 113 -- .../gd/libgd-src/docs/naturaldocs/project/Menu.txt | 49 +- .../libgd-src/docs/naturaldocs/project/Topics.txt | 81 -- .../libgd-src/docs/naturaldocs/project/libgd.css | 9 + .../libs/gd/libgd-src/docs/naturaldocs/run_docs.sh | 6 +- Build/source/libs/gd/libgd-src/examples/Makefile | 498 ------- Build/source/libs/gd/libgd-src/m4/ax_pthread.m4 | 388 +++-- Build/source/libs/gd/libgd-src/src/CMakeLists.txt | 46 +- Build/source/libs/gd/libgd-src/src/Makefile.am | 10 + .../source/libs/gd/libgd-src/src/circletexttest.c | 2 + Build/source/libs/gd/libgd-src/src/config.hin | 3 +- Build/source/libs/gd/libgd-src/src/gd.c | 926 +++++++++--- Build/source/libs/gd/libgd-src/src/gd.h | 410 +++++- Build/source/libs/gd/libgd-src/src/gd_bmp.c | 58 +- Build/source/libs/gd/libgd-src/src/gd_color.c | 5 + Build/source/libs/gd/libgd-src/src/gd_crop.c | 91 +- Build/source/libs/gd/libgd-src/src/gd_filter.c | 201 ++- Build/source/libs/gd/libgd-src/src/gd_gd.c | 37 + Build/source/libs/gd/libgd-src/src/gd_gd2.c | 83 +- Build/source/libs/gd/libgd-src/src/gd_gif_in.c | 8 +- Build/source/libs/gd/libgd-src/src/gd_gif_out.c | 96 +- .../libs/gd/libgd-src/src/gd_interpolation.c | 188 ++- Build/source/libs/gd/libgd-src/src/gd_io_dp.c | 17 +- Build/source/libs/gd/libgd-src/src/gd_jpeg.c | 65 +- Build/source/libs/gd/libgd-src/src/gd_nnquant.c | 20 +- Build/source/libs/gd/libgd-src/src/gd_png.c | 58 +- Build/source/libs/gd/libgd-src/src/gd_rotate.c | 191 --- Build/source/libs/gd/libgd-src/src/gd_tga.c | 34 +- Build/source/libs/gd/libgd-src/src/gd_tiff.c | 38 +- Build/source/libs/gd/libgd-src/src/gd_topal.c | 108 +- Build/source/libs/gd/libgd-src/src/gd_transform.c | 56 +- Build/source/libs/gd/libgd-src/src/gd_wbmp.c | 22 +- Build/source/libs/gd/libgd-src/src/gd_webp.c | 188 ++- Build/source/libs/gd/libgd-src/src/gd_xbm.c | 23 +- Build/source/libs/gd/libgd-src/src/gdfontg.c | 17 +- Build/source/libs/gd/libgd-src/src/gdfontl.c | 17 +- Build/source/libs/gd/libgd-src/src/gdfontmb.c | 17 +- Build/source/libs/gd/libgd-src/src/gdfonts.c | 17 +- Build/source/libs/gd/libgd-src/src/gdfontt.c | 17 +- Build/source/libs/gd/libgd-src/src/gdft.c | 154 +- Build/source/libs/gd/libgd-src/src/gdfx.c | 83 +- Build/source/libs/gd/libgd-src/src/gdfx.h | 41 - Build/source/libs/gd/libgd-src/src/gdhelpers.c | 19 +- Build/source/libs/gd/libgd-src/src/gdxpm.c | 25 +- .../source/libs/gd/libgd-src/tests/CMakeLists.txt | 10 + Build/source/libs/gd/libgd-src/tests/Makefile.am | 13 +- .../libs/gd/libgd-src/tests/bmp/CMakeLists.txt | 2 + .../libs/gd/libgd-src/tests/bmp/Makemodule.am | 4 +- .../source/libs/gd/libgd-src/tests/bmp/bug00275.c | 53 + .../source/libs/gd/libgd-src/tests/bmp/bug00276.c | 32 + .../gd/libgd-src/tests/fontconfig/CMakeLists.txt | 7 + .../gd/libgd-src/tests/fontconfig/Makemodule.am | 9 + .../libs/gd/libgd-src/tests/fontconfig/basic.c | 33 + .../gd/libgd-src/tests/freetype/CMakeLists.txt | 2 +- .../libs/gd/libgd-src/tests/freetype/bug00132.c | 1 + .../libs/gd/libgd-src/tests/gd2/CMakeLists.txt | 4 + .../libs/gd/libgd-src/tests/gd2/Makemodule.am | 10 +- .../source/libs/gd/libgd-src/tests/gd2/bug00309.c | 37 + .../source/libs/gd/libgd-src/tests/gd2/bug00354.c | 32 + .../libs/gd/libgd-src/tests/gd2/bug00354a.gd2 | Bin 0 -> 92 bytes .../libs/gd/libgd-src/tests/gd2/bug00354b.gd2 | Bin 0 -> 18 bytes Build/source/libs/gd/libgd-src/tests/gd2/bug_289.c | 33 + .../libs/gd/libgd-src/tests/gd2/php_bug_72339.c | 31 +- .../gd/libgd-src/tests/gd2/php_bug_72339_exp.gd2 | Bin 67108882 -> 0 bytes .../gd/libgd-src/tests/gd2/too_few_image_data.c | 22 + .../gd/libgd-src/tests/gd2/too_few_image_data.gd2 | Bin 0 -> 1050 bytes .../tests/gdimagebrightness/CMakeLists.txt | 5 + .../tests/gdimagebrightness/Makemodule.am | 10 + .../tests/gdimagebrightness/basic+100.png | Bin 0 -> 2028 bytes .../tests/gdimagebrightness/basic-100.png | Bin 0 -> 2004 bytes .../gd/libgd-src/tests/gdimagebrightness/basic.c | 41 + .../gd/libgd-src/tests/gdimagebrightness/basic.png | Bin 0 -> 2009 bytes .../gd/libgd-src/tests/gdimageclone/CMakeLists.txt | 5 + .../gd/libgd-src/tests/gdimageclone/Makemodule.am | 5 + .../gd/libgd-src/tests/gdimageclone/bug00300.c | 32 + .../gd/libgd-src/tests/gdimagecolor/CMakeLists.txt | 5 + .../gd/libgd-src/tests/gdimagecolor/Makemodule.am | 9 + .../libs/gd/libgd-src/tests/gdimagecolor/basic.c | 29 + .../libs/gd/libgd-src/tests/gdimagecolor/basic.png | Bin 0 -> 2092 bytes .../gd/libgd-src/tests/gdimagecolor/basic_exp.png | Bin 0 -> 2140 bytes .../libgd-src/tests/gdimagecontrast/CMakeLists.txt | 5 + .../libgd-src/tests/gdimagecontrast/Makemodule.am | 10 + .../libgd-src/tests/gdimagecontrast/basic+50.png | Bin 0 -> 2024 bytes .../libgd-src/tests/gdimagecontrast/basic-50.png | Bin 0 -> 2034 bytes .../gd/libgd-src/tests/gdimagecontrast/basic.c | 41 + .../gd/libgd-src/tests/gdimagecontrast/basic.png | Bin 0 -> 2009 bytes .../tests/gdimageconvolution/CMakeLists.txt | 5 + .../tests/gdimageconvolution/Makemodule.am | 12 + .../gd/libgd-src/tests/gdimageconvolution/basic.c | 62 + .../libgd-src/tests/gdimageconvolution/basic.png | Bin 0 -> 49446 bytes .../gdimageconvolution/basic_edge_detect_quick.png | Bin 0 -> 42824 bytes .../tests/gdimageconvolution/basic_emboss.png | Bin 0 -> 36783 bytes .../gdimageconvolution/basic_mean_removal.png | Bin 0 -> 45395 bytes .../tests/gdimageconvolution/basic_smooth.png | Bin 0 -> 24595 bytes .../libgd-src/tests/gdimagecopyrotated/bug00020.c | 5 +- .../libgd-src/tests/gdimagecreate/CMakeLists.txt | 5 + .../gd/libgd-src/tests/gdimagecreate/Makemodule.am | 5 + .../gd/libgd-src/tests/gdimagecreate/bug00340.c | 33 + .../gd/libgd-src/tests/gdimagecrop/CMakeLists.txt | 1 + .../gd/libgd-src/tests/gdimagecrop/Makemodule.am | 1 + .../libs/gd/libgd-src/tests/gdimagecrop/bug00297.c | 28 + .../gd/libgd-src/tests/gdimagefile/gdnametest.c | 5 +- .../tests/gdimagefilledpolygon/CMakeLists.txt | 1 + .../tests/gdimagefilledpolygon/Makemodule.am | 6 +- .../tests/gdimagefilledpolygon/self_intersecting.c | 31 + .../gdimagefilledpolygon/self_intersecting_exp.png | Bin 0 -> 379 bytes .../gd/libgd-src/tests/gdimageflip/CMakeLists.txt | 5 + .../gd/libgd-src/tests/gdimageflip/Makemodule.am | 11 + .../gd/libgd-src/tests/gdimageflip/gdimageflip.c | 37 + .../tests/gdimageflip/gdimageflipboth_exp.png | Bin 0 -> 30307 bytes .../gdimageflip/gdimagefliphorizontal_exp.png | Bin 0 -> 30297 bytes .../tests/gdimageflip/gdimageflipvertical_exp.png | Bin 0 -> 30405 bytes .../libs/gd/libgd-src/tests/gdimageflip/remi.png | Bin 0 -> 49446 bytes .../tests/gdimagegrayscale/CMakeLists.txt | 5 + .../libgd-src/tests/gdimagegrayscale/Makemodule.am | 9 + .../gd/libgd-src/tests/gdimagegrayscale/basic.c | 29 + .../gd/libgd-src/tests/gdimagegrayscale/basic.png | Bin 0 -> 2009 bytes .../libgd-src/tests/gdimagegrayscale/basic_exp.png | Bin 0 -> 2092 bytes .../gd/libgd-src/tests/gdimageline/CMakeLists.txt | 2 + .../libgd-src/tests/gdimagenegate/CMakeLists.txt | 5 + .../gd/libgd-src/tests/gdimagenegate/Makemodule.am | 9 + .../libs/gd/libgd-src/tests/gdimagenegate/basic.c | 29 + .../gd/libgd-src/tests/gdimagenegate/basic.png | Bin 0 -> 2009 bytes .../gd/libgd-src/tests/gdimagenegate/basic_exp.png | Bin 0 -> 2014 bytes .../tests/gdimagerectangle/CMakeLists.txt | 2 + .../libgd-src/tests/gdimagerectangle/Makemodule.am | 7 +- .../gd/libgd-src/tests/gdimagerectangle/bug00299.c | 32 + .../tests/gdimagerectangle/bug00299_exp.png | Bin 0 -> 133 bytes .../tests/gdimagerectangle/point_ordering.c | 76 + .../libgd-src/tests/gdimagerotate/CMakeLists.txt | 1 + .../gd/libgd-src/tests/gdimagerotate/Makemodule.am | 5 +- .../libgd-src/tests/gdimagerotate/php_bug_65070.c | 35 + .../tests/gdimagerotate/php_bug_65070.gif | Bin 0 -> 8424 bytes .../tests/gdimagerotate/php_bug_65070_exp.png | Bin 0 -> 32722 bytes .../gd/libgd-src/tests/gdimagescale/CMakeLists.txt | 2 + .../gd/libgd-src/tests/gdimagescale/Makemodule.am | 2 + .../gd/libgd-src/tests/gdimagescale/bug00329.c | 53 + .../gd/libgd-src/tests/gdimagescale/bug00330.c | 32 + .../libgd-src/tests/gdimagesetpixel/CMakeLists.txt | 1 + .../libgd-src/tests/gdimagesetpixel/Makemodule.am | 4 +- .../tests/gdimagesetpixel/alpha_blending.c | 54 + .../tests/gdimagesetpixel/alphablending_exp.png | Bin 0 -> 682 bytes .../tests/gdimagestringft/gdimagestringft_bbox.c | 1 + .../gdimagestringftex_returnfontpathname.c | 1 + .../tests/gdimagetruecolortopalette/CMakeLists.txt | 7 + .../tests/gdimagetruecolortopalette/Makemodule.am | 9 +- .../tests/gdimagetruecolortopalette/bug00307.c | 26 + .../gdimagetruecolortopalette/php_bug_67325.c | 38 + .../gdimagetruecolortopalette/php_bug_67325.jpeg | Bin 0 -> 13608 bytes .../gdimagetruecolortopalette/php_bug_72512.c | 2 +- .../libs/gd/libgd-src/tests/gdtest/CMakeLists.txt | 3 +- .../libs/gd/libgd-src/tests/gdtest/Makemodule.am | 3 +- .../source/libs/gd/libgd-src/tests/gdtest/gdtest.c | 5 +- .../source/libs/gd/libgd-src/tests/gdtest/gdtest.h | 3 +- .../gd/libgd-src/tests/gdtest/test_config.h.cmake | 4 - .../source/libs/gd/libgd-src/tests/gif/bug00006.c | 4 + .../libs/gd/libgd-src/tests/test_config.h.in | 9 - .../libs/gd/libgd-src/tests/tga/CMakeLists.txt | 2 + .../libs/gd/libgd-src/tests/tga/Makemodule.am | 11 +- .../libs/gd/libgd-src/tests/tga/heap_overflow.c | 59 + .../gd/libgd-src/tests/tga/heap_overflow_1.tga | Bin 0 -> 605 bytes .../gd/libgd-src/tests/tga/heap_overflow_2.tga | Bin 0 -> 8746 bytes .../source/libs/gd/libgd-src/tests/tga/tga_read.c | 40 + .../libs/gd/libgd-src/tests/tga/tga_read_rgb.png | Bin 0 -> 2349 bytes .../libs/gd/libgd-src/tests/tga/tga_read_rgb.tga | Bin 0 -> 90444 bytes .../gd/libgd-src/tests/tga/tga_read_rgb_rle.tga | Bin 0 -> 9987 bytes .../libs/gd/libgd-src/tests/tiff/CMakeLists.txt | 1 + .../libs/gd/libgd-src/tests/tiff/Makemodule.am | 6 +- .../source/libs/gd/libgd-src/tests/tiff/tiff_dpi.c | 6 +- .../gd/libgd-src/tests/tiff/tiff_invalid_read.c | 61 + .../libgd-src/tests/tiff/tiff_invalid_read_1.tiff | Bin 0 -> 3304 bytes .../libgd-src/tests/tiff/tiff_invalid_read_2.tiff | Bin 0 -> 429 bytes .../libgd-src/tests/tiff/tiff_invalid_read_3.tiff | Bin 0 -> 428 bytes .../libs/gd/libgd-src/tests/webp/CMakeLists.txt | 1 + .../libs/gd/libgd-src/tests/webp/Makemodule.am | 6 +- .../libs/gd/libgd-src/tests/webp/bug_double_free.c | 29 + .../gd/libgd-src/tests/webp/bug_double_free.jpg | Bin 0 -> 576 bytes Build/source/libs/gd/libgd-src/windows/Makefile.vc | 84 +- Build/source/libs/gd/version.ac | 2 +- 279 files changed, 4765 insertions(+), 8631 deletions(-) delete mode 100644 Build/source/libs/gd/libgd-src/ChangeLog delete mode 100644 Build/source/libs/gd/libgd-src/NEWS create mode 100755 Build/source/libs/gd/libgd-src/cmake/distclean.sh create mode 100644 Build/source/libs/gd/libgd-src/docs/ChangeLog.historic create mode 100644 Build/source/libs/gd/libgd-src/docs/NEWS.historic delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd-h.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_bmp-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_color_map-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_color_match-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_crop-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_filename-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_filter-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gd-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gd2-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gif_in-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gif_out-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_interpolation-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io-h.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io_dp-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io_file-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io_ss-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_jpeg-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_matrix-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_nnquant-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_png-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_ss-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_tga-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_tiff-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_topal-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_transform-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_version-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_wbmp-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_webp-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_xbm-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontg-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontl-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontmb-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfonts-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontt-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdft-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfx-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdhelpers-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdxpm-c.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/license-txt.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/preamble-txt.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Constants.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Files.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Functions.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/General.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/General2.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/General3.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Types.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/javascript/main.js delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/javascript/prettify.js delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/javascript/searchdata.js delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/ConstantsG.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/FilesG.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/FunctionsG.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralA.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralC.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralF.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralG.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralL.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralM.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralNumbers.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralT.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/NoResults.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/TypesG.html delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/html/styles/main.css create mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/images/edge_detect_quick.jpg create mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/images/emboss.jpg create mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/images/mean_removal.jpg create mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/images/smooth.jpg delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/license.txt create mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/project/.gitignore delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ClassHierarchy.nd delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ConfigFileInfo.nd delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/FileInfo.nd delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ImageFileInfo.nd delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ImageReferenceTable.nd delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/IndexInfo.nd delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/PreviousMenuState.nd delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/PreviousSettings.nd delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/SymbolTable.nd delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Languages.txt delete mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Topics.txt create mode 100644 Build/source/libs/gd/libgd-src/docs/naturaldocs/project/libgd.css delete mode 100644 Build/source/libs/gd/libgd-src/examples/Makefile create mode 100644 Build/source/libs/gd/libgd-src/tests/bmp/bug00275.c create mode 100644 Build/source/libs/gd/libgd-src/tests/bmp/bug00276.c create mode 100644 Build/source/libs/gd/libgd-src/tests/fontconfig/CMakeLists.txt create mode 100644 Build/source/libs/gd/libgd-src/tests/fontconfig/Makemodule.am create mode 100644 Build/source/libs/gd/libgd-src/tests/fontconfig/basic.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gd2/bug00309.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gd2/bug00354.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gd2/bug00354a.gd2 create mode 100644 Build/source/libs/gd/libgd-src/tests/gd2/bug00354b.gd2 create mode 100644 Build/source/libs/gd/libgd-src/tests/gd2/bug_289.c delete mode 100644 Build/source/libs/gd/libgd-src/tests/gd2/php_bug_72339_exp.gd2 create mode 100644 Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.gd2 create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagebrightness/CMakeLists.txt create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagebrightness/Makemodule.am create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic+100.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic-100.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageclone/CMakeLists.txt create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageclone/Makemodule.am create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageclone/bug00300.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecolor/CMakeLists.txt create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecolor/Makemodule.am create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecolor/basic.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecolor/basic.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecolor/basic_exp.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecontrast/CMakeLists.txt create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecontrast/Makemodule.am create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic+50.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic-50.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageconvolution/CMakeLists.txt create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageconvolution/Makemodule.am create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_edge_detect_quick.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_emboss.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_mean_removal.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_smooth.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecreate/CMakeLists.txt create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecreate/Makemodule.am create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecreate/bug00340.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagecrop/bug00297.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/self_intersecting.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/self_intersecting_exp.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageflip/CMakeLists.txt create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageflip/Makemodule.am create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimageflip.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimageflipboth_exp.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimagefliphorizontal_exp.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimageflipvertical_exp.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimageflip/remi.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/CMakeLists.txt create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/Makemodule.am create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/basic.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/basic.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/basic_exp.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagenegate/CMakeLists.txt create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagenegate/Makemodule.am create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagenegate/basic.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagenegate/basic.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagenegate/basic_exp.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00299.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00299_exp.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagerectangle/point_ordering.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagerotate/php_bug_65070.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagerotate/php_bug_65070.gif create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagerotate/php_bug_65070_exp.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagescale/bug00329.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagescale/bug00330.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/alpha_blending.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/alphablending_exp.png create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/bug00307.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/php_bug_67325.c create mode 100644 Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/php_bug_67325.jpeg delete mode 100644 Build/source/libs/gd/libgd-src/tests/gdtest/test_config.h.cmake delete mode 100644 Build/source/libs/gd/libgd-src/tests/test_config.h.in create mode 100644 Build/source/libs/gd/libgd-src/tests/tga/heap_overflow.c create mode 100644 Build/source/libs/gd/libgd-src/tests/tga/heap_overflow_1.tga create mode 100644 Build/source/libs/gd/libgd-src/tests/tga/heap_overflow_2.tga create mode 100644 Build/source/libs/gd/libgd-src/tests/tga/tga_read.c create mode 100644 Build/source/libs/gd/libgd-src/tests/tga/tga_read_rgb.png create mode 100644 Build/source/libs/gd/libgd-src/tests/tga/tga_read_rgb.tga create mode 100644 Build/source/libs/gd/libgd-src/tests/tga/tga_read_rgb_rle.tga create mode 100644 Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read.c create mode 100644 Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read_1.tiff create mode 100644 Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read_2.tiff create mode 100644 Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read_3.tiff create mode 100644 Build/source/libs/gd/libgd-src/tests/webp/bug_double_free.c create mode 100644 Build/source/libs/gd/libgd-src/tests/webp/bug_double_free.jpg (limited to 'Build/source/libs/gd') diff --git a/Build/source/libs/gd/ChangeLog b/Build/source/libs/gd/ChangeLog index c32e3c9bba7..eac43050676 100644 --- a/Build/source/libs/gd/ChangeLog +++ b/Build/source/libs/gd/ChangeLog @@ -1,3 +1,8 @@ +2017-01-18 Akira Kakuto + + Import libgd-2.2.4. + * version.ac: Adapted. + 2016-12-23 Akira Kakuto Import libgd-2.2.3. diff --git a/Build/source/libs/gd/README b/Build/source/libs/gd/README index 7cedac7adc4..c7ad44851a0 100644 --- a/Build/source/libs/gd/README +++ b/Build/source/libs/gd/README @@ -1,4 +1,4 @@ - Building libgd-2.2.3 as part of the TL tree + Building libgd-2.2.4 as part of the TL tree ========================================= This directory libs/gd/ uses a proxy Makefile.am to build the gd library @@ -11,3 +11,4 @@ been copied to libs/gd/configure.ac. ============================= 2013-06-26 Peter Breitenlohner +2017-01-18 Akira Kakuto diff --git a/Build/source/libs/gd/configure b/Build/source/libs/gd/configure index d6eee516a48..3de2d3fd573 100755 --- a/Build/source/libs/gd/configure +++ b/Build/source/libs/gd/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gd (TeX Live) 2.2.3. +# Generated by GNU Autoconf 2.69 for gd (TeX Live) 2.2.4. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gd (TeX Live)' PACKAGE_TARNAME='gd--tex-live-' -PACKAGE_VERSION='2.2.3' -PACKAGE_STRING='gd (TeX Live) 2.2.3' +PACKAGE_VERSION='2.2.4' +PACKAGE_STRING='gd (TeX Live) 2.2.4' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1306,7 +1306,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gd (TeX Live) 2.2.3 to adapt to many kinds of systems. +\`configure' configures gd (TeX Live) 2.2.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1376,7 +1376,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gd (TeX Live) 2.2.3:";; + short | recursive ) echo "Configuration of gd (TeX Live) 2.2.4:";; esac cat <<\_ACEOF @@ -1485,7 +1485,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gd (TeX Live) configure 2.2.3 +gd (TeX Live) configure 2.2.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1908,7 +1908,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gd (TeX Live) $as_me 2.2.3, which was +It was created by gd (TeX Live) $as_me 2.2.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3831,7 +3831,7 @@ fi # Define the identity of the package. PACKAGE='gd--tex-live-' - VERSION='2.2.3' + VERSION='2.2.4' cat >>confdefs.h <<_ACEOF @@ -6569,7 +6569,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gd (TeX Live) $as_me 2.2.3, which was +This file was extended by gd (TeX Live) $as_me 2.2.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6635,7 +6635,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gd (TeX Live) config.status 2.2.3 +gd (TeX Live) config.status 2.2.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/libs/gd/libgd-PATCHES/ChangeLog b/Build/source/libs/gd/libgd-PATCHES/ChangeLog index 3f42e531be3..db52775694e 100644 --- a/Build/source/libs/gd/libgd-PATCHES/ChangeLog +++ b/Build/source/libs/gd/libgd-PATCHES/ChangeLog @@ -1,3 +1,10 @@ +2017-01-18 Akira Kakuto + + Import libgd-2.2.4 source tree from: + https://github.com/libgd/libgd/releases + * patch-01-win32: Adapted. + * patch-02-no-stdcall: Adapted. + 2016-12-23 Akira Kakuto Import libgd-2.2.3 source tree from: diff --git a/Build/source/libs/gd/libgd-PATCHES/TL-Changes b/Build/source/libs/gd/libgd-PATCHES/TL-Changes index d1699630241..21b8cec668a 100644 --- a/Build/source/libs/gd/libgd-PATCHES/TL-Changes +++ b/Build/source/libs/gd/libgd-PATCHES/TL-Changes @@ -1,4 +1,4 @@ -Changes applied to the libgd-2.2.3/ tree as obtained from: +Changes applied to the libgd-2.2.4/ tree as obtained from: https://github.com/libgd/libgd/releases Removed: diff --git a/Build/source/libs/gd/libgd-PATCHES/patch-01-win32 b/Build/source/libs/gd/libgd-PATCHES/patch-01-win32 index 9381e137726..814ed38e1e9 100644 --- a/Build/source/libs/gd/libgd-PATCHES/patch-01-win32 +++ b/Build/source/libs/gd/libgd-PATCHES/patch-01-win32 @@ -1,7 +1,7 @@ -diff -ur libgd-2.2.3.orig/src/gdft.c libgd-2.2.3/src/gdft.c ---- libgd-2.2.3.orig/src/gdft.c Thu Jul 21 17:32:27 2016 -+++ libgd-2.2.3/src/gdft.c Fri Dec 23 23:08:05 2016 -@@ -1646,6 +1646,16 @@ +diff -ur libgd-2.2.4.orig/src/gdft.c libgd-2.2.4/src/gdft.c +--- libgd-2.2.4.orig/src/gdft.c Wed Jan 18 20:01:19 2017 ++++ libgd-2.2.4/src/gdft.c Thu Jan 19 07:20:24 2017 +@@ -1683,6 +1683,16 @@ */ *fontpath = NULL; fontsearchpath = getenv ("GDFONTPATH"); diff --git a/Build/source/libs/gd/libgd-PATCHES/patch-02-no-stdcall b/Build/source/libs/gd/libgd-PATCHES/patch-02-no-stdcall index 7f2b0c623cd..efde64e3ccf 100644 --- a/Build/source/libs/gd/libgd-PATCHES/patch-02-no-stdcall +++ b/Build/source/libs/gd/libgd-PATCHES/patch-02-no-stdcall @@ -1,6 +1,6 @@ -diff -ur libgd-2.2.3.orig/src/gd.h libgd-2.2.3/src/gd.h ---- libgd-2.2.3.orig/src/gd.h Thu Jul 21 17:32:27 2016 -+++ libgd-2.2.3/src/gd.h Fri Dec 23 23:10:00 2016 +diff -ur libgd-2.2.4.orig/src/gd.h libgd-2.2.4/src/gd.h +--- libgd-2.2.4.orig/src/gd.h Wed Jan 18 20:01:19 2017 ++++ libgd-2.2.4/src/gd.h Thu Jan 19 07:22:18 2017 @@ -63,7 +63,7 @@ # define BGD_EXPORT_DATA_PROT __declspec(dllimport) # endif @@ -9,4 +9,4 @@ diff -ur libgd-2.2.3.orig/src/gd.h libgd-2.2.3/src/gd.h +# define BGD_STDCALL # define BGD_EXPORT_DATA_IMPL #else - # if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY==1 + # if defined(__GNUC__) || defined(__clang__) diff --git a/Build/source/libs/gd/libgd-src/CMakeLists.txt b/Build/source/libs/gd/libgd-src/CMakeLists.txt index d1c2fc1a458..42934d06ec2 100644 --- a/Build/source/libs/gd/libgd-src/CMakeLists.txt +++ b/Build/source/libs/gd/libgd-src/CMakeLists.txt @@ -193,7 +193,8 @@ else (USE_EXT_GD) CONFIGURE_FILE(${GD_SOURCE_DIR}/src/config.h.cmake ${GD_SOURCE_DIR}/src/config.h ESCAPE_QUOTES) - option(BUILD_SHARED_LIBS "Build both shared and static libs" ON) + option(BUILD_SHARED_LIBS "Build shared libs" ON) + option(BUILD_STATIC_LIBS "Build static libs" OFF) if (WIN32) SET(GD_LIB libgd) @@ -225,6 +226,8 @@ endif (USE_EXT_GD) add_subdirectory(tests) add_subdirectory(examples) +add_custom_target(distclean ${GD_SOURCE_DIR}/cmake/distclean.sh) + SET(CPACK_PACKAGE_NAME "libgd") SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "libGD, powerful and easy to use graphic library") SET(CPACK_PACKAGE_VENDOR "http://www.libgd.org") diff --git a/Build/source/libs/gd/libgd-src/COPYING b/Build/source/libs/gd/libgd-src/COPYING index 5e17d03e861..725d1b545d2 100644 --- a/Build/source/libs/gd/libgd-src/COPYING +++ b/Build/source/libs/gd/libgd-src/COPYING @@ -1,53 +1,73 @@ - - Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002 by Cold Spring Harbor Laboratory. Funded under Grant - P41-RR02188 by the National Institutes of Health. - - Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 by - Boutell.Com, Inc. - - Portions relating to GD2 format copyright 1999, 2000, 2001, 2002 - Philip Warner. - - Portions relating to PNG copyright 1999, 2000, 2001, 2002 Greg - Roelofs. - - Portions relating to gdttf.c copyright 1999, 2000, 2001, 2002 John - Ellson (ellson@lucent.com). - - Portions relating to gdft.c copyright 2001, 2002 John Ellson - (ellson@lucent.com). - - Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 - Pierre-Alain Joye (pierre@libgd.org). - - Portions relating to JPEG and to color quantization copyright 2000, - 2001, 2002, Doug Becker and copyright (C) 1994, 1995, 1996, 1997, - 1998, 1999, 2000, 2001, 2002, Thomas G. Lane. This software is - based in part on the work of the Independent JPEG Group. See the - file README-JPEG.TXT for more information. - - Portions relating to WBMP copyright 2000, 2001, 2002 Maurice - Szmurlo and Johan Van den Brande. - - Permission has been granted to copy, distribute and modify gd in - any context without fee, including a commercial application, - provided that this notice is present in user-accessible supporting - documentation. - - This does not affect your ownership of the derived work itself, and - the intent is to assure proper credit for the authors of gd, not to - interfere with your productive use of gd. If you have questions, - ask. "Derived works" includes all programs that utilize the - library. Credit must be given in user-accessible documentation. - - This software is provided "AS IS." The copyright holders disclaim - all warranties, either express or implied, including but not - limited to implied warranties of merchantability and fitness for a - particular purpose, with respect to this code and accompanying - documentation. - - Although their code does not appear in gd, the authors wish to thank - David Koblas, David Rowley, and Hutchison Avenue Software Corporation - for their prior contributions. +Credits and license terms: + +In order to resolve any possible confusion regarding the authorship of +gd, the following copyright statement covers all of the authors who +have required such a statement. If you are aware of any oversights in +this copyright notice, please contact Pierre-A. Joye who will be +pleased to correct them. + +* Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, + 2002, 2003, 2004 by Cold Spring Harbor Laboratory. Funded under + Grant P41-RR02188 by the National Institutes of Health. + +* Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, + 2004 by Boutell.Com, Inc. + +* Portions relating to GD2 format copyright 1999, 2000, 2001, 2002, + 2003, 2004 Philip Warner. + +* Portions relating to PNG copyright 1999, 2000, 2001, 2002, 2003, + 2004 Greg Roelofs. + +* Portions relating to gdttf.c copyright 1999, 2000, 2001, 2002, + 2003, 2004 John Ellson (ellson@graphviz.org). + +* Portions relating to gdft.c copyright 2001, 2002, 2003, 2004 John + Ellson (ellson@graphviz.org). + +* Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Pierre-Alain Joye (pierre@libgd.org). + +* Portions relating to JPEG and to color quantization copyright + 2000, 2001, 2002, 2003, 2004, Doug Becker and copyright (C) 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Thomas + G. Lane. This software is based in part on the work of the + Independent JPEG Group. See the file README-JPEG.TXT for more + information. + +* Portions relating to GIF compression copyright 1989 by Jef + Poskanzer and David Rowley, with modifications for thread safety + by Thomas Boutell. + +* Portions relating to GIF decompression copyright 1990, 1991, 1993 + by David Koblas, with modifications for thread safety by Thomas + Boutell. + +* Portions relating to WBMP copyright 2000, 2001, 2002, 2003, 2004 + Maurice Szmurlo and Johan Van den Brande. + +* Portions relating to GIF animations copyright 2004 Jaakko Hyvätti + (jaakko.hyvatti@iki.fi) + +Permission has been granted to copy, distribute and modify gd in +any context without fee, including a commercial application, +provided that this notice is present in user-accessible supporting +documentation. + +This does not affect your ownership of the derived work itself, +and the intent is to assure proper credit for the authors of gd, +not to interfere with your productive use of gd. If you have +questions, ask. "Derived works" includes all programs that utilize +the library. Credit must be given in user-accessible +documentation. + +This software is provided "AS IS." The copyright holders disclaim +all warranties, either express or implied, including but not +limited to implied warranties of merchantability and fitness for a +particular purpose, with respect to this code and accompanying +documentation. + +Although their code does not appear in the current release, the +authors wish to thank David Koblas, David Rowley, and Hutchison +Avenue Software Corporation for their prior contributions. diff --git a/Build/source/libs/gd/libgd-src/ChangeLog b/Build/source/libs/gd/libgd-src/ChangeLog deleted file mode 100644 index c5c453c4724..00000000000 --- a/Build/source/libs/gd/libgd-src/ChangeLog +++ /dev/null @@ -1,145 +0,0 @@ -4d29684 CVE-2015-8874 -fe199ed release gd-2.2.0 -6556574 ChangeLog: update for gd-2.2 branching -c6c52b3 dist: drop bzip2 tarball -7932944 libtool: set revision based on package version -119b38e travis: switch to the local bootstrap script -f79d0a8 m4: use an older openmp macro -e6bf771 docs: clean up a bit and support `NaturalDocs` -c9a4a85 libimagequant: fix integration -6e054c4 gdlib-config: mark it as deprecated #140 -b64c996 build: fix GDLIB_REVISION collision -10a4915 tests: rework handling of temp output files -1239832 configure/cmake: unify header checks and config.h generation -32c5072 bootstrap: switch to autoreconf -f7471f2 tests: add missing gdimagesetpixel tests -e59a0e8 tests: add missing test files to dist -2733b62 tga: cleanup/simplify a bit -96d5687 tga: fix two memory corruption bugs #159 -8f50777 tests: get working under lsan (leak sanitizer) -e530663 png: fix some memory leaks w/invalid images -82b80dc gif: avoid out-of-bound reads of masks array #209 -4dc1a2d xbm: avoid stack overflow (read) with large names #211 -b083ec1 cmake: update build files to match autotools more -2db153a webpng: rewrite & cleanup to use getopt -b12f217 configure: enable -Werror by default when available -75c38f6 fix various gcc/clang warnings found with -Wall -8bdfede cmake: document the common build/install steps #179 -6f3552d travis: drop multiarch settings -d549193 travis: drop nasm apt install -cd15d9b drop unused make_drone.io -b32324d travis: enable the clang compiler -05d70f6 tests: fix leaks in test code -4e61c9b tiff: fix leak in gdImageCreateFromTiffCtx() -658f168 gd2: fix double free when processing invalid headers -0315e44 tests: gd2: add general read test helpers #208 -3c47bb4 tests: do not build libgdtest.a all the time -09d2d01 webp: fix double free -cd1d964 libgd: update & sort cmake installed headers #164 -161ac24 travis: rework & improve main script logic -613e8c9 tests: split up makefile entries -92c3209 tests: fix distclean errors -3768c9e travis: switch to non-sudo mode -adc8598 tests: unify cmake test code into a single macro -ef9b000 build: handle renamed README file -e16310b libgd: update & sort source lists -a44e1ba tests: gdimageline: add missing -lm linkage -3b0eabf tests: add missing cmake files gdimagefile/gdimagefilter -4c6a07b gitignore: split up test entries -6455304 tests: drop EXTRA_PROGRAMS -982d488 revert... unneeded -a5b5c27 Fix memory leak -2bb97f4 gd2: handle corrupt images better (CVE-2016-3074) -fc14a8c README: document supported image formats -5277b6f Merge pull request #199 from mattbo/tiff_dpi_support -4e53ed7 Added support for reading and writing TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION. Includes a unit test. -6913dd3 bmp: use double variant of ceil func -f29f7db Merge pull request #198 from sherif-elmetainy/master -e87ec88 :fix and unit test for crash issue in gdImageFillTiled -258dbf2 README: link to the CONTRIBUTORS file -6895576 README: reformat in markdown for better github display -73ab7c7 Merge pull request #182 from leoyanggit/fix_build_static -e08acb0 Merge pull request #153 from davidchappelle/master -78dad44 circletexttest: check image creation return value -a9346dd travis: build/check in parallel -e5d1e9d Fail Travis builds if make check fails -b6211d9 tests: fix build failures when jpeg/freetype are disabled -3667974 Merge pull request #193 from vapier/master -f732d74 Merge pull request #194 from jasonwilliams200OK/master -859bcf7 git,repo: Ignore build spew. -10a8761 Merge pull request #192 from jasonwilliams200OK/master -8f69034 code: Adds missing methods for absent libz case. -a4f5d5d configure: unify library tests -a9205e5 configure: require autoconf-2.64/automake-1.11 -2e04a67 win: Use an external snprintf hook. -9104bba configure: use AS_HELP_STRING everywhere -1dc5280 Merge pull request #191 from jitendarKumar/patch-8 -dd48286 Logical Operation && has no Impact on expression result . -52dad8b Update git ignore file to exclude cmake build directory -9ea3097 Prevent duplicate macro definition errors/warnings -40f42c0 Fix compiler warnings when checking interpolation_id -7147b64 Make BUILD_SHARED_LIBS configurable -4751b60 gdImageScaleTwoPass memory leak fix -4e1ce66 Merge pull request #166 from jitendarKumar/patch-5 -1219113 Merge pull request #155 from jitendarKumar/patch-2 -38e016f Merge pull request #156 from jitendarKumar/patch-3 -4e70131 Merge pull request #157 from jitendarKumar/patch-4 -895be03 Indentation corrected. -7b6261c Dereference null return value in gdtest.c -7297c94 Merge pull request #163 from wangkun611/webp_cmake -917fa11 fix CMake error when ENABLE_WEBP -7ec030c add gdImageCreateFromWebpPtr impl -eaca20f Remove Deadcode in gd.c -312b020 Update gd_topal.c -18bbbfa Merge pull request #148 from smcdow/master -f2712a6 Remove Deadcode in gd_nnquant.c -4f99667 Merge pull request #154 from jitendarKumar/patch-1 -4cf5307 Missing nullcheck in gd_topal.c -d403501 Dereference null return value in gdfx.c -ac527e6 delete webpimg.c references -c9dac2d Fix segfault in gdImageFlipVertical() for non-TrueColor images. -a9f3a83 Merge pull request #146 from dmelani/rotation_fix -4e833d3 Added missing zero. -b12712e Merge pull request #143 from vapier/master -2618996 missing file in archive, need for autoreconf -6bdfa68 ignore new tests -1c33d94 tests: fix header inclusion -e0aafd0 Add Debian/Ubuntu M-A specific configure options -3a72f64 lint.travis-ci.org doesn't know version and description in Coverity addon -87804f6 Comment-out Coverity encrypted token -2b8bfd4 Don't fail when make check fails; Add coverity configuration for coverity_scan branch -10a92e7 Even more missing semicolons -09783e4 Add missing semicolons to .travis.yml -25cfac5 Replace with 8* -2be44f0 Don't upgrade build environment now -5edbc3f Use autotools on linux to build libgd -9201900 Change issue tracker URL to github -ba081d9 Merge branch 'GD-2.1' -1481c41 fix #140, versions placeholder not replaced in gdlib-config -88fb8fc typo -4ef5903 fix some leaks on error -824a3aa remove remaining libvpx related code -a79232c fix #129, drop VPX usage in favor of libwebp -9a205a1 Merge branch 'GD-2.1' -511160e fix #82, fix 1 bit tiff support -7a567db Merge branch 'GD-2.1' -aa1d71c fix #135, fix logic in gdkanji -58990de Merge branch 'master' of https://bitbucket.org/libgd/gd-libgd -2f85291 fix #139, patch by Peter Breitenlohner -255a9e4 fix visibility test -358950c remove this test, too big -5c48b49 fix #91, actually add tests, bug already fixed -f680978 fix #94, HAVE_VISIBILITY may be defined but set to 0 -b126726 fix #89, fix leaks on tiff read -acdebc8 fix #84, double free and overrun due to wrong alloc type, uint8_t instead of int -490bc3e free palette on error -289c829 port fix for saner boolean usage from https://reviews.facebook.net/D31695 -2b3130e fix #90, actually copy src to dst -b1f4313 add tests for #111 -3d7c3f5 fix #111, invalid quantization -ac1ff44 update results to match modern freetype builds -c7e5dc6 fix #111, invalid default quantization -81d341c fix #113, NULL deref in gdfx -2f40d52 Fix #138, VS 2010 build error due to double semi column -0e9c4e0 master is now 2.2.0-dev -06b2e4f back to dev diff --git a/Build/source/libs/gd/libgd-src/Makefile.am b/Build/source/libs/gd/libgd-src/Makefile.am index 033b91a6080..c4ccbd41d6b 100644 --- a/Build/source/libs/gd/libgd-src/Makefile.am +++ b/Build/source/libs/gd/libgd-src/Makefile.am @@ -1,3 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src config tests EXTRA_DIST = test docs examples windows VMS cmake netware bootstrap.sh CMakeLists.txt CONTRIBUTORS README.md + +clean-local: + $(srcdir)/cmake/distclean.sh --automake diff --git a/Build/source/libs/gd/libgd-src/NEWS b/Build/source/libs/gd/libgd-src/NEWS deleted file mode 100644 index 8bf38434add..00000000000 --- a/Build/source/libs/gd/libgd-src/NEWS +++ /dev/null @@ -1,109 +0,0 @@ -'GD NEWS -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -GD HEAD -169, gdColorMapLookup() answers the RGB values according to given color map - (Takeshi Abe) -176, Added support of variable resolution by Alan Boudreault (Takeshi Abe) -184, new filter gdImagePixelate() by Kalle Sommer Nielsen (Takeshi Abe) - -GD 2.0.36 (2007-11-xx) -145, Fixed leak in gdImageCopyResized (Patch by Brent Bottles) - 81, Fixed gdImageCopy with true color image, the transparent color was ignored - (Pierre, Mark Fisher) - 88, Fixed support of PNG grayscale image with alpha channel (Pierre) - 95, Added Netware builds script (Guenter) - 97, ease the creation of regexp to match symbols/functions in the sources - (Guenter) -100, spurious horizontal line drawn by gdImageFilledPolygon (Takeshi Abe) -101, _gdCreateFromFile() can crash if gdImageCreate fails (Mattias Bengtsson) -105, gdImageCreateFrom*Ptr() can crash if gdNewDynamicCtxEx() fails (Mattias) -106, gdImageRectangle draws 1x1 rectangles as 1x3 rectangles (Pierre) -109, Possible integer overflow in gdImageFill() (Mattias Bengtsson) -111, Optimization for single pixel line not in correct order (Mattias) -112, gdImageColorDeallocate can write outside buffer (Mattias Bengtsson) -113, gdImageColorTransparent can write outside buffer (Mattias Bengtsson) -127, gdImageWBMPCtx can crash when createwbmp fails (Scott) -132, Fixed decoding of the html entity ϑ (Thomas Bonfort, Pierre) -133, Fixed configure script ignoring --with-png=DIR option (Scott) -166, Fixed handling 3-digit RGB and transparent color in XPM (Takeshi Abe) -173, Fixed the memory management in font_path() of gdft.c (Takeshi Abe) -174, Fixed that font_path() in gdft.c breaks reentrancy (Takeshi Abe) -180, Added a Makefile entry for tests/xpm (Takeshi Abe) -181, Fixed gd_gif_out.c to enable proper interlace -185, Fixed memory leaks in gdImageCreateFromXpm() (Takeshi Abe) -186, Fixed tiling true colour with palette image (Marko Vukovic, Takeshi Abe) -193, Fixed gdImagePng() with no color allocated (Martin McNickle, Takeshi Abe) -196, Fixed a memory leak in newDynamic() (Steve Fossen) -198, Fixed useFontConfig() to work as documented (Mojca Miklavec, Ethan Merritt) - -GD 2.0.35 (2007-06-21) -41, Fix valgrind error in gdImageFillTiled (Nuno Lopes) -45, Add missing custom cmake macros (required for the tests suite) -51, Avoid signature buffer copy in gd_gif_c (Nuno Lopes) -48, Race condition in gdImageStringFTEx (Antony Dogval, Pierre - Scott MacVicar) -52, Reading GIF images is not thread safe (static usage in private - functions) (Roman Nemecek, Nuno Lopes, Pierre) -60, GIF Local palette is read twice -66, GIF, Use local frame dimension when possible instead of the - logical screen size (Pierre) -68, OpenVMS build support, see VMS/README.VMS for the details - (Alexey Chupahin) -70, GIF, do not try to use the global colmap if it does not exist - (Nuno Lopes, Pierre) -72, gdImageAALine draws axis lines with two pixels width (Pierre) -73, TTF usage doesn't work properly on Netware (Guenter Knauf, Scott MacVicar) -74, gdImageArc CPU usage with large angles (Pierre) -78, gdImageFilledRectangle regression fixed when used with reversed edges - (Pierre) -86, Possible infinite loop in libgd/gd_png.c, flaw found by Xavier Roche - (Pierre) -87, Fixed segfault when an invalid color index is present in a GIF - image data, reported by Elliot (Pierre) -89, Possible integer overflow in gdImageCreateTrueColor (Pierre) -94, gdImageCreateXbm can crash if gdImageCreate fails (Pierre) - -GD 2.0.34 (2007-02-07) - 3, Initialize variables in tweenColorTest, fix cache - 4, gdImageFill, multiple segfaults with patterns or invalid arguments - 5, gdImageRectangle draws corners twice - 6, GIF Output does use the transparent color with truecolor images - 7, Multiple security issues in GIF loader - 8, gdIimageCopy doen't use the alpha channel - 9, Add autogen and and misc configure/makefile (Lars Hecking) -10, gdImageFilledEllipse does not respect transparency -11, gdImageCreateFromPng* crashes with empty file -12, gdImageCreateFromPngCrx, initialize the signature buffer not the - infile -13, leak in jinit_2pass_quantizer (gd_topal.c) -14, Added santiy checks for possible memory allocation errors -15, gdImageCreatePaletteFromTrueColor, later color allocations overwrite - the palette colors (Rob Leslie) -16, Obscure error on Sun's compiler in entities.tcl - (John Ellson/Graphviz) -17, gdImageCreate, invalid gdFree call when overflow2 fails -18, HWB_Diff, invalid usage of abs instead of fabs - (Nick Atty) -19, Fixed gdImageCopyMergeGray when used with a true color image -20, transparency preservation in gdImageCopyRotated -21, Out of range checks in gdImageSetAAPixelColor -22, gdFontCacheSetup does not stop on error -23, Errors when gdImageStringFTEx is called with an empty string - (Kevin Scaldeferri) -24, gdft.c, uninitialized variable "charmap" and avoid divide-by-zero - (John Ellson/Graphviz) -25, DISABLE_THREADS to permit disabling of thread support - (John Ellson/Graphviz) -26, dynamicGetbuf, sourceGetbuf must return 0 for errors and EOF -27, gdSeek declaration is wrong -29, Windows native makefile (Edin KadribaÅ¡ić) -30, restores the ability to recognize and handle a font with - Adobe-specific character encoding. Added gdFTEX_Adobe_Custom. -31, Shared library support on cygwin (Dr. Volker Zell) -32, Pattern-fill works incorrectly if tile is created via - gdImageCreateTruecolor (Ethan Merritt) -33, malformed PNG image crashes (CRC error) -34, reading some gif images creates infinite loop -36, gdImageFillToBorder crashes when used with alpha -40, possible Buffer overflow in the gdImageStringFTEx function - in gdft.c (CVE-2007-0455) (Kees Cook) diff --git a/Build/source/libs/gd/libgd-src/cmake/distclean.sh b/Build/source/libs/gd/libgd-src/cmake/distclean.sh new file mode 100755 index 00000000000..0124dd12e7c --- /dev/null +++ b/Build/source/libs/gd/libgd-src/cmake/distclean.sh @@ -0,0 +1,46 @@ +#!/bin/sh +# CMake doesn't provide the equiv of "distclean" which makes it impossible to +# properly clean up after it when you build in-tree. This script emulates it. +# It assumes it's run in the dir you want to clean. + +usage() { + cat <<-EOF +Usage: $0 [--automake] + +Clean all the cmake generated output files. + +Options: + --automake Do not clean files autotools also creates +EOF + exit ${1:-0} +} + +AUTOMAKE="false" +while [ $# -ne 0 ]; do + case $1 in + -h|--help) usage ;; + --automake) AUTOMAKE="true" ;; + *) usage 1 ;; + esac + shift +done + +set -x + +find . -maxdepth 3 \ + '(' \ + -name CMakeCache.txt -o \ + -name CMakeFiles -o \ + -name CTestTestfile.cmake -o \ + -name cmake_install.cmake \ + ')' \ + -exec rm -rf {} + +rm -rf \ + Bin Testing \ + CPackConfig.cmake CPackSourceConfig.cmake \ + DartConfiguration.tcl + +if [ "${AUTOMAKE}" = "false" ]; then + find . -maxdepth 3 '!' -wholename './windows/*' -a -name Makefile -exec rm -rf {} + + rm -f src/config.h +fi diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindFreetype.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindFreetype.cmake index 3d2a8a48088..dd4db279e0c 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/FindFreetype.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindFreetype.cmake @@ -69,7 +69,7 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h PATH_SUFFIXES include/freetype2 include ) -find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h +find_path(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h HINTS ENV FREETYPE_DIR PATHS diff --git a/Build/source/libs/gd/libgd-src/config/test-driver b/Build/source/libs/gd/libgd-src/config/test-driver index d30605660a0..8e575b017d9 100644 --- a/Build/source/libs/gd/libgd-src/config/test-driver +++ b/Build/source/libs/gd/libgd-src/config/test-driver @@ -3,7 +3,7 @@ scriptversion=2013-07-13.22; # UTC -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 Free Software Foundation, Inc. # # 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 @@ -106,11 +106,14 @@ trap "st=143; $do_exit" 15 # Test script is run here. "$@" >$log_file 2>&1 estatus=$? + if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 + tweaked_estatus=1 +else + tweaked_estatus=$estatus fi -case $estatus:$expect_failure in +case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; @@ -119,6 +122,12 @@ case $estatus:$expect_failure in *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + # Report outcome to console. echo "${col}${res}${std}: $test_name" diff --git a/Build/source/libs/gd/libgd-src/configure.ac b/Build/source/libs/gd/libgd-src/configure.ac index 9d3d1fe5b59..7663cccf06e 100644 --- a/Build/source/libs/gd/libgd-src/configure.ac +++ b/Build/source/libs/gd/libgd-src/configure.ac @@ -300,7 +300,8 @@ AX_CFLAGS_WARN_ALL dnl Enable -Werror if possible. Do it after all other tests. AC_ARG_ENABLE([werror], [AS_HELP_STRING([--enable-werror], [treat compile warnings as errors])]) -if test "$enable_werror" = "yes" || test "$GCC" = "yes" -a "$enable_werror" != "no"; then +if test "$enable_werror" = "yes" || \ + test "$GCC" = "yes" -a "$enable_werror" != "no" -a -d "$srcdir/.git"; then CFLAGS="-Werror $CFLAGS" CXXFLAGS="-Werror $CXXFLAGS" fi @@ -324,7 +325,6 @@ AC_MSG_RESULT([ AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile - tests/test_config.h config/Makefile config/gdlib-config config/gdlib.pc]) diff --git a/Build/source/libs/gd/libgd-src/docs/ChangeLog.historic b/Build/source/libs/gd/libgd-src/docs/ChangeLog.historic new file mode 100644 index 00000000000..c5c453c4724 --- /dev/null +++ b/Build/source/libs/gd/libgd-src/docs/ChangeLog.historic @@ -0,0 +1,145 @@ +4d29684 CVE-2015-8874 +fe199ed release gd-2.2.0 +6556574 ChangeLog: update for gd-2.2 branching +c6c52b3 dist: drop bzip2 tarball +7932944 libtool: set revision based on package version +119b38e travis: switch to the local bootstrap script +f79d0a8 m4: use an older openmp macro +e6bf771 docs: clean up a bit and support `NaturalDocs` +c9a4a85 libimagequant: fix integration +6e054c4 gdlib-config: mark it as deprecated #140 +b64c996 build: fix GDLIB_REVISION collision +10a4915 tests: rework handling of temp output files +1239832 configure/cmake: unify header checks and config.h generation +32c5072 bootstrap: switch to autoreconf +f7471f2 tests: add missing gdimagesetpixel tests +e59a0e8 tests: add missing test files to dist +2733b62 tga: cleanup/simplify a bit +96d5687 tga: fix two memory corruption bugs #159 +8f50777 tests: get working under lsan (leak sanitizer) +e530663 png: fix some memory leaks w/invalid images +82b80dc gif: avoid out-of-bound reads of masks array #209 +4dc1a2d xbm: avoid stack overflow (read) with large names #211 +b083ec1 cmake: update build files to match autotools more +2db153a webpng: rewrite & cleanup to use getopt +b12f217 configure: enable -Werror by default when available +75c38f6 fix various gcc/clang warnings found with -Wall +8bdfede cmake: document the common build/install steps #179 +6f3552d travis: drop multiarch settings +d549193 travis: drop nasm apt install +cd15d9b drop unused make_drone.io +b32324d travis: enable the clang compiler +05d70f6 tests: fix leaks in test code +4e61c9b tiff: fix leak in gdImageCreateFromTiffCtx() +658f168 gd2: fix double free when processing invalid headers +0315e44 tests: gd2: add general read test helpers #208 +3c47bb4 tests: do not build libgdtest.a all the time +09d2d01 webp: fix double free +cd1d964 libgd: update & sort cmake installed headers #164 +161ac24 travis: rework & improve main script logic +613e8c9 tests: split up makefile entries +92c3209 tests: fix distclean errors +3768c9e travis: switch to non-sudo mode +adc8598 tests: unify cmake test code into a single macro +ef9b000 build: handle renamed README file +e16310b libgd: update & sort source lists +a44e1ba tests: gdimageline: add missing -lm linkage +3b0eabf tests: add missing cmake files gdimagefile/gdimagefilter +4c6a07b gitignore: split up test entries +6455304 tests: drop EXTRA_PROGRAMS +982d488 revert... unneeded +a5b5c27 Fix memory leak +2bb97f4 gd2: handle corrupt images better (CVE-2016-3074) +fc14a8c README: document supported image formats +5277b6f Merge pull request #199 from mattbo/tiff_dpi_support +4e53ed7 Added support for reading and writing TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION. Includes a unit test. +6913dd3 bmp: use double variant of ceil func +f29f7db Merge pull request #198 from sherif-elmetainy/master +e87ec88 :fix and unit test for crash issue in gdImageFillTiled +258dbf2 README: link to the CONTRIBUTORS file +6895576 README: reformat in markdown for better github display +73ab7c7 Merge pull request #182 from leoyanggit/fix_build_static +e08acb0 Merge pull request #153 from davidchappelle/master +78dad44 circletexttest: check image creation return value +a9346dd travis: build/check in parallel +e5d1e9d Fail Travis builds if make check fails +b6211d9 tests: fix build failures when jpeg/freetype are disabled +3667974 Merge pull request #193 from vapier/master +f732d74 Merge pull request #194 from jasonwilliams200OK/master +859bcf7 git,repo: Ignore build spew. +10a8761 Merge pull request #192 from jasonwilliams200OK/master +8f69034 code: Adds missing methods for absent libz case. +a4f5d5d configure: unify library tests +a9205e5 configure: require autoconf-2.64/automake-1.11 +2e04a67 win: Use an external snprintf hook. +9104bba configure: use AS_HELP_STRING everywhere +1dc5280 Merge pull request #191 from jitendarKumar/patch-8 +dd48286 Logical Operation && has no Impact on expression result . +52dad8b Update git ignore file to exclude cmake build directory +9ea3097 Prevent duplicate macro definition errors/warnings +40f42c0 Fix compiler warnings when checking interpolation_id +7147b64 Make BUILD_SHARED_LIBS configurable +4751b60 gdImageScaleTwoPass memory leak fix +4e1ce66 Merge pull request #166 from jitendarKumar/patch-5 +1219113 Merge pull request #155 from jitendarKumar/patch-2 +38e016f Merge pull request #156 from jitendarKumar/patch-3 +4e70131 Merge pull request #157 from jitendarKumar/patch-4 +895be03 Indentation corrected. +7b6261c Dereference null return value in gdtest.c +7297c94 Merge pull request #163 from wangkun611/webp_cmake +917fa11 fix CMake error when ENABLE_WEBP +7ec030c add gdImageCreateFromWebpPtr impl +eaca20f Remove Deadcode in gd.c +312b020 Update gd_topal.c +18bbbfa Merge pull request #148 from smcdow/master +f2712a6 Remove Deadcode in gd_nnquant.c +4f99667 Merge pull request #154 from jitendarKumar/patch-1 +4cf5307 Missing nullcheck in gd_topal.c +d403501 Dereference null return value in gdfx.c +ac527e6 delete webpimg.c references +c9dac2d Fix segfault in gdImageFlipVertical() for non-TrueColor images. +a9f3a83 Merge pull request #146 from dmelani/rotation_fix +4e833d3 Added missing zero. +b12712e Merge pull request #143 from vapier/master +2618996 missing file in archive, need for autoreconf +6bdfa68 ignore new tests +1c33d94 tests: fix header inclusion +e0aafd0 Add Debian/Ubuntu M-A specific configure options +3a72f64 lint.travis-ci.org doesn't know version and description in Coverity addon +87804f6 Comment-out Coverity encrypted token +2b8bfd4 Don't fail when make check fails; Add coverity configuration for coverity_scan branch +10a92e7 Even more missing semicolons +09783e4 Add missing semicolons to .travis.yml +25cfac5 Replace with 8* +2be44f0 Don't upgrade build environment now +5edbc3f Use autotools on linux to build libgd +9201900 Change issue tracker URL to github +ba081d9 Merge branch 'GD-2.1' +1481c41 fix #140, versions placeholder not replaced in gdlib-config +88fb8fc typo +4ef5903 fix some leaks on error +824a3aa remove remaining libvpx related code +a79232c fix #129, drop VPX usage in favor of libwebp +9a205a1 Merge branch 'GD-2.1' +511160e fix #82, fix 1 bit tiff support +7a567db Merge branch 'GD-2.1' +aa1d71c fix #135, fix logic in gdkanji +58990de Merge branch 'master' of https://bitbucket.org/libgd/gd-libgd +2f85291 fix #139, patch by Peter Breitenlohner +255a9e4 fix visibility test +358950c remove this test, too big +5c48b49 fix #91, actually add tests, bug already fixed +f680978 fix #94, HAVE_VISIBILITY may be defined but set to 0 +b126726 fix #89, fix leaks on tiff read +acdebc8 fix #84, double free and overrun due to wrong alloc type, uint8_t instead of int +490bc3e free palette on error +289c829 port fix for saner boolean usage from https://reviews.facebook.net/D31695 +2b3130e fix #90, actually copy src to dst +b1f4313 add tests for #111 +3d7c3f5 fix #111, invalid quantization +ac1ff44 update results to match modern freetype builds +c7e5dc6 fix #111, invalid default quantization +81d341c fix #113, NULL deref in gdfx +2f40d52 Fix #138, VS 2010 build error due to double semi column +0e9c4e0 master is now 2.2.0-dev +06b2e4f back to dev diff --git a/Build/source/libs/gd/libgd-src/docs/NEWS.historic b/Build/source/libs/gd/libgd-src/docs/NEWS.historic new file mode 100644 index 00000000000..8bf38434add --- /dev/null +++ b/Build/source/libs/gd/libgd-src/docs/NEWS.historic @@ -0,0 +1,109 @@ +'GD NEWS +||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| +GD HEAD +169, gdColorMapLookup() answers the RGB values according to given color map + (Takeshi Abe) +176, Added support of variable resolution by Alan Boudreault (Takeshi Abe) +184, new filter gdImagePixelate() by Kalle Sommer Nielsen (Takeshi Abe) + +GD 2.0.36 (2007-11-xx) +145, Fixed leak in gdImageCopyResized (Patch by Brent Bottles) + 81, Fixed gdImageCopy with true color image, the transparent color was ignored + (Pierre, Mark Fisher) + 88, Fixed support of PNG grayscale image with alpha channel (Pierre) + 95, Added Netware builds script (Guenter) + 97, ease the creation of regexp to match symbols/functions in the sources + (Guenter) +100, spurious horizontal line drawn by gdImageFilledPolygon (Takeshi Abe) +101, _gdCreateFromFile() can crash if gdImageCreate fails (Mattias Bengtsson) +105, gdImageCreateFrom*Ptr() can crash if gdNewDynamicCtxEx() fails (Mattias) +106, gdImageRectangle draws 1x1 rectangles as 1x3 rectangles (Pierre) +109, Possible integer overflow in gdImageFill() (Mattias Bengtsson) +111, Optimization for single pixel line not in correct order (Mattias) +112, gdImageColorDeallocate can write outside buffer (Mattias Bengtsson) +113, gdImageColorTransparent can write outside buffer (Mattias Bengtsson) +127, gdImageWBMPCtx can crash when createwbmp fails (Scott) +132, Fixed decoding of the html entity ϑ (Thomas Bonfort, Pierre) +133, Fixed configure script ignoring --with-png=DIR option (Scott) +166, Fixed handling 3-digit RGB and transparent color in XPM (Takeshi Abe) +173, Fixed the memory management in font_path() of gdft.c (Takeshi Abe) +174, Fixed that font_path() in gdft.c breaks reentrancy (Takeshi Abe) +180, Added a Makefile entry for tests/xpm (Takeshi Abe) +181, Fixed gd_gif_out.c to enable proper interlace +185, Fixed memory leaks in gdImageCreateFromXpm() (Takeshi Abe) +186, Fixed tiling true colour with palette image (Marko Vukovic, Takeshi Abe) +193, Fixed gdImagePng() with no color allocated (Martin McNickle, Takeshi Abe) +196, Fixed a memory leak in newDynamic() (Steve Fossen) +198, Fixed useFontConfig() to work as documented (Mojca Miklavec, Ethan Merritt) + +GD 2.0.35 (2007-06-21) +41, Fix valgrind error in gdImageFillTiled (Nuno Lopes) +45, Add missing custom cmake macros (required for the tests suite) +51, Avoid signature buffer copy in gd_gif_c (Nuno Lopes) +48, Race condition in gdImageStringFTEx (Antony Dogval, Pierre + Scott MacVicar) +52, Reading GIF images is not thread safe (static usage in private + functions) (Roman Nemecek, Nuno Lopes, Pierre) +60, GIF Local palette is read twice +66, GIF, Use local frame dimension when possible instead of the + logical screen size (Pierre) +68, OpenVMS build support, see VMS/README.VMS for the details + (Alexey Chupahin) +70, GIF, do not try to use the global colmap if it does not exist + (Nuno Lopes, Pierre) +72, gdImageAALine draws axis lines with two pixels width (Pierre) +73, TTF usage doesn't work properly on Netware (Guenter Knauf, Scott MacVicar) +74, gdImageArc CPU usage with large angles (Pierre) +78, gdImageFilledRectangle regression fixed when used with reversed edges + (Pierre) +86, Possible infinite loop in libgd/gd_png.c, flaw found by Xavier Roche + (Pierre) +87, Fixed segfault when an invalid color index is present in a GIF + image data, reported by Elliot (Pierre) +89, Possible integer overflow in gdImageCreateTrueColor (Pierre) +94, gdImageCreateXbm can crash if gdImageCreate fails (Pierre) + +GD 2.0.34 (2007-02-07) + 3, Initialize variables in tweenColorTest, fix cache + 4, gdImageFill, multiple segfaults with patterns or invalid arguments + 5, gdImageRectangle draws corners twice + 6, GIF Output does use the transparent color with truecolor images + 7, Multiple security issues in GIF loader + 8, gdIimageCopy doen't use the alpha channel + 9, Add autogen and and misc configure/makefile (Lars Hecking) +10, gdImageFilledEllipse does not respect transparency +11, gdImageCreateFromPng* crashes with empty file +12, gdImageCreateFromPngCrx, initialize the signature buffer not the + infile +13, leak in jinit_2pass_quantizer (gd_topal.c) +14, Added santiy checks for possible memory allocation errors +15, gdImageCreatePaletteFromTrueColor, later color allocations overwrite + the palette colors (Rob Leslie) +16, Obscure error on Sun's compiler in entities.tcl + (John Ellson/Graphviz) +17, gdImageCreate, invalid gdFree call when overflow2 fails +18, HWB_Diff, invalid usage of abs instead of fabs + (Nick Atty) +19, Fixed gdImageCopyMergeGray when used with a true color image +20, transparency preservation in gdImageCopyRotated +21, Out of range checks in gdImageSetAAPixelColor +22, gdFontCacheSetup does not stop on error +23, Errors when gdImageStringFTEx is called with an empty string + (Kevin Scaldeferri) +24, gdft.c, uninitialized variable "charmap" and avoid divide-by-zero + (John Ellson/Graphviz) +25, DISABLE_THREADS to permit disabling of thread support + (John Ellson/Graphviz) +26, dynamicGetbuf, sourceGetbuf must return 0 for errors and EOF +27, gdSeek declaration is wrong +29, Windows native makefile (Edin KadribaÅ¡ić) +30, restores the ability to recognize and handle a font with + Adobe-specific character encoding. Added gdFTEX_Adobe_Custom. +31, Shared library support on cygwin (Dr. Volker Zell) +32, Pattern-fill works incorrectly if tile is created via + gdImageCreateTruecolor (Ethan Merritt) +33, malformed PNG image crashes (CRC error) +34, reading some gif images creates infinite loop +36, gdImageFillToBorder crashes when used with alpha +40, possible Buffer overflow in the gdImageStringFTEx function + in gdft.c (CVE-2007-0455) (Kees Cook) diff --git a/Build/source/libs/gd/libgd-src/docs/README.TESTING b/Build/source/libs/gd/libgd-src/docs/README.TESTING index 53dd8db54e8..65ce58b833b 100644 --- a/Build/source/libs/gd/libgd-src/docs/README.TESTING +++ b/Build/source/libs/gd/libgd-src/docs/README.TESTING @@ -34,7 +34,7 @@ $ ctest . I will certainly add a nice CMake option to give prefix later. What to do if tests fail on your platform and you use the last GD release? -either from your favourite distributions or from http://www.libgd.org or git? +either from your favorite distributions or from http://www.libgd.org or git? If you use a packaged version of the GD Library (installed from RPM, deb or ports, gentoo packages or any other packages format or distribution), please try @@ -53,7 +53,7 @@ You can attach the two files available in: Later versions will have an automatic post mode. If the tests run successfully, please report a bug to the maintainer of the -packages (debian, bsd, ubuntu or whoever is responsible for the packages). +packages (Debian, BSD, Ubuntu or whoever is responsible for the packages). Reasons of failures: Exception: SegFault: self explaining @@ -62,9 +62,9 @@ timeout the default timeout is 5 seconds. Some test may have infinite loops when compiled against old versions of the GD library (esp. 2.0.33 or earlier) -Some features rely on floating point arithmetics and results may vary from +Some features rely on floating point arithmetic and results may vary from one architecture to another. Examples: -on i686, gdimagerotate/bug00067 will faill. The result is still viusally +on i686, gdimagerotate/bug00067 will fail. The result is still visually acceptable but i686 default arithmetic mode will generate different results. Adding "-msse -mfpmath=sse" to CFLAGS will solve this difference. diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd-c.html deleted file mode 100644 index 53a4ad76b71..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd-c.html +++ /dev/null @@ -1,193 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd.c - - - - - - - - - -

gd.c

Summary
gd.c
Functions
gdSetErrorMethod
gdClearErrorMethod
gdImageGetTrueColorPixel
gdImageCreategdImageCreate is called to create palette-based images, with no more than 256 colors.
gdImageCreateTrueColorgdImageCreateTrueColor is called to create truecolor images, with an essentially unlimited number of colors.
gdImageDestroygdImageDestroy is used to free the memory associated with an image.
gdImageColorClosest
gdImageColorClosestAlpha
gdImageColorClosestHWB
gdImageColorExact
gdImageColorExactAlpha
gdImageColorAllocate
gdImageColorAllocateAlpha
gdImageColorResolvegdImageColorResolve is an alternative for the code fragment
gdImageColorResolveAlpha
gdImageColorDeallocate
gdImageColorTransparent
gdImagePaletteCopy
gdImageColorReplace
gdImageColorReplaceThreshold
gdImageColorReplaceArray
gdImageColorReplaceCallback
gdImageSetPixel
gdImageGetPixel
gdImageGetTrueColorPixel
gdImageAABlendNO-OP, kept for library compatibility.
gdImageLineBresenham as presented in Foley & Van Dam.
gdImageDashedLine
gdImageBoundsSafe
gdImageChar
gdImageCharUp
gdImageString
gdImageStringUp
gdImageString16
gdImageStringUp16
gdImageArc
gdImageFilledArc
gdImageEllipse
gdImageFilledEllipse
gdImageFillToBorder
gdImageFill
gdImageRectangle
gdImageFilledRectangle
gdImageClone
gdImageCopy
gdImageCopyMergeThis function is a substitute for real alpha channel operations, so it doesn’t pay attention to the alpha channel.
gdImageCopyMergeGrayThis function is a substitute for real alpha channel operations, so it doesn’t pay attention to the alpha channel.
gdImageCopyResized
gdImageCopyRotated
gdImageCopyResampled
gdImagePolygon
gdImageOpenPolygon
gdImageFilledPolygon
gdImageSetStyle
gdImageSetThickness
gdImageSetBrush
gdImageSetTile
gdImageSetAntiAliased
gdImageSetAntiAliasedDontBlend
gdImageInterlace
gdImageCompare
gdAlphaBlend
gdLayerOverlay
gdLayerMultiplyApply ‘multiply’ effect.
gdImageAlphaBlending
gdImageSaveAlpha
gdImageSetClip
gdImageGetClip
gdImageSetResolution
gdImagePaletteToTrueColorConvert a palette image to true color.
- -

Functions

- -

gdSetErrorMethod

void gdSetErrorMethod(gdErrorMethod error_method)
- -

gdClearErrorMethod

void gdClearErrorMethod(void)
- -

gdImageGetTrueColorPixel

int gdImageGetTrueColorPixel (gdImagePtr im,
int x,
int y)
- -

gdImageCreate

gdImagePtr gdImageCreate (int sx,
int sy)

gdImageCreate is called to create palette-based images, with no more than 256 colors.  The image must eventually be destroyed using gdImageDestroy().

Parameters

sxThe image width.
syThe image height.

Returns

A pointer to the new image or NULL if an error occurred.

Example

gdImagePtr im;
-im = gdImageCreate(64, 64);
-// ... Use the image ...
-gdImageDestroy(im);

See Also

gdImageCreateTrueColor

- -

gdImageCreateTrueColor

gdImagePtr gdImageCreateTrueColor (int sx,
int sy)

gdImageCreateTrueColor is called to create truecolor images, with an essentially unlimited number of colors.  Invoke gdImageCreateTrueColor with the x and y dimensions of the desired image.  gdImageCreateTrueColor returns a gdImagePtr to the new image, or NULL if unable to allocate the image.  The image must eventually be destroyed using <gdImageDestroy>().

Truecolor images are always filled with black at creation time.  There is no concept of a “background” color index.

Parameters

sxThe image width.
syThe image height.

Returns

A pointer to the new image or NULL if an error occurred.

Example

gdImagePtr im;
-im = gdImageCreateTrueColor(64, 64);
-// ... Use the image ...
-gdImageDestroy(im);

See Also

gdImageCreateTrueColor

- -

gdImageDestroy

void gdImageDestroy (gdImagePtr im)

gdImageDestroy is used to free the memory associated with an image.  It is important to invoke gdImageDestroy before exiting your program or assigning a new image to a gdImagePtr variable.

Parameters

imPointer to the gdImage to delete.

Returns

Nothing.

Example

gdImagePtr im;
-im = gdImageCreate(10, 10);
-// ... Use the image ...
-// Now destroy it
-gdImageDestroy(im);
- -

gdImageColorClosest

int gdImageColorClosest (gdImagePtr im,
int r,
int g,
int b)
- -

gdImageColorClosestAlpha

int gdImageColorClosestAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
- -

gdImageColorClosestHWB

int gdImageColorClosestHWB (gdImagePtr im,
int r,
int g,
int b)
- -

gdImageColorExact

int gdImageColorExact (gdImagePtr im,
int r,
int g,
int b)
- -

gdImageColorExactAlpha

int gdImageColorExactAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
- -

gdImageColorAllocate

int gdImageColorAllocate (gdImagePtr im,
int r,
int g,
int b)
- -

gdImageColorAllocateAlpha

int gdImageColorAllocateAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
- -

gdImageColorResolve

int gdImageColorResolve (gdImagePtr im,
int r,
int g,
int b)

gdImageColorResolve is an alternative for the code fragment

if ((color=gdImageColorExact(im,R,G,B)) < 0)
-  if ((color=gdImageColorAllocate(im,R,G,B)) < 0)
-    color=gdImageColorClosest(im,R,G,B);

in a single function.  Its advantage is that it is guaranteed to return a color index in one search over the color table.

- -

gdImageColorResolveAlpha

int gdImageColorResolveAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
- -

gdImageColorDeallocate

void gdImageColorDeallocate (gdImagePtr im,
int color)
- -

gdImageColorTransparent

void gdImageColorTransparent (gdImagePtr im,
int color)
- -

gdImagePaletteCopy

void gdImagePaletteCopy (gdImagePtr to,
gdImagePtr from)
- -

gdImageColorReplace

int gdImageColorReplace (gdImagePtr im,
int src,
int dst)
- -

gdImageColorReplaceThreshold

int gdImageColorReplaceThreshold (gdImagePtr im,
int src,
int dst,
float threshold)
- -

gdImageColorReplaceArray

int gdImageColorReplaceArray (gdImagePtr im,
int len,
int *src,
int *dst)
- -

gdImageColorReplaceCallback

int gdImageColorReplaceCallback (gdImagePtr im,
gdCallbackImageColor callback)
- -

gdImageSetPixel

void gdImageSetPixel (gdImagePtr im,
int x,
int y,
int color)
- -

gdImageGetPixel

int gdImageGetPixel (gdImagePtr im,
int x,
int y)
- -

gdImageGetTrueColorPixel

int gdImageGetTrueColorPixel (gdImagePtr im,
int x,
int y)
- -

gdImageAABlend

void gdImageAABlend (gdImagePtr im)

NO-OP, kept for library compatibility.

- -

gdImageLine

void gdImageLine (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)

Bresenham as presented in Foley & Van Dam.

- -

gdImageDashedLine

void gdImageDashedLine (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
- -

gdImageBoundsSafe

int gdImageBoundsSafe (gdImagePtr im,
int x,
int y)
- -

gdImageChar

void gdImageChar (gdImagePtr im,
gdFontPtr f,
int x,
int y,
int c,
int color)
- -

gdImageCharUp

void gdImageCharUp (gdImagePtr im,
gdFontPtr f,
int x,
int y,
int c,
int color)
- -

gdImageString

void gdImageString (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned char *s,
int color)
- -

gdImageStringUp

void gdImageStringUp (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned char *s,
int color)
- -

gdImageString16

void gdImageString16 (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned short *s,
int color)
- -

gdImageStringUp16

void gdImageStringUp16 (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned short *s,
int color)
- -

gdImageArc

void gdImageArc (gdImagePtr im,
int cx,
int cy,
int w,
int h,
int s,
int e,
int color)
- -

gdImageFilledArc

void gdImageFilledArc (gdImagePtr im,
int cx,
int cy,
int w,
int h,
int s,
int e,
int color,
int style)
- -

gdImageEllipse

void gdImageEllipse(gdImagePtr im,
int mx,
int my,
int w,
int h,
int c)
- -

gdImageFilledEllipse

void gdImageFilledEllipse (gdImagePtr im,
int mx,
int my,
int w,
int h,
int c)
- -

gdImageFillToBorder

void gdImageFillToBorder (gdImagePtr im,
int x,
int y,
int border,
int color)
- -

gdImageFill

void gdImageFill(gdImagePtr im,
int x,
int y,
int nc)
- -

gdImageRectangle

void gdImageRectangle (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
- -

gdImageFilledRectangle

void gdImageFilledRectangle (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
- -

gdImageClone

gdImagePtr gdImageClone (gdImagePtr src)
- -

gdImageCopy

void gdImageCopy (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int w,
int h)
- -

gdImageCopyMerge

void gdImageCopyMerge (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int w,
int h,
int pct)

This function is a substitute for real alpha channel operations, so it doesn’t pay attention to the alpha channel.

- -

gdImageCopyMergeGray

void gdImageCopyMergeGray (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int w,
int h,
int pct)

This function is a substitute for real alpha channel operations, so it doesn’t pay attention to the alpha channel.

- -

gdImageCopyResized

void gdImageCopyResized (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int dstW,
int dstH,
int srcW,
int srcH)
- -

gdImageCopyRotated

void gdImageCopyRotated (gdImagePtr dst,
gdImagePtr src,
double dstX,
double dstY,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
int angle)
- -

gdImageCopyResampled

void gdImageCopyResampled (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int dstW,
int dstH,
int srcW,
int srcH)
- -

gdImagePolygon

void gdImagePolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
- -

gdImageOpenPolygon

void gdImageOpenPolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
- -

gdImageFilledPolygon

void gdImageFilledPolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
- -

gdImageSetStyle

void gdImageSetStyle (gdImagePtr im,
int *style,
int noOfPixels)
- -

gdImageSetThickness

void gdImageSetThickness (gdImagePtr im,
int thickness)
- -

gdImageSetBrush

void gdImageSetBrush (gdImagePtr im,
gdImagePtr brush)
- -

gdImageSetTile

void gdImageSetTile (gdImagePtr im,
gdImagePtr tile)
- -

gdImageSetAntiAliased

void gdImageSetAntiAliased (gdImagePtr im,
int c)
- -

gdImageSetAntiAliasedDontBlend

void gdImageSetAntiAliasedDontBlend (gdImagePtr im,
int c,
int dont_blend)
- -

gdImageInterlace

void gdImageInterlace (gdImagePtr im,
int interlaceArg)
- -

gdImageCompare

int gdImageCompare (gdImagePtr im1,
gdImagePtr im2)
- -

gdAlphaBlend

int gdAlphaBlend (int dst,
int src)
- -

gdLayerOverlay

int gdLayerOverlay (int dst,
int src)
- -

gdLayerMultiply

int gdLayerMultiply (int dst,
int src)

Apply ‘multiply’ effect.

- -

gdImageAlphaBlending

void gdImageAlphaBlending (gdImagePtr im,
int alphaBlendingArg)
- -

gdImageSaveAlpha

void gdImageSaveAlpha (gdImagePtr im,
int saveAlphaArg)
- -

gdImageSetClip

void gdImageSetClip (gdImagePtr im,
int x1,
int y1,
int x2,
int y2)
- -

gdImageGetClip

void gdImageGetClip (gdImagePtr im,
int *x1P,
int *y1P,
int *x2P,
int *y2P)
- -

gdImageSetResolution

void gdImageSetResolution(gdImagePtr im,
const unsigned int res_x,
const unsigned int res_y)
- -

gdImagePaletteToTrueColor

int gdImagePaletteToTrueColor(gdImagePtr src)

Convert a palette image to true color.

- -
- - - - - - - - - - -
void gdSetErrorMethod(gdErrorMethod error_method)
void gdClearErrorMethod(void)
int gdImageGetTrueColorPixel (gdImagePtr im,
int x,
int y)
gdImagePtr gdImageCreate (int sx,
int sy)
gdImageCreate is called to create palette-based images, with no more than 256 colors.
gdImagePtr gdImageCreateTrueColor (int sx,
int sy)
gdImageCreateTrueColor is called to create truecolor images, with an essentially unlimited number of colors.
void gdImageDestroy (gdImagePtr im)
gdImageDestroy is used to free the memory associated with an image.
int gdImageColorClosest (gdImagePtr im,
int r,
int g,
int b)
int gdImageColorClosestAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
int gdImageColorClosestHWB (gdImagePtr im,
int r,
int g,
int b)
int gdImageColorExact (gdImagePtr im,
int r,
int g,
int b)
int gdImageColorExactAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
int gdImageColorAllocate (gdImagePtr im,
int r,
int g,
int b)
int gdImageColorAllocateAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
int gdImageColorResolve (gdImagePtr im,
int r,
int g,
int b)
gdImageColorResolve is an alternative for the code fragment
int gdImageColorResolveAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
void gdImageColorDeallocate (gdImagePtr im,
int color)
void gdImageColorTransparent (gdImagePtr im,
int color)
void gdImagePaletteCopy (gdImagePtr to,
gdImagePtr from)
int gdImageColorReplace (gdImagePtr im,
int src,
int dst)
int gdImageColorReplaceThreshold (gdImagePtr im,
int src,
int dst,
float threshold)
int gdImageColorReplaceArray (gdImagePtr im,
int len,
int *src,
int *dst)
int gdImageColorReplaceCallback (gdImagePtr im,
gdCallbackImageColor callback)
void gdImageSetPixel (gdImagePtr im,
int x,
int y,
int color)
int gdImageGetPixel (gdImagePtr im,
int x,
int y)
void gdImageAABlend (gdImagePtr im)
NO-OP, kept for library compatibility.
void gdImageLine (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
Bresenham as presented in Foley & Van Dam.
void gdImageDashedLine (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
int gdImageBoundsSafe (gdImagePtr im,
int x,
int y)
void gdImageChar (gdImagePtr im,
gdFontPtr f,
int x,
int y,
int c,
int color)
void gdImageCharUp (gdImagePtr im,
gdFontPtr f,
int x,
int y,
int c,
int color)
void gdImageString (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned char *s,
int color)
void gdImageStringUp (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned char *s,
int color)
void gdImageString16 (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned short *s,
int color)
void gdImageStringUp16 (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned short *s,
int color)
void gdImageArc (gdImagePtr im,
int cx,
int cy,
int w,
int h,
int s,
int e,
int color)
void gdImageFilledArc (gdImagePtr im,
int cx,
int cy,
int w,
int h,
int s,
int e,
int color,
int style)
void gdImageEllipse(gdImagePtr im,
int mx,
int my,
int w,
int h,
int c)
void gdImageFilledEllipse (gdImagePtr im,
int mx,
int my,
int w,
int h,
int c)
void gdImageFillToBorder (gdImagePtr im,
int x,
int y,
int border,
int color)
void gdImageFill(gdImagePtr im,
int x,
int y,
int nc)
void gdImageRectangle (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
void gdImageFilledRectangle (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
gdImagePtr gdImageClone (gdImagePtr src)
void gdImageCopy (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int w,
int h)
void gdImageCopyMerge (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int w,
int h,
int pct)
This function is a substitute for real alpha channel operations, so it doesn’t pay attention to the alpha channel.
void gdImageCopyMergeGray (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int w,
int h,
int pct)
This function is a substitute for real alpha channel operations, so it doesn’t pay attention to the alpha channel.
void gdImageCopyResized (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int dstW,
int dstH,
int srcW,
int srcH)
void gdImageCopyRotated (gdImagePtr dst,
gdImagePtr src,
double dstX,
double dstY,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
int angle)
void gdImageCopyResampled (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int dstW,
int dstH,
int srcW,
int srcH)
void gdImagePolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
void gdImageOpenPolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
void gdImageFilledPolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
void gdImageSetStyle (gdImagePtr im,
int *style,
int noOfPixels)
void gdImageSetThickness (gdImagePtr im,
int thickness)
void gdImageSetBrush (gdImagePtr im,
gdImagePtr brush)
void gdImageSetTile (gdImagePtr im,
gdImagePtr tile)
void gdImageSetAntiAliased (gdImagePtr im,
int c)
void gdImageSetAntiAliasedDontBlend (gdImagePtr im,
int c,
int dont_blend)
void gdImageInterlace (gdImagePtr im,
int interlaceArg)
int gdImageCompare (gdImagePtr im1,
gdImagePtr im2)
int gdAlphaBlend (int dst,
int src)
int gdLayerOverlay (int dst,
int src)
int gdLayerMultiply (int dst,
int src)
Apply ‘multiply’ effect.
void gdImageAlphaBlending (gdImagePtr im,
int alphaBlendingArg)
void gdImageSaveAlpha (gdImagePtr im,
int saveAlphaArg)
void gdImageSetClip (gdImagePtr im,
int x1,
int y1,
int x2,
int y2)
void gdImageGetClip (gdImagePtr im,
int *x1P,
int *y1P,
int *x2P,
int *y2P)
void gdImageSetResolution(gdImagePtr im,
const unsigned int res_x,
const unsigned int res_y)
int gdImagePaletteToTrueColor(gdImagePtr src)
Convert a palette image to true color.
The data structure in which gd stores images.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd-h.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd-h.html deleted file mode 100644 index 2a88dec77c3..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd-h.html +++ /dev/null @@ -1,113 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd.h - - - - - - - - - -

gd.h

Summary
gd.h
Transform
gdInterpolationMethod
Types
gdImage
gdImagePtrThe data structure in which gd stores images.
Types
gdPointFDefines a point in a 2D coordinate system using floating point values.
gdPointFPtrPointer to a gdPointF
Types
gdFont
gdFontPtrA font structure, containing the bitmaps of all characters in a font.
Types
gdSource
gdSourcePtrNote: This interface is obsolete and kept only for *compatibility.
Types
gdFTStringExtra
gdFTStringExtraPtrA structure and associated pointer type used to pass additional parameters to the gdImageStringFTEx function.
Types
gdPoint
gdPointPtrRepresents a point in the coordinate space of the image; used by gdImagePolygon, gdImageOpenPolygon and gdImageFilledPolygon for polygon drawing.
GifAnimLegal values for Disposal.
gdImageGifAnim
Types
gdSink
gdSinkPtrNote: This interface is obsolete and kept only for *compatibility.
Crop
gdCropMode
- -

Transform

- -

gdInterpolationMethod

GD_BELLBell
GD_BESSELBessel
GD_BILINEAR_FIXEDfixed point bilinear
GD_BICUBICBicubic
GD_BICUBIC_FIXEDfixed point bicubic integer
GD_BLACKMANBlackman
GD_BOXBox
GD_BSPLINEBSpline
GD_CATMULLROMCatmullrom
GD_GAUSSIANGaussian
GD_GENERALIZED_CUBICGeneralized cubic
GD_HERMITEHermite
GD_HAMMINGHamming
GD_HANNINGHannig
GD_MITCHELLMitchell
GD_NEAREST_NEIGHBOURNearest neighbour interpolation
GD_POWERPower
GD_QUADRATICQuadratic
GD_SINCSinc
GD_TRIANGLETriangle
GD_WEIGHTED44 pixels weighted bilinear interpolation
GD_LINEARbilinear interpolation

See also

<gdSetInterpolationMethod>

- -

Types

- -

gdImage

- -

gdImagePtr

The data structure in which gd stores images.  gdImageCreate, gdImageCreateTrueColor and the various image file-loading functions return a pointer to this type, and the other functions expect to receive a pointer to this type as their first argument.

gdImagePtr is a pointer to gdImage.

(Previous versions of this library encouraged directly manipulating the contents ofthe struct but we are attempting to move away from this practice so the fields are no longer documented here.  If you need to poke at the internals of this struct, feel free to look at gd.h.)

- -

Types

- -

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)

- -

gdPointFPtr

- -

Types

- -

gdFont

- -

gdFontPtr

A font structure, containing the bitmaps of all characters in a font.  Used to declare the characteristics of a font.  Text-output functions expect these as their second argument, following the gdImagePtr argument.  <gdFontSmall> and gdFontGetLarge both return one.

You can provide your own font data by providing such a structure and the associated pixel array.  You can determine the width and height of a single character in a font by examining the w and h members of the structure.  If you will not be creating your own fonts, you will not need to concern yourself with the rest of the components of this structure.

Please see the files gdfontl.c and gdfontl.h for an example of the proper declaration of this structure.

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;

gdFontPtr is a pointer to gdFont.

- -

Types

- -

gdSource

- -

gdSourcePtr

Note: This interface is obsolete and kept only for *compatibility.  Use gdIOCtx instead.

Represents a source from which a PNG can be read.  Programmers who do not wish to read PNGs from a file can provide their own alternate input mechanism, using the gdImageCreateFromPngSource function.  See the documentation of that function for an example of the proper use of this type.

typedef struct {
-        int (*source) (void *context, char *buffer, int len);
-        void *context;
-} gdSource, *gdSourcePtr;

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.

- -

Types

- -

gdFTStringExtra

- -

gdFTStringExtraPtr

A structure and associated pointer type used to pass additional parameters to the gdImageStringFTEx function.  See gdImageStringFTEx for the structure definition.

Thanks to Wez Furlong.

- -

Types

- -

gdPoint

- -

gdPointPtr

Represents a point in the coordinate space of the image; used by gdImagePolygon, gdImageOpenPolygon and gdImageFilledPolygon for polygon drawing.

typedef struct {
-    int x, y;
-} gdPoint, *gdPointPtr;
- -

GifAnim

Legal values for Disposal. gdDisposalNone is always used by the built-in optimizer if previm is passed.

- -

gdImageGifAnim

gdDisposalUnknownNot recommended
gdDisposalNonePreserve previous frame
gdDisposalRestoreBackgroundFirst allocated color of palette
gdDisposalRestorePreviousRestore to before start of frame

See also: gdImageGifAnimAdd

- -

Types

- -

gdSink

- -

gdSinkPtr

Note: This interface is obsolete and kept only for *compatibility.  Use gdIOCtx instead.

Represents a “sink” (destination) to which a PNG can be written.  Programmers who do not wish to write PNGs to a file can provide their own alternate output mechanism, using the gdImagePngToSink function.  See the documentation of that function for an example of the proper use of this type.

typedef struct {
-    int (*sink) (void *context, char *buffer, int len);
-    void *context;
-} gdSink, *gdSinkPtr;

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.

- -

Crop

- -

gdCropMode

GD_CROP_DEFAULTDefault crop mode (4 corners or background)
GD_CROP_TRANSPARENTCrop using the transparent color
GD_CROP_BLACKCrop black borders
GD_CROP_WHITECrop white borders
GD_CROP_SIDESCrop using colors of the 4 corners

See also

<gdImageAutoCrop>

- -
- - - - - - - - - - -
Defines a point in a 2D coordinate system using floating point values.
gdImageStringFTEx extends the capabilities of gdImageStringFT by providing a way to pass additional parameters.
void gdImagePolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
void gdImageOpenPolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
void gdImageFilledPolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
gdImagePtr gdImageCreate (int sx,
int sy)
gdImageCreate is called to create palette-based images, with no more than 256 colors.
gdImagePtr gdImageCreateTrueColor (int sx,
int sy)
gdImageCreateTrueColor is called to create truecolor images, with an essentially unlimited number of colors.
The data structure in which gd stores images.
gdFontPtr gdFontGetLarge (void)
gdIOCtx structures hold function pointers for doing image IO.
gdImagePtr gdImageCreateFromPngSource (gdSourcePtr inSource)
See gdImageCreateFromPng for documentation.
void gdImageGifAnimAdd(gdImagePtr im,
FILE *outFile,
int LocalCM,
int LeftOfs,
int TopOfs,
int Delay,
int Disposal,
gdImagePtr previm)
This function writes GIF animation frames to GIF animation, which was initialized with gdImageGifAnimBegin.
void gdImagePngToSink (gdImagePtr im,
gdSinkPtr outSink)
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_bmp-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_bmp-c.html deleted file mode 100644 index 2d0df0c14a4..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_bmp-c.html +++ /dev/null @@ -1,53 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_bmp.c - - - - - - - - - -
- -

Functions

- -

gdImageBmpPtr

void * gdImageBmpPtr(gdImagePtr im,
int *size,
int compression)
- -

gdImageBmp

void gdImageBmp(gdImagePtr im,
FILE *outFile,
int compression)
- -

gdImageBmpCtx

void gdImageBmpCtx(gdImagePtr im,
gdIOCtxPtr out,
int compression)
- -

gdImageCreateFromBmp

gdImagePtr gdImageCreateFromBmp(FILE *inFile)
- -

gdImageCreateFromBmpPtr

gdImagePtr gdImageCreateFromBmpPtr(int size,
void *data)
- -

gdImageCreateFromBmpCtx

gdImagePtr gdImageCreateFromBmpCtx(gdIOCtxPtr infile)
- -
- - - - - - - - - - -
void * gdImageBmpPtr(gdImagePtr im,
int *size,
int compression)
void gdImageBmp(gdImagePtr im,
FILE *outFile,
int compression)
void gdImageBmpCtx(gdImagePtr im,
gdIOCtxPtr out,
int compression)
gdImagePtr gdImageCreateFromBmp(FILE *inFile)
gdImagePtr gdImageCreateFromBmpPtr(int size,
void *data)
gdImagePtr gdImageCreateFromBmpCtx(gdIOCtxPtr infile)
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_color_map-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_color_map-c.html deleted file mode 100644 index f642b70c948..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_color_map-c.html +++ /dev/null @@ -1,39 +0,0 @@ - - -gdColorMapLookup - - - - - - - - - -

gdColorMapLookup

int gdColorMapLookup(const gdColorMap color_map,
const char *color_name,
int *r,
int *g,
int *b)
- -
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_color_match-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_color_match-c.html deleted file mode 100644 index 783f7b4b725..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_color_match-c.html +++ /dev/null @@ -1,39 +0,0 @@ - - -gdImageColorMatch - - - - - - - - - -

gdImageColorMatch

int gdImageColorMatch (gdImagePtr im1,
gdImagePtr im2)

Bring the palette colors in im2 to be closer to im1.

- -
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_crop-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_crop-c.html deleted file mode 100644 index d143048b297..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_crop-c.html +++ /dev/null @@ -1,47 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_crop.c - - - - - - - - - -
- -

Functions

- -

gdImageCrop

gdImagePtr gdImageCrop(gdImagePtr src,
const gdRect *crop)
- -

gdImageCropAuto

gdImagePtr gdImageCropAuto(gdImagePtr im,
const unsigned int mode)
- -

gdImageCropThreshold

gdImagePtr gdImageCropThreshold(gdImagePtr im,
const unsigned int color,
const float threshold)
- -
- - - - - - - - - - -
gdImagePtr gdImageCrop(gdImagePtr src,
const gdRect *crop)
gdImagePtr gdImageCropAuto(gdImagePtr im,
const unsigned int mode)
gdImagePtr gdImageCropThreshold(gdImagePtr im,
const unsigned int color,
const float threshold)
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_filename-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_filename-c.html deleted file mode 100644 index ab634bab4cc..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_filename-c.html +++ /dev/null @@ -1,47 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_filename.c - - - - - - - - - -

gd_filename.c

Summary
gd_filename.c
Functions
gdSupportsFileTypeTests if a given file type is supported by GD.
gdImageCreateFromFileRead an image file of any supported.
gdImageFileWrites an image to a file in the format indicated by the filename.
- -

Functions

- -

gdSupportsFileType

int gdSupportsFileType(const char *filename,
int writing)

Tests if a given file type is supported by GD.

Given the name of an image file (which does not have to exist), returns 1 (i.e.  TRUE) if gdImageCreateFromFile can read a file of that type.  This is useful if you do not know which image types were enabled at compile time.

If writing is true, the result will be true only if gdImageFile can write a file of this type.

Note that filename parsing is done exactly the same as is done by gdImageCreateFromFile and gdImageFile and is subject to the same limitations.

Assuming LibGD is compiled with support for these image types, the following extensions are supported:

  • .gif
  • .gd, .gd2
  • .wbmp
  • .bmp
  • .xbm
  • .tga
  • .png
  • .jpg, .jpeg
  • .tiff, .tif
  • .webp
  • .xpm

Names are parsed case-insenstively.

Parameters

filenameFilename with tested extension.
writingFlag: true tests if writing works

Returns

GD_TRUE (1) if the file type is supported, GD_FALSE (0) if not.

- -

gdImageCreateFromFile

gdImagePtr gdImageCreateFromFile(const char *filename)

Read an image file of any supported.

Given the path to a file, gdImageCreateFromFile will open the file, read its contents with the appropriate gdImageCreateFrom* function and return it.

File type is determined by the filename extension, so having an incorrect extension will probably not work.  For example, renaming PNG image “foo.png” to “foo.gif” and then attempting to load it will fail even if GD supports both formats.  See <gdSupportsFiletype> for more details.

NULL is returned on error.

Parameters

filenamethe input file name

Returns

A pointer to the new image or NULL if an error occurred.

- -

gdImageFile

int gdImageFile(gdImagePtr im,
const char *filename)

Writes an image to a file in the format indicated by the filename.

File type is determined by the extension of the file name.  See <gdSupportsFiletype> for an overview of the parsing.

For file types that require extra arguments, gdImageFile attempts to use sane defaults:

<gdImageGd2>chunk size = 0, compression is enabled.
<gdImageJpeg>quality = -1 (i.e. the reasonable default)
<gdImageWBMP>foreground is the darkest available color

Everything else is called with the two-argument function and so will use the default values.

gdImageFile has some rudimentary error detection and will return GD_FALSE (0) if a detectable error occurred.  However, the image loaders do not normally return their error status so a result of GD_TRUE (1) does **not** mean the file was saved successfully.

Parameters

imThe image to save.
filenameThe path to the file to which the image is saved.

Returns

GD_FALSE (0) if an error was detected, GD_TRUE (1) if not.

- -
- - - - - - - - - - -
int gdSupportsFileType(const char *filename,
int writing)
Tests if a given file type is supported by GD.
gdImagePtr gdImageCreateFromFile(const char *filename)
Read an image file of any supported.
int gdImageFile(gdImagePtr im,
const char *filename)
Writes an image to a file in the format indicated by the filename.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_filter-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_filter-c.html deleted file mode 100644 index b41570ca19c..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_filter-c.html +++ /dev/null @@ -1,81 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_filter.c - - - - - - - - - -

gd_filter.c

Summary
gd_filter.c
Functions
gdImageScatter
gdImageScatterColor
gdImageScatterEx
gdImagePixelate
gdImageNegateInvert src image.
gdImageGrayScaleConvert the image src to a grayscale image.
gdImageBrightnessSet the brightness level <level> for the image src.
gdImageContrast
gdImageColor
gdImageConvolution
gdImageSelectiveBlur
gdImageEdgeDetectQuick
gdImageGaussianBlurgdImageGaussianBlur performs a Gaussian blur of radius 1 on the image.
gdImageEmboss
gdImageMeanRemoval
gdImageSmooth
gdImageCopyGaussianBlurredReturn a copy of the source image src blurred according to the parameters using the Gaussian Blur algorithm.
- -

Functions

- -

gdImageScatter

int gdImageScatter(gdImagePtr im,
int sub,
int plus)
- -

gdImageScatterColor

int gdImageScatterColor(gdImagePtr im,
int sub,
int plus,
int colors[],
unsigned int num_colors)
- -

gdImageScatterEx

int gdImageScatterEx(gdImagePtr im,
gdScatterPtr scatter)
- -

gdImagePixelate

int gdImagePixelate(gdImagePtr im,
int block_size,
const unsigned int mode)
- -

gdImageNegate

int gdImageNegate(gdImagePtr src)

Invert src image.

- -

gdImageGrayScale

int gdImageGrayScale(gdImagePtr src)

Convert the image src to a grayscale image.

- -

gdImageBrightness

int gdImageBrightness(gdImagePtr src,
int brightness)

Set the brightness level <level> for the image src.

- -

gdImageContrast

int gdImageContrast(gdImagePtr src,
double contrast)
- -

gdImageColor

int gdImageColor(gdImagePtr src,
const int red,
const int green,
const int blue,
const int alpha)
- -

gdImageConvolution

int gdImageConvolution(gdImagePtr src,
float filter[3][3],
float filter_div,
float offset)
- -

gdImageSelectiveBlur

int gdImageSelectiveBlur(gdImagePtr src)
- -

gdImageEdgeDetectQuick

int gdImageEdgeDetectQuick(gdImagePtr src)
- -

gdImageGaussianBlur

int gdImageGaussianBlur(gdImagePtr im)

gdImageGaussianBlur performs a Gaussian blur of radius 1 on the image.  The image is modified in place.

NOTE: You will almost certain want to use gdImageCopyGaussianBlurred instead, as it allows you to change your kernel size and sigma value.  Future versions of this function may fall back to calling it instead of gdImageConvolution, causing subtle changes so be warned.

Parameters

imThe image to blur

Returns

GD_TRUE (1) on success, GD_FALSE (0) on failure.

- -

gdImageEmboss

int gdImageEmboss(gdImagePtr im)
- -

gdImageMeanRemoval

int gdImageMeanRemoval(gdImagePtr im)
- -

gdImageSmooth

int gdImageSmooth(gdImagePtr im,
float weight)
- -

gdImageCopyGaussianBlurred

Return a copy of the source image src blurred according to the parameters using the Gaussian Blur algorithm.

radius is a radius, not a diameter so a radius of 2 (for example) will blur across a region 5 pixels across (2 to the center, 1 for the center itself and another 2 to the other edge).

sigma represents the “fatness” of the curve (lower == fatter).  If sigma is less than or equal to 0, gdImageCopyGaussianBlurred ignores it and instead computes an “optimal” value.  Be warned that future versions of this function may compute sigma differently.

The resulting image is always truecolor.

More Details

A Gaussian Blur is generated by replacing each pixel’s color values with the average of the surrounding pixels’ colors.  This region is a circle whose radius is given by argument radius.  Thus, a larger radius will yield a blurrier image.

This average is not a simple mean of the values.  Instead, values are weighted using the Gaussian function (roughly a bell curve centered around the destination pixel) giving it much more influence on the result than its neighbours.  Thus, a fatter curve will give the center pixel more weight and make the image less blurry; lower sigma values will yield flatter curves.

Currently, gdImageCopyGaussianBlurred computes the default sigma as

(2/3)*radius

Note, however that we reserve the right to change this if we find a better ratio.  If you absolutely need the current sigma value, you should set it yourself.

Parameters

srcthe source image
radiusthe blur radius (not diameter--range is 2*radius + 1)
sigmathe sigma value or a value <= 0.0 to use the computed default

Returns

The new image or NULL if an error occurred.  The result is always truecolor.

Example

FILE *in;
-gdImagePtr result, src;
-
-in = fopen("foo.png", "rb");
-src = gdImageCreateFromPng(in);
-
-result = gdImageCopyGaussianBlurred(im, src->sx / 10, -1.0);
- -
- - - - - - - - - - -
int gdImageScatter(gdImagePtr im,
int sub,
int plus)
int gdImageScatterColor(gdImagePtr im,
int sub,
int plus,
int colors[],
unsigned int num_colors)
int gdImageScatterEx(gdImagePtr im,
gdScatterPtr scatter)
int gdImagePixelate(gdImagePtr im,
int block_size,
const unsigned int mode)
int gdImageNegate(gdImagePtr src)
Invert src image.
int gdImageGrayScale(gdImagePtr src)
Convert the image src to a grayscale image.
int gdImageBrightness(gdImagePtr src,
int brightness)
Set the brightness level level for the image src.
int gdImageContrast(gdImagePtr src,
double contrast)
int gdImageColor(gdImagePtr src,
const int red,
const int green,
const int blue,
const int alpha)
int gdImageConvolution(gdImagePtr src,
float filter[3][3],
float filter_div,
float offset)
int gdImageSelectiveBlur(gdImagePtr src)
int gdImageEdgeDetectQuick(gdImagePtr src)
int gdImageGaussianBlur(gdImagePtr im)
gdImageGaussianBlur performs a Gaussian blur of radius 1 on the image.
int gdImageEmboss(gdImagePtr im)
int gdImageMeanRemoval(gdImagePtr im)
int gdImageSmooth(gdImagePtr im,
float weight)
Return a copy of the source image src blurred according to the parameters using the Gaussian Blur algorithm.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gd-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gd-c.html deleted file mode 100644 index f9372410373..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gd-c.html +++ /dev/null @@ -1,57 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_gd.c - - - - - - - - - -

gd_gd.c

Summary
- -

Functions

- -

gdImageCreateFromGd

gdImagePtr gdImageCreateFromGd (FILE *inFile)

gdImageCreateFromGd is called to load images from gd format files.  Invoke gdImageCreateFromGd with an already opened pointer to a file containing the desired image in the gd file format, which is specific to gd and intended for very fast loading.  (It is not intended for compression; for compression, use PNG or JPEG.)

gdImageCreateFromGd returns a gdImagePtr to the new image, or NULL if unable to load the image (most often because the file is corrupt or does not contain a gd format image).  gdImageCreateFromGd does not close the file.  You can inspect the sx and sy members of the image to determine its size.  The image must eventually be destroyed using gdImageDestroy.

Variants

gdImageCreateFromGdPtr creates an image from GD data (i.e. the contents of a GD file) already in memory.

gdImageCreateFromGdCtx reads in an image using the functions in a gdIOCtx struct.

Parameters

infileThe input FILE pointer

Returns

A pointer to the new image or NULL if an error occurred.

Example

gdImagePtr im;
-FILE *in;
-in = fopen("mygd.gd", "rb");
-im = gdImageCreateFromGd(in);
-fclose(in);
-// ... Use the image ...
-gdImageDestroy(im);
- -

gdImageCreateFromGdPtr

gdImagePtr gdImageCreateFromGdPtr (int size,
void *data)

Parameters

sizesize of GD data in bytes.
dataGD data (i.e. contents of a GIF file).

Reads in GD data from memory.  See gdImageCreateFromGd.

- -

gdImageCreateFromGdCtx

gdImagePtr gdImageCreateFromGdCtx (gdIOCtxPtr in)

Reads in a GD image via a gdIOCtx struct.  See gdImageCreateFromGd.

- -

gdImageGd

void gdImageGd (gdImagePtr im,
FILE *outFile)
- -

gdImageGdPtr

void * gdImageGdPtr (gdImagePtr im,
int *size)
- -
- - - - - - - - - - -
gdImagePtr gdImageCreateFromGd (FILE *inFile)
gdImageCreateFromGd is called to load images from gd format files.
gdImagePtr gdImageCreateFromGdPtr (int size,
void *data)
gdImagePtr gdImageCreateFromGdCtx (gdIOCtxPtr in)
Reads in a GD image via a gdIOCtx struct.
gdIOCtx structures hold function pointers for doing image IO.
void gdImageGd (gdImagePtr im,
FILE *outFile)
void * gdImageGdPtr (gdImagePtr im,
int *size)
The data structure in which gd stores images.
void gdImageDestroy (gdImagePtr im)
gdImageDestroy is used to free the memory associated with an image.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gd2-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gd2-c.html deleted file mode 100644 index 50046883db8..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gd2-c.html +++ /dev/null @@ -1,63 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_gd2.c - - - - - - - - - -

gd_gd2.c

- -

Functions

- -

gdImageCreateFromGd2

gdImagePtr gdImageCreateFromGd2 (FILE *inFile)

gdImageCreateFromGd2 is called to load images from gd2 format files.  Invoke gdImageCreateFromGd2 with an already opened pointer to a file containing the desired image in the gd2 file format, which is specific to gd2 and intended for fast loading of parts of large images.  (It is a compressed format, but generally not as good as maximum compression of the entire image would be.)

gdImageCreateFromGd2 returns a gdImagePtr to the new image, or NULL if unable to load the image (most often because the file is corrupt or does not contain a gd format image).  gdImageCreateFromGd2 does not close the file.  You can inspect the sx and sy members of the image to determine its size.  The image must eventually be destroyed using gdImageDestroy.

Variants

gdImageCreateFromGd2Ptr creates an image from GD data (i.e. the contents of a GD2 file) already in memory.

gdImageCreateFromGd2Ctx reads in an image using the functions in a gdIOCtx struct.

Parameters

infileThe input FILE pointer

Returns

A pointer to the new image or NULL if an error occurred.

Example

gdImagePtr im;
-FILE *in;
-in = fopen("mygd.gd2", "rb");
-im = gdImageCreateFromGd2(in);
-fclose(in);
-// ... Use the image ...
-gdImageDestroy(im);
- -

gdImageCreateFromGd2Ptr

gdImagePtr gdImageCreateFromGd2Ptr (int size,
void *data)

Parameters

sizesize of GD2 data in bytes.
dataGD2 data (i.e. contents of a GIF file).

See gdImageCreateFromGd2.

- -

gdImageCreateFromGd2Ctx

gdImagePtr gdImageCreateFromGd2Ctx (gdIOCtxPtr in)

Reads in a GD2 image via a gdIOCtx struct.  See gdImageCreateFromGd2.

- -

gdImageCreateFromGd2Part

gdImagePtr gdImageCreateFromGd2Part (FILE *inFile,
int srcx,
int srcy,
int w,
int h)

gdImageCreateFromGd2Part is called to load parts of images from gd2 format files.  Invoked in the same way as gdImageCreateFromGd2, but with extra parameters indicating the source (x, y) and width/height of the desired image.  gdImageCreateFromGd2Part returns a gdImagePtr to the new image, or NULL if unable to load the image.  The image must eventually be destroyed using gdImageDestroy.

Variants

gdImageCreateFromGd2PartPtr creates an image from GD2 data (i.e. the contents of a GD2 file) already in memory.

gdImageCreateFromGd2Ctx reads in an image using the functions in a gdIOCtx struct.

Parameters

infileThe input FILE pointer
srcx, srcyThe source X and Y coordinates
w, hThe resulting image’s width and height

Returns

A pointer to the new image or NULL if an error occurred.

- -

gdImageCreateFromGd2PartPtr

gdImagePtr gdImageCreateFromGd2PartPtr (int size,
void *data,
int srcx,
int srcy,
int w,
int h)

Parameters

sizesize of GD data in bytes.
dataGD data (i.e. contents of a GIF file).
srcx, srcyThe source X and Y coordinates
w, hThe resulting image’s width and height

Reads in part of a GD2 image file stored from memory.  See gdImageCreateFromGd2Part.

- -

gdImageCreateFromGd2PartCtx

gdImagePtr gdImageCreateFromGd2PartCtx (gdIOCtx *in,
int srcx,
int srcy,
int w,
int h)

Parameters

inThe data source.
srcx, srcyThe source X and Y coordinates
w, hThe resulting image’s width and height

Reads in part of a GD2 data image file via a gdIOCtx struct.  See gdImageCreateFromGd2Part.

- -

gdImageGd2

void gdImageGd2 (gdImagePtr im,
FILE *outFile,
int cs,
int fmt)
- -

gdImageGd2Ptr

void * gdImageGd2Ptr (gdImagePtr im,
int cs,
int fmt,
int *size)
- -
- - - - - - - - - - -
gdImagePtr gdImageCreateFromGd2 (FILE *inFile)
gdImageCreateFromGd2 is called to load images from gd2 format files.
gdImagePtr gdImageCreateFromGd2Ptr (int size,
void *data)
gdImagePtr gdImageCreateFromGd2Ctx (gdIOCtxPtr in)
Reads in a GD2 image via a gdIOCtx struct.
gdIOCtx structures hold function pointers for doing image IO.
gdImagePtr gdImageCreateFromGd2Part (FILE *inFile,
int srcx,
int srcy,
int w,
int h)
gdImageCreateFromGd2Part is called to load parts of images from gd2 format files.
gdImagePtr gdImageCreateFromGd2PartPtr (int size,
void *data,
int srcx,
int srcy,
int w,
int h)
gdImagePtr gdImageCreateFromGd2PartCtx (gdIOCtx *in,
int srcx,
int srcy,
int w,
int h)
void gdImageGd2 (gdImagePtr im,
FILE *outFile,
int cs,
int fmt)
void * gdImageGd2Ptr (gdImagePtr im,
int cs,
int fmt,
int *size)
The data structure in which gd stores images.
void gdImageDestroy (gdImagePtr im)
gdImageDestroy is used to free the memory associated with an image.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gif_in-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gif_in-c.html deleted file mode 100644 index 8772d80a40f..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gif_in-c.html +++ /dev/null @@ -1,54 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_gif_in.c - - - - - - - - - -
- -

Functions

- -

gdImageCreateFromGif

gdImagePtr gdImageCreateFromGif(FILE *fdFile)

gdImageCreateFromGif is called to load images from GIF format files.  Invoke gdImageCreateFromGif with an already opened pointer to a file containing the desired image.

gdImageCreateFromGif returns a gdImagePtr to the new image, or NULL if unable to load the image (most often because the file is corrupt or does not contain a GIF image).  gdImageCreateFromGif does not close the file.  You can inspect the sx and sy members of the image to determine its size.  The image must eventually be destroyed using gdImageDestroy.

Variants

gdImageCreateFromGifPtr creates an image from GIF data (i.e. the contents of a GIF file) already in memory.

gdImageCreateFromGifCtx reads in an image using the functions in a gdIOCtx struct.

Parameters

infileThe input FILE pointer

Returns

A pointer to the new image or NULL if an error occurred.

Example

gdImagePtr im;
-... inside a function ...
-FILE *in;
-in = fopen("mygif.gif", "rb");
-im = gdImageCreateFromGif(in);
-fclose(in);
-// ... Use the image ...
-gdImageDestroy(im);
- -

gdImageCreateFromGifPtr

gdImagePtr gdImageCreateFromGifPtr (int size,
void *data)

Parameters

sizesize of GIF data in bytes.
dataGIF data (i.e. contents of a GIF file).

See gdImageCreateFromGif.

- -

gdImageCreateFromGifCtx

gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd)

See gdImageCreateFromGif.

- -
- - - - - - - - - - -
gdImagePtr gdImageCreateFromGif(FILE *fdFile)
gdImageCreateFromGif is called to load images from GIF format files.
gdImagePtr gdImageCreateFromGifPtr (int size,
void *data)
gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd)
See gdImageCreateFromGif.
The data structure in which gd stores images.
void gdImageDestroy (gdImagePtr im)
gdImageDestroy is used to free the memory associated with an image.
gdIOCtx structures hold function pointers for doing image IO.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gif_out-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gif_out-c.html deleted file mode 100644 index 8a8c8d8a510..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_gif_out-c.html +++ /dev/null @@ -1,124 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_gif_out.c - - - - - - - - - -

gd_gif_out.c

Summary
gd_gif_out.c
Functions
gdImageGifPtrIdentical to gdImageGif except that it returns a pointer to a memory area with the GIF data.
gdImageGifgdImageGif outputs the specified image to the specified file in GIF format.
gdImageGifCtxWrites a GIF image via a gdIOCtx.
gdImageGifAnimBeginPtrLike gdImageGifAnimBegin except that it outputs to a memory buffer.
gdImageGifAnimBeginThis function must be called as the first function when creating a GIF animation.
gdImageGifAnimBeginCtxLike gdImageGifAnimBegin except that it outputs to gdIOCtx.
gdImageGifAnimAddPtrLike gdImageGifAnimAdd (which contains more information) except that it stores the data to write into memory and returns a pointer to it.
gdImageGifAnimAddThis function writes GIF animation frames to GIF animation, which was initialized with gdImageGifAnimBegin.
gdImageGifAnimAddCtxAdds an animation frame via a <gdIOCtxPtr>.
gdImageGifAnimEndTerminates the GIF file properly.
gdImageGifAnimEndPtrLike gdImageGifAnimEnd (which contains more information) except that it stores the data to write into memory and returns a pointer to it.
gdImageGifAnimEndCtxLike gdImageGifAnimEnd, but writes its data via a gdIOCtx.
- -

Functions

- -

gdImageGifPtr

void * gdImageGifPtr(gdImagePtr im,
int *size)

Identical to gdImageGif except that it returns a pointer to a memory area with the GIF data.  This memory must be freed by the caller when it is no longer needed.

The caller must invoke gdFree, not free().  This is because it is not guaranteed that libgd will use the same implementation of malloc, free, etc. as your proggram.

The ‘size’ parameter receives the total size of the block of memory.

Parameters

imThe image to write
sizeOutput: the size of the resulting image.

Returns

A pointer to the GIF data or NULL if an error occurred.

- -

gdImageGif

void gdImageGif(gdImagePtr im,
FILE *outFile)

gdImageGif outputs the specified image to the specified file in GIF format.  The file must be open for binary writing.  (Under MSDOS and all versions of Windows, it is important to use “wb” as opposed to simply “w” as the mode when opening the file; under Unix there is no penalty for doing so).  gdImageGif does not close the file; your code must do so.

GIF does not support true color; GIF images can contain a maximum of 256 colors.  If the image to be written is a truecolor image, such as those created with gdImageCreateTrueColor or loaded from a JPEG or a truecolor PNG image file, a palette-based temporary image will automatically be created internally using the gdImageCreatePaletteFromTrueColor function.  The original image pixels are not modified.  This conversion produces high quality palettes but does require some CPU time.  If you are regularly converting truecolor to palette in this way, you should consider creating your image as a palette-based image in the first place.

Variants

gdImageGifCtx outputs the image via a gdIOCtx struct.

gdImageGifPtr stores the image in a large array of bytes.

Parameters

imThe image to write
outFileThe FILE pointer to write the image to.

Returns

Nothing

Example

gdImagePtr im;
-int black, white;
-FILE *out;
-// Create the image
-im = gdImageCreate(100, 100);
-// Allocate background
-white = gdImageColorAllocate(im, 255, 255, 255);
-// Allocate drawing color
-black = gdImageColorAllocate(im, 0, 0, 0);
-// Draw rectangle
-gdImageRectangle(im, 0, 0, 99, 99, black);
-// Open output file in binary mode
-out = fopen("rect.gif", "wb");
-// Write GIF
-gdImageGif(im, out);
-// Close file
-fclose(out);
-// Destroy image
-gdImageDestroy(im);
- -

gdImageGifCtx

void gdImageGifCtx(gdImagePtr im,
gdIOCtxPtr out)

Writes a GIF image via a gdIOCtx.  See gdImageGif.

Parameters

imThe image to write
outThe gdIOCtx struct used to do the writing.

Returns

Nothing.

- -

gdImageGifAnimBeginPtr

void * gdImageGifAnimBeginPtr(gdImagePtr im,
int *size,
int GlobalCM,
int Loops)

Like gdImageGifAnimBegin except that it outputs to a memory buffer.  See gdImageGifAnimBegin.

The returned memory must be freed by the caller when it is no longer needed.  **The caller must invoke <gdFree>(), not free()**, unless the caller is absolutely certain that the same implementations of malloc, free, etc. are used both at library build time and at application build time (but don’t; it could always change).

The ‘size’ parameter receives the total size of the block of memory.

Parameters

imThe reference image
sizeOutput: the size in bytes of the result.
GlobalCMGlobal colormap flag: 1 -> yes, 0 -> no, -1 -> do default
LoopsLoop count; 0 -> infinite, -1 means no loop

Returns

A pointer to the resulting data (the contents of the start of the GIF) or NULL if an error occurred.

- -

gdImageGifAnimBegin

void gdImageGifAnimBegin(gdImagePtr im,
FILE *outFile,
int GlobalCM,
int Loops)

This function must be called as the first function when creating a GIF animation.  It writes the correct GIF file headers to selected file output, and prepares for frames to be added for the animation.  The image argument is not used to produce an image frame to the file, it is only used to establish the GIF animation frame size, interlacing options and the color palette.  gdImageGifAnimAdd is used to add the first and subsequent frames to the animation, and the animation must be terminated by writing a semicolon character (;) to it or by using gdImageGifAnimEnd to do that.

The GlobalCM flag indicates if a global color map (or palette) is used in the GIF89A header.  A nonzero value specifies that a global color map should be used to reduce the size of the animation.  Of course, if the color maps of individual frames differ greatly, a global color map may not be a good idea.  GlobalCM=1 means write global color map, GlobalCM=0 means do not, and GlobalCM=-1 means to do the default, which currently is to use a global color map.

If Loops is 0 or greater, the Netscape 2.0 extension for animation loop count is written.  0 means infinite loop count.  -1 means that the extension is not added which results in no looping.  -1 is the default.

Variants

gdImageGifAnimBeginCtx outputs the image via a gdIOCtx struct.

gdImageGifAnimBeginPtr stores the image in a large array of bytes.

Parameters

imThe reference image
outfileThe output FILE*.
GlobalCMGlobal colormap flag: 1 -> yes, 0 -> no, -1 -> do default
LoopsLoop count; 0 -> infinite, -1 means no loop

Returns

Nothing.

Example

See gdImageGifAnimBegin.

- -

gdImageGifAnimBeginCtx

void gdImageGifAnimBeginCtx(gdImagePtr im,
gdIOCtxPtr out,
int GlobalCM,
int Loops)

Like gdImageGifAnimBegin except that it outputs to gdIOCtx.  See gdImageGifAnimBegin.

Parameters

imThe reference image
outPointer to the output gdIOCtx.
GlobalCMGlobal colormap flag: 1 -> yes, 0 -> no, -1 -> do default
LoopsLoop count; 0 -> infinite, -1 means no loop

Returns

Nothing.

- -

gdImageGifAnimAddPtr

void * gdImageGifAnimAddPtr(gdImagePtr im,
int *size,
int LocalCM,
int LeftOfs,
int TopOfs,
int Delay,
int Disposal,
gdImagePtr previm)

Like gdImageGifAnimAdd (which contains more information) except that it stores the data to write into memory and returns a pointer to it.

This memory must be freed by the caller when it is no longer needed.  **The caller must invoke <gdFree>(), not free(),** unless the caller is absolutely certain that the same implementations of malloc, free, etc. are used both at library build time and at application build time (but don’t; it could always change).

The ‘size’ parameter receives the total size of the block of memory.

Parameters

imThe image to add.
sizeOutput: the size of the resulting buffer.
LocalCMFlag.  If 1, use a local color map for this frame.
LeftOfsLeft offset of image in frame.
TopOfsTop offset of image in frame.
DelayDelay before next frame (in 1/100 seconds)
DisposalMODE: How to treat this frame when the next one loads.
previmNULL or a pointer to the previous image written.

Returns

Pointer to the resulting data or NULL if an error occurred.

- -

gdImageGifAnimAdd

void gdImageGifAnimAdd(gdImagePtr im,
FILE *outFile,
int LocalCM,
int LeftOfs,
int TopOfs,
int Delay,
int Disposal,
gdImagePtr previm)

This function writes GIF animation frames to GIF animation, which was initialized with gdImageGifAnimBegin.  With LeftOfs and TopOfs you can place this frame in different offset than (0,0) inside the image screen as defined in gdImageGifAnimBegin.  Delay between the previous frame and this frame is in 1/100s units.  Disposal is usually gdDisposalNone, meaning that the pixels changed by this frame should remain on the display when the next frame begins to render, but can also be gdDisposalUnknown (not recommended), gdDisposalRestoreBackground (restores the first allocated color of the global palette), or gdDisposalRestorePrevious (restores the appearance of the affected area before the frame was rendered).  Only gdDisposalNone is a sensible choice for the first frame.  If previm is passed, the built-in GIF optimizer will always use gdDisposalNone regardless of the Disposal parameter.

Setting the LocalCM flag to 1 adds a local palette for this image to the animation.  Otherwise the global palette is assumed and the user must make sure the palettes match.  Use gdImagePaletteCopy to do that.

Automatic optimization is activated by giving the previous image as a parameter.  This function then compares the images and only writes the changed pixels to the new frame in animation.  The Disposal parameter for optimized animations must be set to 1, also for the first frame.  LeftOfs and TopOfs parameters are ignored for optimized frames.  To achieve good optimization, it is usually best to use a single global color map.  To allow gdImageGifAnimAdd to compress unchanged pixels via the use of a transparent color, the image must include a transparent color.

Variants

gdImageGifAnimAddCtx outputs its data via a gdIOCtx struct.

gdImageGifAnimAddPtr outputs its data to a memory buffer which it returns.

Parameters

imThe image to add.
outfileThe output FILE* being written.
LocalCMFlag.  If 1, use a local color map for this frame.
LeftOfsLeft offset of image in frame.
TopOfsTop offset of image in frame.
DelayDelay before next frame (in 1/100 seconds)
DisposalMODE: How to treat this frame when the next one loads.
previmNULL or a pointer to the previous image written.

Returns

Nothing.

Example

{
-gdImagePtr im, im2, im3;
-int black, white, trans;
-FILE *out;
-
-im = gdImageCreate(100, 100);     // Create the image
-white = gdImageColorAllocate(im, 255, 255, 255); // Allocate background
-black = gdImageColorAllocate(im, 0, 0, 0); // Allocate drawing color
-trans = gdImageColorAllocate(im, 1, 1, 1); // trans clr for compression
-gdImageRectangle(im, 0, 0, 10, 10, black); // Draw rectangle
-
-out = fopen("anim.gif", "wb");// Open output file in binary mode
-gdImageGifAnimBegin(im, out, 1, 3);// Write GIF hdr, global clr map,loops
-// Write the first frame.  No local color map.  Delay = 1s
-gdImageGifAnimAdd(im, out, 0, 0, 0, 100, 1, NULL);
-
-// construct the second frame
-im2 = gdImageCreate(100, 100);
-(void)gdImageColorAllocate(im2, 255, 255, 255); // White background
-gdImagePaletteCopy (im2, im);  // Make sure the palette is identical
-gdImageRectangle(im2, 0, 0, 15, 15, black);    // Draw something
-// Allow animation compression with transparent pixels
-gdImageColorTransparent (im2, trans);
-gdImageGifAnimAdd(im2, out, 0, 0, 0, 100, 1, im);  // Add second frame
-
-// construct the third frame
-im3 = gdImageCreate(100, 100);
-(void)gdImageColorAllocate(im3, 255, 255, 255); // white background
-gdImagePaletteCopy (im3, im); // Make sure the palette is identical
-gdImageRectangle(im3, 0, 0, 15, 20, black); // Draw something
-// Allow animation compression with transparent pixels
-gdImageColorTransparent (im3, trans);
-// Add the third frame, compressing against the second one
-gdImageGifAnimAdd(im3, out, 0, 0, 0, 100, 1, im2);
-gdImageGifAnimEnd(out);  // End marker, same as putc(';', out);
-fclose(out); // Close file
-
-// Destroy images
-gdImageDestroy(im);
-gdImageDestroy(im2);
-gdImageDestroy(im3);
-}
- -

gdImageGifAnimAddCtx

void gdImageGifAnimAddCtx(gdImagePtr im,
gdIOCtxPtr out,
int LocalCM,
int LeftOfs,
int TopOfs,
int Delay,
int Disposal,
gdImagePtr previm)

Adds an animation frame via a <gdIOCtxPtr>.  See gdImageGifAnimAdd>.

Parameters

imThe image to add.
outThe output <gdIOCtxPtr>.
LocalCMFlag.  If 1, use a local color map for this frame.
LeftOfsLeft offset of image in frame.
TopOfsTop offset of image in frame.
DelayDelay before next frame (in 1/100 seconds)
DisposalMODE: How to treat this frame when the next one loads.
previmNULL or a pointer to the previous image written.

Returns

Nothing.

- -

gdImageGifAnimEnd

void gdImageGifAnimEnd(FILE *outFile)

Terminates the GIF file properly.

(Previous versions of this function’s documentation suggested just manually writing a semicolon (‘;’) instead since that is all this function does.  While that has no longer changed, we now suggest that you do not do this and instead always call gdImageGifAnimEnd (or equivalent) since later versions could possibly do more or different things.)

Variants

gdImageGifAnimEndCtx outputs its data via a gdIOCtx struct.

gdImageGifAnimEndPtr outputs its data to a memory buffer which it returns.

Parameters

outfilethe destination FILE*.

Returns

Nothing.

- -

gdImageGifAnimEndPtr

void * gdImageGifAnimEndPtr(int *size)

Like gdImageGifAnimEnd (which contains more information) except that it stores the data to write into memory and returns a pointer to it.

This memory must be freed by the caller when it is no longer needed.  **The caller must invoke <gdFree>(), not free(),** unless the caller is absolutely certain that the same implementations of malloc, free, etc. are used both at library build time and at application build time (but don’t; it could always change).

The ‘size’ parameter receives the total size of the block of memory.

Parameters

sizeOutput: the size of the resulting buffer.

Returns

Pointer to the resulting data or NULL if an error occurred.

- -

gdImageGifAnimEndCtx

void gdImageGifAnimEndCtx(gdIOCtx *out)

Like gdImageGifAnimEnd, but writes its data via a gdIOCtx.

Parameters

outthe destination gdIOCtx.

Returns

Nothing.

- -
- - - - - - - - - - -
void * gdImageGifPtr(gdImagePtr im,
int *size)
Identical to gdImageGif except that it returns a pointer to a memory area with the GIF data.
void gdImageGif(gdImagePtr im,
FILE *outFile)
gdImageGif outputs the specified image to the specified file in GIF format.
void gdImageGifCtx(gdImagePtr im,
gdIOCtxPtr out)
Writes a GIF image via a gdIOCtx.
gdIOCtx structures hold function pointers for doing image IO.
void * gdImageGifAnimBeginPtr(gdImagePtr im,
int *size,
int GlobalCM,
int Loops)
Like gdImageGifAnimBegin except that it outputs to a memory buffer.
void gdImageGifAnimBegin(gdImagePtr im,
FILE *outFile,
int GlobalCM,
int Loops)
This function must be called as the first function when creating a GIF animation.
void gdImageGifAnimBeginCtx(gdImagePtr im,
gdIOCtxPtr out,
int GlobalCM,
int Loops)
Like gdImageGifAnimBegin except that it outputs to gdIOCtx.
void * gdImageGifAnimAddPtr(gdImagePtr im,
int *size,
int LocalCM,
int LeftOfs,
int TopOfs,
int Delay,
int Disposal,
gdImagePtr previm)
Like gdImageGifAnimAdd (which contains more information) except that it stores the data to write into memory and returns a pointer to it.
void gdImageGifAnimAdd(gdImagePtr im,
FILE *outFile,
int LocalCM,
int LeftOfs,
int TopOfs,
int Delay,
int Disposal,
gdImagePtr previm)
This function writes GIF animation frames to GIF animation, which was initialized with gdImageGifAnimBegin.
void gdImageGifAnimAddCtx(gdImagePtr im,
gdIOCtxPtr out,
int LocalCM,
int LeftOfs,
int TopOfs,
int Delay,
int Disposal,
gdImagePtr previm)
Adds an animation frame via a gdIOCtxPtr.
void gdImageGifAnimEnd(FILE *outFile)
Terminates the GIF file properly.
void * gdImageGifAnimEndPtr(int *size)
Like gdImageGifAnimEnd (which contains more information) except that it stores the data to write into memory and returns a pointer to it.
void gdImageGifAnimEndCtx(gdIOCtx *out)
Like gdImageGifAnimEnd, but writes its data via a gdIOCtx.
void gdFree (void *ptr)
gdImagePtr gdImageCreatePaletteFromTrueColor (gdImagePtr im,
int dither,
int colorsWanted)
Preserve previous frame
Not recommended
First allocated color of palette
Restore to before start of frame
void gdImagePaletteCopy (gdImagePtr to,
gdImagePtr from)
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_interpolation-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_interpolation-c.html deleted file mode 100644 index 17f72e98d8c..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_interpolation-c.html +++ /dev/null @@ -1,59 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_interpolation.c - - - - - - - - - -

gd_interpolation.c

Summary
gd_interpolation.c
Functions
gdImageScale
gdImageRotateInterpolated
Affine transformation
Transform
gdTransformAffineGetImageApplies an affine transformation to a region and return an image containing the complete transformation.
gdTransformAffineCopyApplies an affine transformation to a region and copy the result in a destination to the given position.
gdTransformAffineBoundingBoxReturns the bounding box of an affine transformation applied to a rectangular area <gdRect>
gdImageSetInterpolationMethod
gdImageGetInterpolationMethodReturn the interpolation mode set in ‘im’.
- -

Functions

- -

gdImageScale

gdImagePtr gdImageScale(const gdImagePtr src,
const unsigned int new_width,
const unsigned int new_height)
- -

gdImageRotateInterpolated

gdImagePtr gdImageRotateInterpolated(const gdImagePtr src,
const float angle,
int bgcolor)
- -

Affine transformation

Summary
Transform
gdTransformAffineGetImageApplies an affine transformation to a region and return an image containing the complete transformation.
gdTransformAffineCopyApplies an affine transformation to a region and copy the result in a destination to the given position.
gdTransformAffineBoundingBoxReturns the bounding box of an affine transformation applied to a rectangular area <gdRect>
gdImageSetInterpolationMethod
gdImageGetInterpolationMethodReturn the interpolation mode set in ‘im’.
- -

Transform

- -

gdTransformAffineGetImage

int gdTransformAffineGetImage(gdImagePtr *dst,
const gdImagePtr src,
gdRectPtr src_area,
const double affine[6])

Applies an affine transformation to a region and return an image containing the complete transformation.

Parameters

dstPointer to a gdImagePtr to store the created image, NULL when the creation or the transformation failed
srcSource image
src_arearectangle defining the source region to transform
dstYY position in the destination image
affineThe desired affine transformation

Returns

GD_TRUE if the affine is rectilinear or GD_FALSE

- -

gdTransformAffineCopy

int gdTransformAffineCopy(gdImagePtr dst,
int dst_x,
int dst_y,
const gdImagePtr src,
gdRectPtr src_region,
const double affine[6])

Applies an affine transformation to a region and copy the result in a destination to the given position.

Parameters

dstImage to draw the transformed image
srcSource image
dstXX position in the destination image
dstYY position in the destination image
src_areaRectangular region to rotate in the src image

Returns

GD_TRUE if the affine is rectilinear or GD_FALSE

- -

gdTransformAffineBoundingBox

int gdTransformAffineBoundingBox(gdRectPtr src,
const double affine[6],
gdRectPtr bbox)

Returns the bounding box of an affine transformation applied to a rectangular area <gdRect>

Parameters

srcRectangular source area for the affine transformation
affinethe affine transformation
bboxthe resulting bounding box

Returns

GD_TRUE if the affine is rectilinear or GD_FALSE

- -

gdImageSetInterpolationMethod

int gdImageSetInterpolationMethod(gdImagePtr im,
gdInterpolationMethod id)
- -

gdImageGetInterpolationMethod

gdInterpolationMethod gdImageGetInterpolationMethod(gdImagePtr im)

Return the interpolation mode set in ‘im’.  This is here so that the value can be read via a language or VM with an FFI but no (portable) way to extract the value from the struct.

- -
- - - - - - - - - - -
gdImagePtr gdImageScale(const gdImagePtr src,
const unsigned int new_width,
const unsigned int new_height)
gdImagePtr gdImageRotateInterpolated(const gdImagePtr src,
const float angle,
int bgcolor)
int gdTransformAffineGetImage(gdImagePtr *dst,
const gdImagePtr src,
gdRectPtr src_area,
const double affine[6])
Applies an affine transformation to a region and return an image containing the complete transformation.
int gdTransformAffineCopy(gdImagePtr dst,
int dst_x,
int dst_y,
const gdImagePtr src,
gdRectPtr src_region,
const double affine[6])
Applies an affine transformation to a region and copy the result in a destination to the given position.
int gdTransformAffineBoundingBox(gdRectPtr src,
const double affine[6],
gdRectPtr bbox)
Returns the bounding box of an affine transformation applied to a rectangular area gdRect
int gdImageSetInterpolationMethod(gdImagePtr im,
gdInterpolationMethod id)
gdInterpolationMethod gdImageGetInterpolationMethod(gdImagePtr im)
Return the interpolation mode set in ‘im’.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io-h.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io-h.html deleted file mode 100644 index 85ca851eec6..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io-h.html +++ /dev/null @@ -1,56 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_io.h - - - - - - - - - -

gd_io.h

Summary
gd_io.h
Types
gdIOCtxgdIOCtx structures hold function pointers for doing image IO.
- -

Types

- -

gdIOCtx

gdIOCtx structures hold function pointers for doing image IO.

Most of the gd functions that read and write files, such as gdImagePng also have variants that accept a gdIOCtx structure; see gdImagePngCtx and gdImageCreateFromJpegCtx.

Those who wish to provide their own custom routines to read and write images can populate a gdIOCtx structure with functions of their own devising to to read and write data.  For image reading, the only mandatory functions are getC and getBuf, which must return the number of characters actually read, or a negative value on error or EOF.  These functions must read the number of characters requested unless at the end of the file.

For image writing, the only mandatory functions are putC and putBuf, which return the number of characters written; these functions must write the number of characters requested except in the event of an error.  The seek and tell functions are only required in conjunction with the gd2 file format, which supports quick loading of partial images.  The gd_free function will not be invoked when calling the standard Ctx functions; it is an implementation convenience when adding new data types to gd.  For examples, see gd_png.c, gd_gd2.c, gd_jpeg.c, etc., all of which rely on gdIOCtx to implement the standard image read and write functions.

typedef struct gdIOCtx
-{
-  int (*getC) (struct gdIOCtx *);
-  int (*getBuf) (struct gdIOCtx *, void *, int wanted);
-
-  void (*putC) (struct gdIOCtx *, int);
-  int (*putBuf) (struct gdIOCtx *, const void *, int wanted);
-
-  // seek must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek!
-  int (*seek) (struct gdIOCtx *, const int);
-  long (*tell) (struct gdIOCtx *);
-
-  void (*gd_free) (struct gdIOCtx *);
-} gdIOCtx;
- -
- - - - - - - - - - -
void gdImagePng (gdImagePtr im,
FILE *outFile)
Equivalent to calling gdImagePngEx with compression of -1.
gdIOCtx structures hold function pointers for doing image IO.
void gdImagePngCtx (gdImagePtr im,
gdIOCtx *outfile)
Equivalent to calling gdImagePngCtxEx with compression of -1.
gdImagePtr gdImageCreateFromJpegCtx(gdIOCtx *infile)
See gdImageCreateFromJpeg.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io_dp-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io_dp-c.html deleted file mode 100644 index 747b62fe2ad..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io_dp-c.html +++ /dev/null @@ -1,47 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_io_dp.c - - - - - - - - - -

gd_io_dp.c

- -

Functions

- -

gdNewDynamicCtx

gdIOCtx * gdNewDynamicCtx(int initialSize,
void *data)

Return data as a dynamic pointer.

- -

gdNewDynamicCtxEx

gdIOCtx * gdNewDynamicCtxEx(int initialSize,
void *data,
int freeOKFlag)
- -

gdDPExtractData

void * gdDPExtractData (struct gdIOCtx *ctx,
int *size)
- -
- - - - - - - - - - -
gdIOCtx * gdNewDynamicCtx(int initialSize,
void *data)
Return data as a dynamic pointer.
gdIOCtx * gdNewDynamicCtxEx(int initialSize,
void *data,
int freeOKFlag)
void * gdDPExtractData (struct gdIOCtx *ctx,
int *size)
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io_file-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io_file-c.html deleted file mode 100644 index 036c3dcd444..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io_file-c.html +++ /dev/null @@ -1,39 +0,0 @@ - - -gdNewFileCtx - - - - - - - - - -

gdNewFileCtx

gdIOCtx * gdNewFileCtx(FILE *f)

Return data as a dynamic pointer.

- -
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io_ss-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io_ss-c.html deleted file mode 100644 index 4a247ccc0c7..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_io_ss-c.html +++ /dev/null @@ -1,39 +0,0 @@ - - -gdNewSSCtx - - - - - - - - - -

gdNewSSCtx

gdIOCtx * gdNewSSCtx(gdSourcePtr src,
gdSinkPtr snk)

Return data as a dynamic pointer.

- -
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_jpeg-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_jpeg-c.html deleted file mode 100644 index dd1f8509acf..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_jpeg-c.html +++ /dev/null @@ -1,83 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_jpeg.c - - - - - - - - - -

gd_jpeg.c

Summary
gd_jpeg.c
Functions
gdImageJpeggdImageJpeg outputs the specified image to the specified file in JPEG format.
gdImageJpegPtrIdentical to gdImageJpeg except that it returns a pointer to a memory area with the JPEG data.
gdImageJpegCtxWrite the image as JPEG data via a gdIOCtx.
gdImageCreateFromJpegSee gdImageCreateFromJpegEx.
gdImageCreateFromJpegExgdImageCreateFromJpegEx is called to load truecolor images from JPEG format files.
gdImageCreateFromJpegPtr
gdImageCreateFromJpegPtrEx
gdImageCreateFromJpegCtxSee gdImageCreateFromJpeg.
gdImageCreateFromJpegCtxExSee gdImageCreateFromJpeg.
- -

Functions

- -

gdImageJpeg

void gdImageJpeg(gdImagePtr im,
FILE *outFile,
int quality)

gdImageJpeg outputs the specified image to the specified file in JPEG format.  The file must be open for writing.  Under MSDOS and all versions of Windows, it is important to use “wb” as opposed to simply “w” as the mode when opening the file, and under Unix there is no penalty for doing so.  gdImageJpeg does not close the file; your code must do so.

If quality is negative, the default IJG JPEG quality value (which should yield a good general quality / size tradeoff for most situations) is used.  Otherwise, for practical purposes, quality should be a value in the range 0-95, higher quality values usually implying both higher quality and larger image sizes.

If you have set image interlacing using gdImageInterlace, this function will interpret that to mean you wish to output a progressive JPEG.  Some programs (e.g., Web browsers) can display progressive JPEGs incrementally; this can be useful when browsing over a relatively slow communications link, for example.  Progressive JPEGs can also be slightly smaller than sequential (non-progressive) JPEGs.

Variants

gdImageJpegCtx stores the image using a gdIOCtx struct.

gdImageJpegPtr stores the image to RAM.

Parameters

imThe image to save
outFileThe FILE pointer to write to.
qualityCompression quality (0-95, 0 means use the default).

Returns

Nothing.

Example

gdImagePtr im;
-int black, white;
-FILE *out;
-// Create the image
-im = gdImageCreate(100, 100);
-// Allocate background
-white = gdImageColorAllocate(im, 255, 255, 255);
-// Allocate drawing color
-black = gdImageColorAllocate(im, 0, 0, 0);
-// Draw rectangle
-gdImageRectangle(im, 0, 0, 99, 99, black);
-// Open output file in binary mode
-out = fopen("rect.jpg", "wb");
-// Write JPEG using default quality
-gdImageJpeg(im, out, -1);
-// Close file
-fclose(out);
-// Destroy image
-gdImageDestroy(im);
- -

gdImageJpegPtr

void * gdImageJpegPtr(gdImagePtr im,
int *size,
int quality)

Identical to gdImageJpeg except that it returns a pointer to a memory area with the JPEG data.  This memory must be freed by the caller when it is no longer needed.

The caller must invoke gdFree, not free().  This is because it is not guaranteed that libgd will use the same implementation of malloc, free, etc. as your proggram.

The ‘size’ parameter receives the total size of the block of memory.

Parameters

imThe image to write
sizeOutput: the size of the resulting image.
qualityCompression quality.

Returns

A pointer to the JPEG data or NULL if an error occurred.

- -

gdImageJpegCtx

void gdImageJpegCtx(gdImagePtr im,
gdIOCtx *outfile,
int quality)

Write the image as JPEG data via a gdIOCtx.  See gdImageJpeg for more details.

Parameters

imThe image to write.
outfileThe output sink.
qualityImage quality.
- -

gdImageCreateFromJpeg

gdImagePtr gdImageCreateFromJpeg(FILE *inFile)

See gdImageCreateFromJpegEx.

- -

gdImageCreateFromJpegEx

gdImagePtr gdImageCreateFromJpegEx(FILE *inFile,
int ignore_warning)

gdImageCreateFromJpegEx is called to load truecolor images from JPEG format files.  Invoke gdImageCreateFromJpegEx with an already opened pointer to a file containing the desired image.  gdImageCreateFromJpegEx returns a gdImagePtr to the new truecolor image, or NULL if unable to load the image (most often because the file is corrupt or does not contain a JPEG image).  gdImageCreateFromJpegEx does not close the file.

You can inspect the sx and sy members of the image to determine its size.  The image must eventually be destroyed using gdImageDestroy.

The returned image is always a truecolor image.

Variants

gdImageCreateFromJpegPtrEx creates an image from JPEG data already in memory.

gdImageCreateFromJpegCtxEx reads its data via the function pointers in a gdIOCtx structure.

gdImageCreateFromJpeg, gdImageCreateFromJpegPtr and gdImageCreateFromJpegCtx are equivalent to calling their Ex-named counterparts with an ignore_warning set to 1 (i.e.  TRUE).

Parameters

infileThe input FILE pointer.
ignore_warningFlag.  If true, ignores recoverable warnings.

Returns

A pointer to the new truecolor image.  This will need to be destroyed with gdImageDestroy once it is no longer needed.

On error, returns NULL.

Example

gdImagePtr im;
-FILE *in;
-in = fopen("myjpeg.jpg", "rb");
-im = gdImageCreateFromJpegEx(in, GD_TRUE);
-fclose(in);
-// ... Use the image ...
-gdImageDestroy(im);
- -

gdImageCreateFromJpegPtr

gdImagePtr gdImageCreateFromJpegPtr(int size,
void *data)

Parameters

sizesize of JPEG data in bytes.
datapointer to JPEG data.

See gdImageCreateFromJpegEx.

- -

gdImageCreateFromJpegPtrEx

gdImagePtr gdImageCreateFromJpegPtrEx(int size,
void *data,
int ignore_warning)

Parameters

sizesize of JPEG data in bytes.
datapointer to JPEG data.
ignore_warningif true, ignore recoverable warnings

See gdImageCreateFromJpegEx.

- -

gdImageCreateFromJpegCtx

gdImagePtr gdImageCreateFromJpegCtx(gdIOCtx *infile)

See gdImageCreateFromJpeg.

- -

gdImageCreateFromJpegCtxEx

gdImagePtr gdImageCreateFromJpegCtxEx(gdIOCtx *infile,
int ignore_warning)

See gdImageCreateFromJpeg.

- -
- - - - - - - - - - -
void gdImageJpeg(gdImagePtr im,
FILE *outFile,
int quality)
gdImageJpeg outputs the specified image to the specified file in JPEG format.
void * gdImageJpegPtr(gdImagePtr im,
int *size,
int quality)
Identical to gdImageJpeg except that it returns a pointer to a memory area with the JPEG data.
void gdImageJpegCtx(gdImagePtr im,
gdIOCtx *outfile,
int quality)
Write the image as JPEG data via a gdIOCtx.
gdIOCtx structures hold function pointers for doing image IO.
gdImagePtr gdImageCreateFromJpeg(FILE *inFile)
See gdImageCreateFromJpegEx.
gdImagePtr gdImageCreateFromJpegEx(FILE *inFile,
int ignore_warning)
gdImageCreateFromJpegEx is called to load truecolor images from JPEG format files.
gdImagePtr gdImageCreateFromJpegPtr(int size,
void *data)
gdImagePtr gdImageCreateFromJpegPtrEx(int size,
void *data,
int ignore_warning)
gdImagePtr gdImageCreateFromJpegCtx(gdIOCtx *infile)
See gdImageCreateFromJpeg.
gdImagePtr gdImageCreateFromJpegCtxEx(gdIOCtx *infile,
int ignore_warning)
See gdImageCreateFromJpeg.
void gdImageInterlace (gdImagePtr im,
int interlaceArg)
void gdFree (void *ptr)
The data structure in which gd stores images.
void gdImageDestroy (gdImagePtr im)
gdImageDestroy is used to free the memory associated with an image.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_matrix-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_matrix-c.html deleted file mode 100644 index 962aa7075b8..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_matrix-c.html +++ /dev/null @@ -1,65 +0,0 @@ - - -Matrix - - - - - - - - - -

Matrix

Group: Affine Matrix

Summary
MatrixGroup: Affine Matrix
Functions
gdAffineApplyToPointFApplies an affine transformation to a point (floating point gdPointF)
gdAffineInvertFind the inverse of an affine transformation.
gdAffineFlipFlip an affine transformation horizontally or vertically.
gdAffineConcatConcat (Multiply) two affine transformation matrices.
gdAffineIdentitySet up the identity matrix.
gdAffineScaleSet up a scaling matrix.
gdAffineRotateSet up a rotation affine transform.
gdAffineShearHorizontalSet up a horizontal shearing matrix || becomes \\.
gdAffineShearVerticalSet up a vertical shearing matrix, columns are untouched.
gdAffineTranslateSet up a translation matrix.
gdAffineRectilinearDetermines whether the affine transformation is axis aligned.
gdAffineEqualDetermines whether two affine transformations are equal.
- -

Functions

- -

gdAffineApplyToPointF

int gdAffineApplyToPointF (gdPointFPtr dst,
const gdPointFPtr src,
const double affine[6])

Applies an affine transformation to a point (floating point gdPointF)

Parameters

dstWhere to store the resulting point
affineSource Point
flip_horzaffine matrix

Returns

GD_TRUE if the affine is rectilinear or GD_FALSE

- -

gdAffineInvert

int gdAffineInvert (double dst[6],
const double src[6])

Find the inverse of an affine transformation.

All non-degenerate affine transforms are invertible.  Applying the inverted matrix will restore the original values.  Multiplying <src> by <dst> (commutative) will return the identity affine (rounding error possible).

Parameters

dstWhere to store the resulting affine transform
src_affineOriginal affine matrix
flip_horzWhether or not to flip horizontally
flip_vertWhether or not to flip vertically

See also

gdAffineIdentity

Returns

GD_TRUE if the affine is rectilinear or GD_FALSE

- -

gdAffineFlip

int gdAffineFlip (double dst[6],
const double src[6],
const int flip_h,
const int flip_v)

Flip an affine transformation horizontally or vertically.

Flips the affine transform, giving GD_FALSE for <flip_horz> and <flip_vert> will clone the affine matrix.  GD_TRUE for both will copy a 180° rotation.

Parameters

dstWhere to store the resulting affine transform
src_affineOriginal affine matrix
flip_hWhether or not to flip horizontally
flip_vWhether or not to flip vertically

Returns

GD_TRUE on success or GD_FALSE

- -

gdAffineConcat

int gdAffineConcat (double dst[6],
const double m1[6],
const double m2[6])

Concat (Multiply) two affine transformation matrices.

Concats two affine transforms together, i.e. the result will be the equivalent of doing first the transformation m1 and then m2.  All parameters can be the same matrix (safe to call using the same array for all three arguments).

Parameters

dstWhere to store the resulting affine transform
m1First affine matrix
m2Second affine matrix

Returns

GD_TRUE on success or GD_FALSE

- -

gdAffineIdentity

int gdAffineIdentity (double dst[6])

Set up the identity matrix.

Parameters

dstWhere to store the resulting affine transform

Returns

GD_TRUE on success or GD_FALSE

- -

gdAffineScale

int gdAffineScale (double dst[6],
const double scale_x,
const double scale_y)

Set up a scaling matrix.

Parameters

scale_xX scale factor
scale_yY scale factor

Returns

GD_TRUE on success or GD_FALSE

- -

gdAffineRotate

int gdAffineRotate (double dst[6],
const double angle)

Set up a rotation affine transform.

Like the other angle in libGD, in which increasing y moves downward, this is a counterclockwise rotation.

Parameters

dstWhere to store the resulting affine transform
angleRotation angle in degrees

Returns

GD_TRUE on success or GD_FALSE

- -

gdAffineShearHorizontal

int gdAffineShearHorizontal(double dst[6],
const double angle)

Set up a horizontal shearing matrix || becomes \\.

Parameters

dstWhere to store the resulting affine transform
angleShear angle in degrees

Returns

GD_TRUE on success or GD_FALSE

- -

gdAffineShearVertical

int gdAffineShearVertical(double dst[6],
const double angle)

Set up a vertical shearing matrix, columns are untouched.

Parameters

dstWhere to store the resulting affine transform
angleShear angle in degrees

Returns

GD_TRUE on success or GD_FALSE

- -

gdAffineTranslate

int gdAffineTranslate (double dst[6],
const double offset_x,
const double offset_y)

Set up a translation matrix.

Parameters

dstWhere to store the resulting affine transform
offset_xHorizontal translation amount
offset_yVertical translation amount

Returns

GD_TRUE on success or GD_FALSE

- -

gdAffineRectilinear

int gdAffineRectilinear (const double m[6])

Determines whether the affine transformation is axis aligned.  A tolerance has been implemented using GD_EPSILON.

Parameters

mThe affine transformation

Returns

GD_TRUE if the affine is rectilinear or GD_FALSE

- -

gdAffineEqual

int gdAffineEqual (const double m1[6],
const double m2[6])

Determines whether two affine transformations are equal.  A tolerance has been implemented using GD_EPSILON.

Parameters

m1The first affine transformation
m2The first affine transformation

Returns

GD_TRUE on success or GD_FALSE

- -
- - - - - - - - - - -
int gdAffineApplyToPointF (gdPointFPtr dst,
const gdPointFPtr src,
const double affine[6])
Applies an affine transformation to a point (floating point gdPointF)
int gdAffineInvert (double dst[6],
const double src[6])
Find the inverse of an affine transformation.
int gdAffineFlip (double dst[6],
const double src[6],
const int flip_h,
const int flip_v)
Flip an affine transformation horizontally or vertically.
int gdAffineConcat (double dst[6],
const double m1[6],
const double m2[6])
Concat (Multiply) two affine transformation matrices.
int gdAffineIdentity (double dst[6])
Set up the identity matrix.
int gdAffineScale (double dst[6],
const double scale_x,
const double scale_y)
Set up a scaling matrix.
int gdAffineRotate (double dst[6],
const double angle)
Set up a rotation affine transform.
int gdAffineShearHorizontal(double dst[6],
const double angle)
Set up a horizontal shearing matrix || becomes \\.
int gdAffineShearVertical(double dst[6],
const double angle)
Set up a vertical shearing matrix, columns are untouched.
int gdAffineTranslate (double dst[6],
const double offset_x,
const double offset_y)
Set up a translation matrix.
int gdAffineRectilinear (const double m[6])
Determines whether the affine transformation is axis aligned.
int gdAffineEqual (const double m1[6],
const double m2[6])
Determines whether two affine transformations are equal.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_nnquant-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_nnquant-c.html deleted file mode 100644 index ccfe82bf694..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_nnquant-c.html +++ /dev/null @@ -1,39 +0,0 @@ - - -gdImageNeuQuant - - - - - - - - - -

gdImageNeuQuant

gdImagePtr gdImageNeuQuant(gdImagePtr im,
const int max_color,
int sample_factor)
- -
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_png-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_png-c.html deleted file mode 100644 index beab57bbd51..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_png-c.html +++ /dev/null @@ -1,77 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_png.c - - - - - - - - - -

gd_png.c

Summary
gd_png.c
Functions
gdImageCreateFromPnggdImageCreateFromPng is called to load images from PNG format files.
gdImageCreateFromPngPtrSee gdImageCreateFromPng.
gdImageCreateFromPngCtxSee gdImageCreateFromPng.
gdImagePngExgdImagePngEx outputs the specified image to the specified file in PNG format.
gdImagePngEquivalent to calling gdImagePngEx with compression of -1.
gdImagePngPtrEquivalent to calling gdImagePngPtrEx with compression of -1.
gdImagePngPtrExIdentical to gdImagePngEx except that it returns a pointer to a memory area with the PNG data.
gdImagePngCtxEquivalent to calling gdImagePngCtxEx with compression of -1.
gdImagePngCtxExOutputs the given image as PNG data, but using a gdIOCtx instead of a file.
- -

Functions

- -

gdImageCreateFromPng

gdImagePtr gdImageCreateFromPng (FILE *inFile)

gdImageCreateFromPng is called to load images from PNG format files.  Invoke gdImageCreateFromPng with an already opened pointer to a FILE containing the desired image.  gdImageCreateFromPng returns a gdImagePtr to the new image, or NULL if unable to load the image (most often because the file is corrupt or does not contain a PNG image).  gdImageCreateFromPng does not close the file.  You can inspect the sx and sy members of the image to determine its size.  The image must eventually be destroyed using gdImageDestroy().

If the PNG image being loaded is a truecolor image, the resulting gdImagePtr will refer to a truecolor image.  If the PNG image being loaded is a palette or grayscale image, the resulting gdImagePtr will refer to a palette image. gd retains only 8 bits of resolution for each of the red, green and blue channels, and only 7 bits of resolution for the alpha channel.  The former restriction affects only a handful of very rare 48-bit color and 16-bit grayscale PNG images.  The second restriction affects all semitransparent PNG images, but the difference is essentially invisible to the eye.  7 bits of alpha channel resolution is, in practice, quite a lot.

Variants

gdImageCreateFromPngPtr creates an image from PNG data (i.e. the contents of a PNG file) already in memory.

gdImageCreateFromPngCtx reads in an image using the functions in a gdIOCtx struct.

gdImageCreateFromPngSource is similar to gdImageCreateFromPngCtx but uses the old gdSource interface.  It is obsolete.

Parameters

infileThe input FILE pointer.

Returns

A pointer to the new image or NULL if an error occurred.

Example

gdImagePtr im;
-... inside a function ...
-FILE *in;
-in = fopen("mypng.png", "rb");
-im = gdImageCreateFromPng(in);
-fclose(in);
-// ... Use the image ...
-gdImageDestroy(im);
- -

gdImageCreateFromPngPtr

gdImagePtr gdImageCreateFromPngPtr (int size,
void *data)

See gdImageCreateFromPng.

- -

gdImageCreateFromPngCtx

gdImagePtr gdImageCreateFromPngCtx (gdIOCtx *infile)

See gdImageCreateFromPng.

- -

gdImagePngEx

void gdImagePngEx (gdImagePtr im,
FILE *outFile,
int level)

gdImagePngEx outputs the specified image to the specified file in PNG format.  The file must be open for writing.  Under MSDOS and all versions of Windows, it is important to use “wb” as opposed to simply “w” as the mode when opening the file, and under Unix there is no penalty for doing so.  gdImagePngEx does not close the file; your code must do so.

In addition, gdImagePngEx allows the level of compression to be specified.  A compression level of 0 means “no compression.”  A compression level of 1 means “compressed, but as quickly as possible.”  A compression level of 9 means “compressed as much as possible to produce the smallest possible file.”  A compression level of -1 will use the default compression level at the time zlib was compiled on your system.

Variants

gdImagePng is equivalent to calling gdImagePngEx with compression of -1.

gdImagePngCtx and gdImagePngCtxEx write via a gdIOCtx instead of a file handle.

gdImagePngPtr and gdImagePngPtrEx store the image file to memory.

Parameters

imthe image to write
outFilethe output FILE* object.
levelcompression level: 0 -> none, 1-9 -> level, -1 -> default

Returns

Nothing.

Example

gdImagePtr im;
-int black, white;
-FILE *out;
-
-im = gdImageCreate(100, 100);              // Create the image
-white = gdImageColorAllocate(im, 255, 255, 255); // Alloc background
-black = gdImageColorAllocate(im, 0, 0, 0); // Allocate drawing color
-gdImageRectangle(im, 0, 0, 99, 99, black); // Draw rectangle
-out = fopen("rect.png", "wb");             // Open output file (binary)
-gdImagePngEx(im, out, 9);                  // Write PNG, max compression
-fclose(out);                               // Close file
-gdImageDestroy(im);                        // Destroy image
- -

gdImagePng

void gdImagePng (gdImagePtr im,
FILE *outFile)

Equivalent to calling gdImagePngEx with compression of -1.

Parameters

imthe image to save.
outFilethe output FILE*.

Returns

Nothing.

- -

gdImagePngPtr

void * gdImagePngPtr (gdImagePtr im,
int *size)

Equivalent to calling gdImagePngPtrEx with compression of -1.

See gdImagePngEx for more information.

Parameters

imthe image to save.
sizeOutput: size in bytes of the result.

Returns

A pointer to memory containing the image data or NULL on error.

- -

gdImagePngPtrEx

void * gdImagePngPtrEx (gdImagePtr im,
int *size,
int level)

Identical to gdImagePngEx except that it returns a pointer to a memory area with the PNG data.  This memory must be freed by the caller when it is no longer needed.  **The caller must invoke gdFree(), not free()**

The ‘size’ parameter receives the total size of the block of memory.

See gdImagePngEx for more information.

Parameters

imthe image to save.
sizeOutput: size in bytes of the result.
levelcompression level: 0 -> none, 1-9 -> level, -1 -> default

Returns

A pointer to memory containing the image data or NULL on error.

- -

gdImagePngCtx

void gdImagePngCtx (gdImagePtr im,
gdIOCtx *outfile)

Equivalent to calling gdImagePngCtxEx with compression of -1.  See gdImagePngEx for more information.

Parameters

imthe image to save.
outfilethe gdIOCtx to write to.

Returns

Nothing.

- -

gdImagePngCtxEx

Outputs the given image as PNG data, but using a gdIOCtx instead of a file.  See <gdIamgePnEx>.

Parameters

imthe image to save.
outfilethe gdIOCtx to write to.
levelcompression level: 0 -> none, 1-9 -> level, -1 -> default

Returns

Nothing.

- -
- - - - - - - - - - -
gdImagePtr gdImageCreateFromPng (FILE *inFile)
gdImageCreateFromPng is called to load images from PNG format files.
gdImagePtr gdImageCreateFromPngPtr (int size,
void *data)
See gdImageCreateFromPng.
gdImagePtr gdImageCreateFromPngCtx (gdIOCtx *infile)
See gdImageCreateFromPng.
void gdImagePngEx (gdImagePtr im,
FILE *outFile,
int level)
gdImagePngEx outputs the specified image to the specified file in PNG format.
void gdImagePng (gdImagePtr im,
FILE *outFile)
Equivalent to calling gdImagePngEx with compression of -1.
void * gdImagePngPtr (gdImagePtr im,
int *size)
Equivalent to calling gdImagePngPtrEx with compression of -1.
void * gdImagePngPtrEx (gdImagePtr im,
int *size,
int level)
Identical to gdImagePngEx except that it returns a pointer to a memory area with the PNG data.
void gdImagePngCtx (gdImagePtr im,
gdIOCtx *outfile)
Equivalent to calling gdImagePngCtxEx with compression of -1.
Outputs the given image as PNG data, but using a gdIOCtx instead of a file.
gdIOCtx structures hold function pointers for doing image IO.
The data structure in which gd stores images.
gdImagePtr gdImageCreateFromPngSource (gdSourcePtr inSource)
See gdImageCreateFromPng for documentation.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_ss-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_ss-c.html deleted file mode 100644 index 55c0b36da36..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_ss-c.html +++ /dev/null @@ -1,45 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_ss.c - - - - - - - - - -
- -

Functions

- -

gdImagePngToSink

void gdImagePngToSink (gdImagePtr im,
gdSinkPtr outSink)
- -

gdImageCreateFromPngSource

gdImagePtr gdImageCreateFromPngSource (gdSourcePtr inSource)

See gdImageCreateFromPng for documentation.  This is obsolete; use gdImageCreateFromPngCtx instead.

- -
- - - - - - - - - - -
void gdImagePngToSink (gdImagePtr im,
gdSinkPtr outSink)
gdImagePtr gdImageCreateFromPngSource (gdSourcePtr inSource)
See gdImageCreateFromPng for documentation.
gdImagePtr gdImageCreateFromPng (FILE *inFile)
gdImageCreateFromPng is called to load images from PNG format files.
gdImagePtr gdImageCreateFromPngCtx (gdIOCtx *infile)
See gdImageCreateFromPng.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_tga-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_tga-c.html deleted file mode 100644 index 666fc5369ee..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_tga-c.html +++ /dev/null @@ -1,47 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_tga.c - - - - - - - - - -

gd_tga.c

Summary
gd_tga.c
Functions
gdImageCreateFromTgaCreates a gdImage from a TGA file
gdImageCreateFromTgaPtr
gdImageCreateFromTgaCtxCreates a gdImage from a gdIOCtx referencing a TGA binary file.
- -

Functions

- -

gdImageCreateFromTga

gdImagePtr gdImageCreateFromTga(FILE *fp)

Creates a gdImage from a TGA file

Parameters

infilePointer to TGA binary file
- -

gdImageCreateFromTgaPtr

gdImagePtr gdImageCreateFromTgaPtr(int size,
void *data)
- -

gdImageCreateFromTgaCtx

gdImagePtr gdImageCreateFromTgaCtx(gdIOCtx *ctx)

Creates a gdImage from a gdIOCtx referencing a TGA binary file.

Parameters

ctxPointer to a gdIOCtx structure
- -
- - - - - - - - - - -
gdImagePtr gdImageCreateFromTga(FILE *fp)
Creates a gdImage from a TGA file
gdImagePtr gdImageCreateFromTgaPtr(int size,
void *data)
gdImagePtr gdImageCreateFromTgaCtx(gdIOCtx *ctx)
Creates a gdImage from a gdIOCtx referencing a TGA binary file.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_tiff-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_tiff-c.html deleted file mode 100644 index 3b9c2a97040..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_tiff-c.html +++ /dev/null @@ -1,53 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_tiff.c - - - - - - - - - -

gd_tiff.c

Summary
gd_tiff.c
Functions
gdImageTiffCtxWrite the gd image as a tiff file.
gdImageCreateFromTiffCtxCreate a gdImage from a TIFF file input from an gdIOCtx.
gdImageCreateFromTIFF
gdImageCreateFromTiffPtr
gdImageTiff
gdImageTiffPtr
- -

Functions

- -

gdImageTiffCtx

void gdImageTiffCtx(gdImagePtr image,
gdIOCtx *out)

Write the gd image as a tiff file.

Parameters

imagegd image structure;
outthe stream where to write
- -

gdImageCreateFromTiffCtx

gdImagePtr gdImageCreateFromTiffCtx(gdIOCtx *infile)

Create a gdImage from a TIFF file input from an gdIOCtx.

- -

gdImageCreateFromTIFF

- -

gdImageCreateFromTiffPtr

gdImagePtr gdImageCreateFromTiffPtr(int size,
void *data)
- -

gdImageTiff

void gdImageTiff(gdImagePtr im,
FILE *outFile)
- -

gdImageTiffPtr

void * gdImageTiffPtr(gdImagePtr im,
int *size)
- -
- - - - - - - - - - -
void gdImageTiffCtx(gdImagePtr image,
gdIOCtx *out)
Write the gd image as a tiff file.
gdImagePtr gdImageCreateFromTiffCtx(gdIOCtx *infile)
Create a gdImage from a TIFF file input from an gdIOCtx.
gdImagePtr gdImageCreateFromTiffPtr(int size,
void *data)
void gdImageTiff(gdImagePtr im,
FILE *outFile)
void * gdImageTiffPtr(gdImagePtr im,
int *size)
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_topal-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_topal-c.html deleted file mode 100644 index 5ad6da7172d..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_topal-c.html +++ /dev/null @@ -1,49 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_topal.c - - - - - - - - - -

gd_topal.c

Summary
gd_topal.c
Functions
gdImageTrueColorToPaletteSetMethodSelects quantization method used for subsequent gdImageTrueColorToPalette calls.
gdImageTrueColorToPaletteSetQualityChooses quality range that subsequent call to gdImageTrueColorToPalette will aim for.
gdImageCreatePaletteFromTrueColor
gdImageTrueColorToPalette
- -

Functions

- -

gdImageTrueColorToPaletteSetMethod

int gdImageTrueColorToPaletteSetMethod (gdImagePtr im,
int method,
int speed)

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.

- -

gdImageTrueColorToPaletteSetQuality

void gdImageTrueColorToPaletteSetQuality (gdImagePtr im,
int min_quality,
int max_quality)

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.

- -

gdImageCreatePaletteFromTrueColor

gdImagePtr gdImageCreatePaletteFromTrueColor (gdImagePtr im,
int dither,
int colorsWanted)
- -

gdImageTrueColorToPalette

int gdImageTrueColorToPalette (gdImagePtr im,
int dither,
int colorsWanted)
- -
- - - - - - - - - - -
int gdImageTrueColorToPaletteSetMethod (gdImagePtr im,
int method,
int speed)
Selects quantization method used for subsequent gdImageTrueColorToPalette calls.
void gdImageTrueColorToPaletteSetQuality (gdImagePtr im,
int min_quality,
int max_quality)
Chooses quality range that subsequent call to gdImageTrueColorToPalette will aim for.
gdImagePtr gdImageCreatePaletteFromTrueColor (gdImagePtr im,
int dither,
int colorsWanted)
int gdImageTrueColorToPalette (gdImagePtr im,
int dither,
int colorsWanted)
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_transform-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_transform-c.html deleted file mode 100644 index 7e4a29acf43..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_transform-c.html +++ /dev/null @@ -1,47 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_transform.c - - - - - - - - - -
- -

Functions

- -

gdImageFlipVertical

void gdImageFlipVertical(gdImagePtr im)
- -

gdImageFlipHorizontal

void gdImageFlipHorizontal(gdImagePtr im)
- -

gdImageFlipBoth

void gdImageFlipBoth(gdImagePtr im)
- -
- - - - - - - - - - -
void gdImageFlipVertical(gdImagePtr im)
void gdImageFlipHorizontal(gdImagePtr im)
void gdImageFlipBoth(gdImagePtr im)
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_version-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_version-c.html deleted file mode 100644 index 75d7f80ab08..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_version-c.html +++ /dev/null @@ -1,51 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_version.c - - - - - - - - - -
- -

Functions

- -

gdMajorVersion

int gdMajorVersion()
- -

gdMinorVersion

int gdMinorVersion()
- -

gdReleaseVersion

int gdReleaseVersion()
- -

gdExtraVersion

const char * gdExtraVersion()
- -

gdVersionString

const char * gdVersionString()
- -
- - - - - - - - - - -
int gdMajorVersion()
int gdMinorVersion()
int gdReleaseVersion()
const char * gdExtraVersion()
const char * gdVersionString()
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_wbmp-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_wbmp-c.html deleted file mode 100644 index 9d47268eb48..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_wbmp-c.html +++ /dev/null @@ -1,59 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_wbmp.c - - - - - - - - - -

gd_wbmp.c

Summary
gd_wbmp.c
Functions
gdImageWBMPCtxWrite the image as a wbmp file
gdImageCreateFromWBMPCtxReads in a WBMP image via a gdIOCtx struct.
gdImageCreateFromWBMPgdImageCreateFromWBMP is called to load images from WBMP format files.
gdImageCreateFromWBMPPtr
gdImageWBMP
gdImageWBMPPtr
- -

Functions

- -

gdImageWBMPCtx

void gdImageWBMPCtx(gdImagePtr image,
int fg,
gdIOCtx *out)

Write the image as a wbmp file

Parameters

imagegd image structure
fgthe index of the foreground color. any other value will be considered as background and will not be written
outthe stream where to write
- -

gdImageCreateFromWBMPCtx

gdImagePtr gdImageCreateFromWBMPCtx(gdIOCtx *infile)

Reads in a WBMP image via a gdIOCtx struct.  See gdImageCreateFromWBMP.

- -

gdImageCreateFromWBMP

gdImagePtr gdImageCreateFromWBMP(FILE *inFile)

gdImageCreateFromWBMP is called to load images from WBMP format files.  Invoke gdImageCreateFromWBMP with an already opened pointer to a file containing the desired image.  gdImageCreateFromWBMP returns a gdImagePtr to the new image, or NULL if unable to load the image (most often because the file is corrupt or does not contain a WBMP image).  gdImageCreateFromWBMP does not close the file.  You can inspect the sx and sy members of the image to determine its size.  The image must eventually be destroyed using gdImageDestroy.

Variants

gdImageCreateFromWBMPPtr creates an image from WBMP data (i.e. the contents of a WBMP file) already in memory.

gdImageCreateFromWBMPCtx reads in an image using the functions in a gdIOCtx struct.

Parameters

infileThe input FILE pointer

Returns

A pointer to the new image or NULL if an error occurred.

Example

gdImagePtr im;
-FILE *in;
-in = fopen("mywbmp.wbmp", "rb");
-im = gdImageCreateFromWBMP(in);
-fclose(in);
-// ... Use the image ...
-gdImageDestroy(im);
- -

gdImageCreateFromWBMPPtr

gdImagePtr gdImageCreateFromWBMPPtr(int size,
void *data)

Parameters

sizesize of WBMP data in bytes.
dataWBMP data (i.e. contents of a WBMP file).

See gdImageCreateFromWBMP.

- -

gdImageWBMP

void gdImageWBMP(gdImagePtr im,
int fg,
FILE *outFile)
- -

gdImageWBMPPtr

void * gdImageWBMPPtr(gdImagePtr im,
int *size,
int fg)
- -
- - - - - - - - - - -
void gdImageWBMPCtx(gdImagePtr image,
int fg,
gdIOCtx *out)
Write the image as a wbmp file
gdImagePtr gdImageCreateFromWBMPCtx(gdIOCtx *infile)
Reads in a WBMP image via a gdIOCtx struct.
gdIOCtx structures hold function pointers for doing image IO.
gdImagePtr gdImageCreateFromWBMP(FILE *inFile)
gdImageCreateFromWBMP is called to load images from WBMP format files.
gdImagePtr gdImageCreateFromWBMPPtr(int size,
void *data)
void gdImageWBMP(gdImagePtr im,
int fg,
FILE *outFile)
void * gdImageWBMPPtr(gdImagePtr im,
int *size,
int fg)
void gdImageDestroy (gdImagePtr im)
gdImageDestroy is used to free the memory associated with an image.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_webp-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_webp-c.html deleted file mode 100644 index ce4efcc5249..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_webp-c.html +++ /dev/null @@ -1,49 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_webp.c - - - - - - - - - -
- -

Functions

- -

gdImageWebpEx

void gdImageWebpEx (gdImagePtr im,
FILE *outFile,
int quantization)
- -

gdImageWebp

void gdImageWebp (gdImagePtr im,
FILE *outFile)
- -

gdImageWebpPtr

void * gdImageWebpPtr (gdImagePtr im,
int *size)
- -

gdImageWebpPtrEx

void * gdImageWebpPtrEx (gdImagePtr im,
int *size,
int quantization)
- -
- - - - - - - - - - -
void gdImageWebpEx (gdImagePtr im,
FILE *outFile,
int quantization)
void gdImageWebp (gdImagePtr im,
FILE *outFile)
void * gdImageWebpPtr (gdImagePtr im,
int *size)
void * gdImageWebpPtrEx (gdImagePtr im,
int *size,
int quantization)
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_xbm-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_xbm-c.html deleted file mode 100644 index 623e136890c..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gd_xbm-c.html +++ /dev/null @@ -1,51 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_xbm.c - - - - - - - - - -

gd_xbm.c

Summary
gd_xbm.c
Functions
gdImageCreateFromXbmgdImageCreateFromXbm is called to load images from X bitmap format files.
gdImageXbmCtx
- -

Functions

- -

gdImageCreateFromXbm

gdImagePtr gdImageCreateFromXbm(FILE *fd)

gdImageCreateFromXbm is called to load images from X bitmap format files.  Invoke gdImageCreateFromXbm with an already opened pointer to a file containing the desired image.  gdImageCreateFromXbm returns a gdImagePtr to the new image, or NULL if unable to load the image (most often because the file is corrupt or does not contain an X bitmap format image).  gdImageCreateFromXbm does not close the file.

You can inspect the sx and sy members of the image to determine its size.  The image must eventually be destroyed using gdImageDestroy.

Parameters

fdThe input FILE pointer

Returns

A pointer to the new image or NULL if an error occurred.

Example

gdImagePtr im;
-FILE *in;
-in = fopen("myxbm.xbm", "rb");
-im = gdImageCreateFromXbm(in);
-fclose(in);
-// ... Use the image ...
-gdImageDestroy(im);
- -

gdImageXbmCtx

void gdImageXbmCtx(gdImagePtr image,
char *file_name,
int fg,
gdIOCtx *out)
- -
- - - - - - - - - - -
gdImagePtr gdImageCreateFromXbm(FILE *fd)
gdImageCreateFromXbm is called to load images from X bitmap format files.
void gdImageXbmCtx(gdImagePtr image,
char *file_name,
int fg,
gdIOCtx *out)
The data structure in which gd stores images.
void gdImageDestroy (gdImagePtr im)
gdImageDestroy is used to free the memory associated with an image.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontg-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontg-c.html deleted file mode 100644 index 951edab3b54..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontg-c.html +++ /dev/null @@ -1,39 +0,0 @@ - - -gdFontGetGiant - - - - - - - - - -

gdFontGetGiant

gdFontPtr gdFontGetGiant (void)
- -
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontl-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontl-c.html deleted file mode 100644 index 841291cc143..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontl-c.html +++ /dev/null @@ -1,39 +0,0 @@ - - -gdFontGetLarge - - - - - - - - - -

gdFontGetLarge

gdFontPtr gdFontGetLarge (void)
- -
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontmb-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontmb-c.html deleted file mode 100644 index eca8703bb6d..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontmb-c.html +++ /dev/null @@ -1,39 +0,0 @@ - - -gdFontGetMediumBold - - - - - - - - - -

gdFontGetMediumBold

gdFontPtr gdFontGetMediumBold (void)
- -
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfonts-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfonts-c.html deleted file mode 100644 index 29b78571312..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfonts-c.html +++ /dev/null @@ -1,39 +0,0 @@ - - -gdFontGetSmall - - - - - - - - - -

gdFontGetSmall

gdFontPtr gdFontGetSmall (void)
- -
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontt-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontt-c.html deleted file mode 100644 index 7ae8ca25454..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfontt-c.html +++ /dev/null @@ -1,39 +0,0 @@ - - -gdFontGetTiny - - - - - - - - - -

gdFontGetTiny

gdFontPtr gdFontGetTiny (void)
- -
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdft-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdft-c.html deleted file mode 100644 index 62a554de960..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdft-c.html +++ /dev/null @@ -1,70 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdft.c - - - - - - - - - -

gdft.c

Summary
gdft.c
Functions
gdImageStringTTF
gdFreeFontCache
gdFontCacheShutdown
gdImageStringFTRender a utf8 string onto a gd image.
gdFontCacheSetup
gdImageStringFTExgdImageStringFTEx extends the capabilities of gdImageStringFT by providing a way to pass additional parameters.
gdFTUseFontConfig
- -

Functions

- -

gdImageStringTTF

char * gdImageStringTTF (gdImage *im,
int *brect,
int fg,
char *fontlist,
double ptsize,
double angle,
int x,
int y,
char *string)
- -

gdFreeFontCache

void gdFreeFontCache ()
- -

gdFontCacheShutdown

void gdFontCacheShutdown ()
- -

gdImageStringFT

char * gdImageStringFT (gdImage *im,
int *brect,
int fg,
char *fontlist,
double ptsize,
double angle,
int x,
int y,
char *string)

Render a utf8 string onto a gd image.

- -

gdFontCacheSetup

int gdFontCacheSetup (void)
- -

gdImageStringFTEx

gdImageStringFTEx extends the capabilities of gdImageStringFT by providing a way to pass additional parameters.

If the strex parameter is not null, it must point to a gdFTStringExtra structure.  As of gd 2.0.5, this structure is defined as follows:

typedef struct {
-    // logical OR of gdFTEX_ values
-    int flags;
-
-    // fine tune line spacing for '\n'
-    double linespacing;
-
-    // Preferred character mapping
-    int charmap;
-
-    // Rendering resolution
-    int hdpi;
-    int vdpi;
-    char *xshow;
-    char *fontpath;
-} gdFTStringExtra, *gdFTStringExtraPtr;

To output multiline text with a specific line spacing, include gdFTEX_LINESPACE in the setting of flags:

flags |= gdFTEX_LINESPACE;

And also set linespacing to the desired spacing, expressed as a multiple of the font height.  Thus a line spacing of 1.0 is the minimum to guarantee that lines of text do not collide.

If gdFTEX_LINESPACE is not present, or strex is null, or gdImageStringFT is called, linespacing defaults to 1.05.

To specify a preference for Unicode, Shift_JIS Big5 character encoding, set or To output multiline text with a specific line spacing, include gdFTEX_CHARMAP in the setting of flags:

flags |= gdFTEX_CHARMAP;

And set charmap to the desired value, which can be any of gdFTEX_Unicode, gdFTEX_Shift_JIS, gdFTEX_Big5, or gdFTEX_Adobe_Custom.  If you do not specify a preference, Unicode will be tried first.  If the preferred character mapping is not found in the font, other character mappings are attempted.

GD operates on the assumption that the output image will be rendered to a computer screen.  By default, gd passes a resolution of 96 dpi to the freetype text rendering engine.  This influences the “hinting” decisions made by the renderer.  To specify a different resolution, set hdpi and vdpi accordingly (in dots per inch) and add gdFTEX_RESOLUTION to flags:

flags | gdFTEX_RESOLUTION;

GD 2.0.29 and later will normally attempt to apply kerning tables, if fontconfig is available, to adjust the relative positions of consecutive characters more ideally for that pair of characters.  This can be turn off by specifying the gdFTEX_DISABLE_KERNING flag:

flags | gdFTEX_DISABLE_KERNING;

GD 2.0.29 and later can return a vector of individual character position advances, occasionally useful in applications that must know exactly where each character begins.  This is returned in the xshow element of the gdFTStringExtra structure if the gdFTEX_XSHOW flag is set:

flags | gdFTEX_XSHOW;

The caller is responsible for calling gdFree() on the xshow element after the call if gdFTEX_XSHOW is set.

GD 2.0.29 and later can also return the path to the actual font file used if the gdFTEX_RETURNFONTPATHNAME flag is set.  This is useful because GD 2.0.29 and above are capable of selecting a font automatically based on a fontconfig font pattern when fontconfig is available.  This information is returned in the fontpath element of the gdFTStringExtra structure.

flags | gdFTEX_RETURNFONTPATHNAME;

The caller is responsible for calling gdFree() on the fontpath element after the call if gdFTEX_RETURNFONTPATHNAME is set.

GD 2.0.29 and later can use fontconfig to resolve font names, including fontconfig patterns, if the gdFTEX_FONTCONFIG flag is set.  As a convenience, this behavior can be made the default by calling gdFTUseFontConfig with a nonzero value.  In that situation it is not necessary to set the gdFTEX_FONTCONFIG flag on every call; however explicit font path names can still be used if the gdFTEX_FONTPATHNAME flag is set:

flags | gdFTEX_FONTPATHNAME;

Unless gdFTUseFontConfig has been called with a nonzero value, GD 2.0.29 and later will still expect the fontlist argument to the freetype text output functions to be a font file name or list thereof as in previous versions.  If you do not wish to make fontconfig the default, it is still possible to force the use of fontconfig for a single call to the freetype text output functions by setting the gdFTEX_FONTCONFIG flag:

flags | gdFTEX_FONTCONFIG;

GD 2.0.29 and above can use fontconfig to resolve font names, including fontconfig patterns, if the gdFTEX_FONTCONFIG flag is set.  As a convenience, this behavior can be made the default by calling gdFTUseFontConfig with a nonzero value.  In that situation it is not necessary to set the gdFTEX_FONTCONFIG flag on every call; however explicit font path names can still be used if the gdFTEX_FONTPATHNAME flag is set:

flags | gdFTEX_FONTPATHNAME;

For more information, see gdImageStringFT.

- -

gdFTUseFontConfig

int gdFTUseFontConfig(int flag)
- -
- - - - - - - - - - -
char * gdImageStringTTF (gdImage *im,
int *brect,
int fg,
char *fontlist,
double ptsize,
double angle,
int x,
int y,
char *string)
void gdFreeFontCache ()
void gdFontCacheShutdown ()
char * gdImageStringFT (gdImage *im,
int *brect,
int fg,
char *fontlist,
double ptsize,
double angle,
int x,
int y,
char *string)
Render a utf8 string onto a gd image.
int gdFontCacheSetup (void)
int gdFTUseFontConfig(int flag)
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfx-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfx-c.html deleted file mode 100644 index 0a96ca4530e..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdfx-c.html +++ /dev/null @@ -1,47 +0,0 @@ - - -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfx.c - - - - - - - - - -

gdfx.c

Summary
gdfx.c
Functions
gdImageStringFTCircle
gdImageSquareToCircle
gdImageSharpenSharpen function added on 2003-11-19 by Paul Troughton (paul<dot>troughton<at>ieee<dot>org) Simple 3x3 convolution kernel Makes use of seperability Faster, but less flexible, than full-blown unsharp masking pct is sharpening percentage, and can be greater than 100 Silently does nothing to non-truecolor images Silently does nothing for pct<0, as not a useful blurring function Leaves transparency/alpha-channel untouched
- -

Functions

- -

gdImageStringFTCircle

char * gdImageStringFTCircle (gdImagePtr im,
int cx,
int cy,
double radius,
double textRadius,
double fillPortion,
char *font,
double points,
char *top,
char *bottom,
int fgcolor)
- -

gdImageSquareToCircle

gdImagePtr gdImageSquareToCircle (gdImagePtr im,
int radius)
- -

gdImageSharpen

void gdImageSharpen (gdImagePtr im,
int pct)

Sharpen function added on 2003-11-19 by Paul Troughton (paul<dot>troughton<at>ieee<dot>org) Simple 3x3 convolution kernel Makes use of seperability Faster, but less flexible, than full-blown unsharp masking pct is sharpening percentage, and can be greater than 100 Silently does nothing to non-truecolor images Silently does nothing for pct<0, as not a useful blurring function Leaves transparency/alpha-channel untouched

- -
- - - - - - - - - - -
char * gdImageStringFTCircle (gdImagePtr im,
int cx,
int cy,
double radius,
double textRadius,
double fillPortion,
char *font,
double points,
char *top,
char *bottom,
int fgcolor)
gdImagePtr gdImageSquareToCircle (gdImagePtr im,
int radius)
void gdImageSharpen (gdImagePtr im,
int pct)
Sharpen function added on 2003-11-19 by Paul Troughton (paul<dot>troughton<at>ieee<dot>org) Simple 3x3 convolution kernel Makes use of seperability Faster, but less flexible, than full-blown unsharp masking pct is sharpening percentage, and can be greater than 100 Silently does nothing to non-truecolor images Silently does nothing for pct<0, as not a useful blurring function Leaves transparency/alpha-channel untouched
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdhelpers-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdhelpers-c.html deleted file mode 100644 index 218c8617df4..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdhelpers-c.html +++ /dev/null @@ -1,39 +0,0 @@ - - -gdFree - - - - - - - - - -

gdFree

void gdFree (void *ptr)
- -
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdxpm-c.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdxpm-c.html deleted file mode 100644 index 4130aea9658..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/gdxpm-c.html +++ /dev/null @@ -1,45 +0,0 @@ - - -gdImageCreateFromXpm - - - - - - - - - -

gdImageCreateFromXpm

gdImagePtr gdImageCreateFromXpm(char *filename)

gdImageCreateFromXbm is called to load images from XPM X Window System color bitmap format files.  This function is available only if HAVE_XPM is selected in the Makefile and the Xpm library is linked with the application.  Unlike most gd file functions, the Xpm functions require filenames, not file pointers.  gdImageCreateFromXpm returns a gdImagePtr to the new image, or NULL if unable to load the image (most often because the file is corrupt or does not contain an XPM bitmap format image).  You can inspect the sx and sy members of the image to determine its size.  The image must eventually be destroyed using gdImageDestroy.

Parameters

filenameThe input filename (not FILE pointer)

Returns

A pointer to the new image or NULL if an error occurred.

Example

gdImagePtr im;
-FILE *in;
-in = fopen("myxpm.xpm", "rb");
-im = gdImageCreateFromXpm(in);
-fclose(in);
-// ... Use the image ...
-gdImageDestroy(im);
- -
- - - - - - - - - - -
gdImagePtr gdImageCreateFromXbm(FILE *fd)
gdImageCreateFromXbm is called to load images from X bitmap format files.
gdImagePtr gdImageCreateFromXpm(char *filename)
gdImageCreateFromXbm is called to load images from XPM X Window System color bitmap format files.
The data structure in which gd stores images.
void gdImageDestroy (gdImagePtr im)
gdImageDestroy is used to free the memory associated with an image.
- - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/license-txt.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/license-txt.html deleted file mode 100644 index 5f662f1eb44..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/license-txt.html +++ /dev/null @@ -1,108 +0,0 @@ - - -License - - - - - - - - - -

License

Credits and license terms

In order to resolve any possible confusion regarding the authorship of
-gd, the following copyright statement covers all of the authors who
-have required such a statement. If you are aware of any oversights in
-this copyright notice, please contact Pierre-A. Joye who will be
-pleased to correct them.
-
-   Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004 by Cold Spring Harbor Laboratory. Funded under
-   Grant P41-RR02188 by the National Institutes of Health.
-
-   Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004 by Boutell.Com, Inc.
-
-   Portions relating to GD2 format copyright 1999, 2000, 2001, 2002,
-   2003, 2004 Philip Warner.
-
-   Portions relating to PNG copyright 1999, 2000, 2001, 2002, 2003,
-   2004 Greg Roelofs.
-
-   Portions relating to gdttf.c copyright 1999, 2000, 2001, 2002,
-   2003, 2004 John Ellson (ellson@graphviz.org).
-
-   Portions relating to gdft.c copyright 2001, 2002, 2003, 2004 John
-   Ellson (ellson@graphviz.org).
-
-   Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
-   Pierre-Alain Joye (pierre@libgd.org).
-
-   Portions relating to JPEG and to color quantization copyright
-   2000, 2001, 2002, 2003, 2004, Doug Becker and copyright (C) 1994,
-   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Thomas
-   G. Lane. This software is based in part on the work of the
-   Independent JPEG Group. See the file README-JPEG.TXT for more
-   information.
-
-   Portions relating to GIF compression copyright 1989 by Jef
-   Poskanzer and David Rowley, with modifications for thread safety
-   by Thomas Boutell.
-
-   Portions relating to GIF decompression copyright 1990, 1991, 1993
-   by David Koblas, with modifications for thread safety by Thomas
-   Boutell.
-
-   Portions relating to WBMP copyright 2000, 2001, 2002, 2003, 2004
-   Maurice Szmurlo and Johan Van den Brande.
-
-   Portions relating to GIF animations copyright 2004 Jaakko Hyvätti
-   (jaakko.hyvatti@iki.fi)
-
-Permission has been granted to copy, distribute and modify gd in
-any context without fee, including a commercial application,
-provided that this notice is present in user-accessible supporting
-documentation.
-
-This does not affect your ownership of the derived work itself,
-and the intent is to assure proper credit for the authors of gd,
-not to interfere with your productive use of gd. If you have
-questions, ask. "Derived works" includes all programs that utilize
-the library. Credit must be given in user-accessible
-documentation.
-
-This software is provided "AS IS." The copyright holders disclaim
-all warranties, either express or implied, including but not
-limited to implied warranties of merchantability and fitness for a
-particular purpose, with respect to this code and accompanying
-documentation.
-
-Although their code does not appear in the current release, the
-authors also wish to thank Hutchison Avenue Software Corporation
-for their prior contributions.
- -
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/preamble-txt.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/preamble-txt.html deleted file mode 100644 index 7dcb09b2d64..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/files/preamble-txt.html +++ /dev/null @@ -1,89 +0,0 @@ - - -About LibGD 2.2.3 - - - - - - - - - -

About LibGD 2.2.3

What is gd?

gd is a graphics library.  It allows your code to quickly draw images complete with lines, arcs, text, multiple colors, cut and paste from other images, and flood fills, and write out the result as a PNG or JPEG file.  This is particularly useful in World Wide Web applications, where PNG and JPEG are two of the formats accepted for inline images by most browsers.

gd is not a paint program.  If you are looking for a paint program, you are looking in the wrong place.  If you are not a programmer, you are looking in the wrong place, unless you are installing a required library in order to run an application.

gd does not provide for every possible desirable graphics operation.  It is not necessary or desirable for gd to become a kitchen-sink graphics package, but version 2.0 does include most frequently requested features, including both truecolor and palette images, resampling (smooth resizing of truecolor images) and so forth.

gd basics: using gd in your program

gd lets you create PNG or JPEG images on the fly.  To use gd in your program, include the file gd.h, and link with the gd library and the other required libraries; the syntax for most Unix flavors is:

-lgd -lpng -lz -ljpeg -lfreetype -lm

Assuming that all of these libraries are available.

If you want to use the provided simple fonts, include gdfontt.h, gdfonts.h, gdfontmb.h, gdfontl.h and/or gdfontg.h.  For more impressive results, install FreeType 2.x and use the gdImageStringFT function.  If you are not using the provided Makefile and/or a library-based approach, be sure to include the source modules as well in your project.

Here is a short example program.  (For a more advanced example, see gddemo.c, included in the distribution. gddemo.c is NOT the same program; it demonstrates additional features!)

/* Bring in gd library functions */
-#include "gd.h"
-
-/* Bring in standard I/O so we can output the PNG to a file */
-#include <stdio.h>
-
-int main() {
-  /* Declare the image */
-  gdImagePtr im;
-  /* Declare output files */
-  FILE *pngout, *jpegout;
-  /* Declare color indexes */
-  int black;
-  int white;
-
-  /* Allocate the image: 64 pixels across by 64 pixels tall */
-  im = gdImageCreate(64, 64);
-
-  /* Allocate the color black (red, green and blue all minimum).
-    Since this is the first color in a new image, it will
-    be the background color. */
-  black = gdImageColorAllocate(im, 0, 0, 0);
-
-  /* Allocate the color white (red, green and blue all maximum). */
-  white = gdImageColorAllocate(im, 255, 255, 255);
-
-  /* Draw a line from the upper left to the lower right,
-    using white color index. */
-  gdImageLine(im, 0, 0, 63, 63, white);
-
-  /* Open a file for writing. "wb" means "write binary", important
-    under MSDOS, harmless under Unix. */
-  pngout = fopen("test.png", "wb");
-
-  /* Do the same for a JPEG-format file. */
-  jpegout = fopen("test.jpg", "wb");
-
-  /* Output the image to the disk file in PNG format. */
-  gdImagePng(im, pngout);
-
-  /* Output the same image in JPEG format, using the default
-    JPEG quality setting. */
-  gdImageJpeg(im, jpegout, -1);
-
-  /* Close the files. */
-  fclose(pngout);
-  fclose(jpegout);
-
-  /* Destroy the image in memory. */
-  gdImageDestroy(im);
-}
- -
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index.html deleted file mode 100644 index d426aa1c9ae..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Constants.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Constants.html deleted file mode 100644 index 8683e13ac45..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Constants.html +++ /dev/null @@ -1,34 +0,0 @@ - - -Constant Index - - - - - - - - - -
Constant Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
G
 GD_BELL
 GD_BESSEL
 GD_BICUBIC
 GD_BICUBIC_FIXED
 GD_BILINEAR_FIXED
 GD_BLACKMAN
 GD_BOX
 GD_BSPLINE
 GD_CATMULLROM
 GD_CROP_BLACK
 GD_CROP_DEFAULT
 GD_CROP_SIDES
 GD_CROP_TRANSPARENT
 GD_CROP_WHITE
 GD_GAUSSIAN
 GD_GENERALIZED_CUBIC
 GD_HAMMING
 GD_HANNING
 GD_HERMITE
 GD_LINEAR
 GD_MITCHELL
 GD_NEAREST_NEIGHBOUR
 GD_POWER
 GD_QUADRATIC
 GD_SINC
 GD_TRIANGLE
 GD_WEIGHTED4
 gdCropMode
 gdDisposalNone
 gdDisposalRestoreBackground
 gdDisposalRestorePrevious
 gdDisposalUnknown
 gdImageGifAnim
 gdInterpolationMethod
- -
Bell
Bessel
Bicubic
fixed point bicubic integer
fixed point bilinear
Blackman
Box
BSpline
Catmullrom
Crop black borders
Default crop mode (4 corners or background)
Crop using colors of the 4 corners
Crop using the transparent color
Crop white borders
Gaussian
Generalized cubic
Hamming
Hannig
Hermite
bilinear interpolation
Mitchell
Nearest neighbour interpolation
Power
Quadratic
Sinc
Triangle
4 pixels weighted bilinear interpolation
Preserve previous frame
First allocated color of palette
Restore to before start of frame
Not recommended
- -
- - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Files.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Files.html deleted file mode 100644 index f000f2feb40..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Files.html +++ /dev/null @@ -1,34 +0,0 @@ - - -File Index - - - - - - - - - -
File Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
G
 gd.c
 gd.h
 gd_bmp.c
 gd_crop.c
 gd_filename.c
 gd_filter.c
 gd_gd.c
 gd_gd2.c
 gd_gif_in.c
 gd_gif_out.c
 gd_interpolation.c
 gd_io.h
 gd_io_dp.c
 gd_jpeg.c
 gd_png.c
 gd_ss.c
 gd_tga.c
 gd_tiff.c
 gd_topal.c
 gd_transform.c
 gd_version.c
 gd_wbmp.c
 gd_webp.c
 gd_xbm.c
 gdft.c
 gdfx.c
- - - -
- - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Functions.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Functions.html deleted file mode 100644 index 70e638a53d6..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Functions.html +++ /dev/null @@ -1,34 +0,0 @@ - - -Function Index - - - - - - - - - -
Function Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
G
 gdAffineApplyToPointF
 gdAffineConcat
 gdAffineEqual
 gdAffineFlip
 gdAffineIdentity
 gdAffineInvert
 gdAffineRectilinear
 gdAffineRotate
 gdAffineScale
 gdAffineShearHorizontal
 gdAffineShearVertical
 gdAffineTranslate
 gdAlphaBlend
 gdClearErrorMethod
 gdColorMapLookup
 gdDPExtractData
 gdExtraVersion
 gdFontCacheSetup
 gdFontCacheShutdown
 gdFontGetGiant
 gdFontGetLarge
 gdFontGetMediumBold
 gdFontGetSmall
 gdFontGetTiny
 gdFree
 gdFreeFontCache
 gdFTUseFontConfig
 gdImageAABlend
 gdImageAlphaBlending
 gdImageArc
 gdImageBmp
 gdImageBmpCtx
 gdImageBmpPtr
 gdImageBoundsSafe
 gdImageBrightness
 gdImageChar
 gdImageCharUp
 gdImageClone
 gdImageColor
 gdImageColorAllocate
 gdImageColorAllocateAlpha
 gdImageColorClosest
 gdImageColorClosestAlpha
 gdImageColorClosestHWB
 gdImageColorDeallocate
 gdImageColorExact
 gdImageColorExactAlpha
 gdImageColorMatch
 gdImageColorReplace
 gdImageColorReplaceArray
 gdImageColorReplaceCallback
 gdImageColorReplaceThreshold
 gdImageColorResolve
 gdImageColorResolveAlpha
 gdImageColorTransparent
 gdImageCompare
 gdImageContrast
 gdImageConvolution
 gdImageCopy
 gdImageCopyGaussianBlurred
 gdImageCopyMerge
 gdImageCopyMergeGray
 gdImageCopyResampled
 gdImageCopyResized
 gdImageCopyRotated
 gdImageCreate
 gdImageCreateFromBmp
 gdImageCreateFromBmpCtx
 gdImageCreateFromBmpPtr
 gdImageCreateFromFile
 gdImageCreateFromGd
 gdImageCreateFromGd2
 gdImageCreateFromGd2Ctx
 gdImageCreateFromGd2Part
 gdImageCreateFromGd2PartCtx
 gdImageCreateFromGd2PartPtr
 gdImageCreateFromGd2Ptr
 gdImageCreateFromGdCtx
 gdImageCreateFromGdPtr
 gdImageCreateFromGif
 gdImageCreateFromGifCtx
 gdImageCreateFromGifPtr
 gdImageCreateFromJpeg
 gdImageCreateFromJpegCtx
 gdImageCreateFromJpegCtxEx
 gdImageCreateFromJpegEx
 gdImageCreateFromJpegPtr
 gdImageCreateFromJpegPtrEx
 gdImageCreateFromPng
 gdImageCreateFromPngCtx
 gdImageCreateFromPngPtr
 gdImageCreateFromPngSource
 gdImageCreateFromTga
 gdImageCreateFromTgaCtx
 gdImageCreateFromTgaPtr
 gdImageCreateFromTIFF
 gdImageCreateFromTiffCtx
 gdImageCreateFromTiffPtr
 gdImageCreateFromWBMP
 gdImageCreateFromWBMPCtx
 gdImageCreateFromWBMPPtr
 gdImageCreateFromXbm
 gdImageCreateFromXpm
 gdImageCreatePaletteFromTrueColor
 gdImageCreateTrueColor
 gdImageCrop
 gdImageCropAuto
 gdImageCropThreshold
 gdImageDashedLine
 gdImageDestroy
 gdImageEdgeDetectQuick
 gdImageEllipse
 gdImageEmboss
 gdImageFile
 gdImageFill
 gdImageFilledArc
 gdImageFilledEllipse
 gdImageFilledPolygon
 gdImageFilledRectangle
 gdImageFillToBorder
 gdImageFlipBoth
 gdImageFlipHorizontal
 gdImageFlipVertical
 gdImageGaussianBlur
 gdImageGd
 gdImageGd2
 gdImageGd2Ptr
 gdImageGdPtr
 gdImageGetClip
 gdImageGetInterpolationMethod
 gdImageGetPixel
 gdImageGetTrueColorPixel
 gdImageGif
 gdImageGifAnimAdd
 gdImageGifAnimAddCtx
 gdImageGifAnimAddPtr
 gdImageGifAnimBegin
 gdImageGifAnimBeginCtx
 gdImageGifAnimBeginPtr
 gdImageGifAnimEnd
 gdImageGifAnimEndCtx
 gdImageGifAnimEndPtr
 gdImageGifCtx
 gdImageGifPtr
 gdImageGrayScale
 gdImageInterlace
 gdImageJpeg
 gdImageJpegCtx
 gdImageJpegPtr
 gdImageLine
 gdImageMeanRemoval
 gdImageNegate
 gdImageNeuQuant
 gdImageOpenPolygon
 gdImagePaletteCopy
 gdImagePaletteToTrueColor
 gdImagePixelate
 gdImagePng
 gdImagePngCtx
 gdImagePngCtxEx
 gdImagePngEx
 gdImagePngPtr
 gdImagePngPtrEx
 gdImagePngToSink
 gdImagePolygon
 gdImageRectangle
 gdImageRotateInterpolated
 gdImageSaveAlpha
 gdImageScale
 gdImageScatter
 gdImageScatterColor
 gdImageScatterEx
 gdImageSelectiveBlur
 gdImageSetAntiAliased
 gdImageSetAntiAliasedDontBlend
 gdImageSetBrush
 gdImageSetClip
 gdImageSetInterpolationMethod
 gdImageSetPixel
 gdImageSetResolution
 gdImageSetStyle
 gdImageSetThickness
 gdImageSetTile
 gdImageSharpen
 gdImageSmooth
 gdImageSquareToCircle
 gdImageString
 gdImageString16
 gdImageStringFT
 gdImageStringFTCircle
 gdImageStringFTEx
 gdImageStringTTF
 gdImageStringUp
 gdImageStringUp16
 gdImageTiff
 gdImageTiffCtx
 gdImageTiffPtr
 gdImageTrueColorToPalette
 gdImageTrueColorToPaletteSetMethod
 gdImageTrueColorToPaletteSetQuality
 gdImageWBMP
 gdImageWBMPCtx
 gdImageWBMPPtr
 gdImageWebp
 gdImageWebpEx
 gdImageWebpPtr
 gdImageWebpPtrEx
 gdImageXbmCtx
 gdLayerMultiply
 gdLayerOverlay
 gdMajorVersion
 gdMinorVersion
 gdNewDynamicCtx
 gdNewDynamicCtxEx
 gdNewFileCtx
 gdNewSSCtx
 gdReleaseVersion
 gdSetErrorMethod
 gdSupportsFileType
 gdTransformAffineBoundingBox
 gdTransformAffineCopy
 gdTransformAffineGetImage
 gdVersionString
- -
int gdAffineApplyToPointF (gdPointFPtr dst,
const gdPointFPtr src,
const double affine[6])
Applies an affine transformation to a point (floating point gdPointF)
int gdAffineConcat (double dst[6],
const double m1[6],
const double m2[6])
Concat (Multiply) two affine transformation matrices.
int gdAffineEqual (const double m1[6],
const double m2[6])
Determines whether two affine transformations are equal.
int gdAffineFlip (double dst[6],
const double src[6],
const int flip_h,
const int flip_v)
Flip an affine transformation horizontally or vertically.
int gdAffineIdentity (double dst[6])
Set up the identity matrix.
int gdAffineInvert (double dst[6],
const double src[6])
Find the inverse of an affine transformation.
int gdAffineRectilinear (const double m[6])
Determines whether the affine transformation is axis aligned.
int gdAffineRotate (double dst[6],
const double angle)
Set up a rotation affine transform.
int gdAffineScale (double dst[6],
const double scale_x,
const double scale_y)
Set up a scaling matrix.
int gdAffineShearHorizontal(double dst[6],
const double angle)
Set up a horizontal shearing matrix || becomes \\.
int gdAffineShearVertical(double dst[6],
const double angle)
Set up a vertical shearing matrix, columns are untouched.
int gdAffineTranslate (double dst[6],
const double offset_x,
const double offset_y)
Set up a translation matrix.
int gdAlphaBlend (int dst,
int src)
void gdClearErrorMethod(void)
int gdColorMapLookup(const gdColorMap color_map,
const char *color_name,
int *r,
int *g,
int *b)
void * gdDPExtractData (struct gdIOCtx *ctx,
int *size)
const char * gdExtraVersion()
int gdFontCacheSetup (void)
void gdFontCacheShutdown ()
gdFontPtr gdFontGetGiant (void)
gdFontPtr gdFontGetLarge (void)
gdFontPtr gdFontGetMediumBold (void)
gdFontPtr gdFontGetSmall (void)
gdFontPtr gdFontGetTiny (void)
void gdFree (void *ptr)
void gdFreeFontCache ()
int gdFTUseFontConfig(int flag)
void gdImageAABlend (gdImagePtr im)
NO-OP, kept for library compatibility.
void gdImageAlphaBlending (gdImagePtr im,
int alphaBlendingArg)
void gdImageArc (gdImagePtr im,
int cx,
int cy,
int w,
int h,
int s,
int e,
int color)
void gdImageBmp(gdImagePtr im,
FILE *outFile,
int compression)
void gdImageBmpCtx(gdImagePtr im,
gdIOCtxPtr out,
int compression)
void * gdImageBmpPtr(gdImagePtr im,
int *size,
int compression)
int gdImageBoundsSafe (gdImagePtr im,
int x,
int y)
int gdImageBrightness(gdImagePtr src,
int brightness)
Set the brightness level level for the image src.
void gdImageChar (gdImagePtr im,
gdFontPtr f,
int x,
int y,
int c,
int color)
void gdImageCharUp (gdImagePtr im,
gdFontPtr f,
int x,
int y,
int c,
int color)
gdImagePtr gdImageClone (gdImagePtr src)
int gdImageColor(gdImagePtr src,
const int red,
const int green,
const int blue,
const int alpha)
int gdImageColorAllocate (gdImagePtr im,
int r,
int g,
int b)
int gdImageColorAllocateAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
int gdImageColorClosest (gdImagePtr im,
int r,
int g,
int b)
int gdImageColorClosestAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
int gdImageColorClosestHWB (gdImagePtr im,
int r,
int g,
int b)
void gdImageColorDeallocate (gdImagePtr im,
int color)
int gdImageColorExact (gdImagePtr im,
int r,
int g,
int b)
int gdImageColorExactAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
int gdImageColorMatch (gdImagePtr im1,
gdImagePtr im2)
Bring the palette colors in im2 to be closer to im1.
int gdImageColorReplace (gdImagePtr im,
int src,
int dst)
int gdImageColorReplaceArray (gdImagePtr im,
int len,
int *src,
int *dst)
int gdImageColorReplaceCallback (gdImagePtr im,
gdCallbackImageColor callback)
int gdImageColorReplaceThreshold (gdImagePtr im,
int src,
int dst,
float threshold)
int gdImageColorResolve (gdImagePtr im,
int r,
int g,
int b)
gdImageColorResolve is an alternative for the code fragment
int gdImageColorResolveAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
void gdImageColorTransparent (gdImagePtr im,
int color)
int gdImageCompare (gdImagePtr im1,
gdImagePtr im2)
int gdImageContrast(gdImagePtr src,
double contrast)
int gdImageConvolution(gdImagePtr src,
float filter[3][3],
float filter_div,
float offset)
void gdImageCopy (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int w,
int h)
Return a copy of the source image src blurred according to the parameters using the Gaussian Blur algorithm.
void gdImageCopyMerge (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int w,
int h,
int pct)
This function is a substitute for real alpha channel operations, so it doesn’t pay attention to the alpha channel.
void gdImageCopyMergeGray (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int w,
int h,
int pct)
This function is a substitute for real alpha channel operations, so it doesn’t pay attention to the alpha channel.
void gdImageCopyResampled (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int dstW,
int dstH,
int srcW,
int srcH)
void gdImageCopyResized (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int dstW,
int dstH,
int srcW,
int srcH)
void gdImageCopyRotated (gdImagePtr dst,
gdImagePtr src,
double dstX,
double dstY,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
int angle)
gdImagePtr gdImageCreate (int sx,
int sy)
gdImageCreate is called to create palette-based images, with no more than 256 colors.
gdImagePtr gdImageCreateFromBmp(FILE *inFile)
gdImagePtr gdImageCreateFromBmpCtx(gdIOCtxPtr infile)
gdImagePtr gdImageCreateFromBmpPtr(int size,
void *data)
gdImagePtr gdImageCreateFromFile(const char *filename)
Read an image file of any supported.
gdImagePtr gdImageCreateFromGd (FILE *inFile)
gdImageCreateFromGd is called to load images from gd format files.
gdImagePtr gdImageCreateFromGd2 (FILE *inFile)
gdImageCreateFromGd2 is called to load images from gd2 format files.
gdImagePtr gdImageCreateFromGd2Ctx (gdIOCtxPtr in)
Reads in a GD2 image via a gdIOCtx struct.
gdImagePtr gdImageCreateFromGd2Part (FILE *inFile,
int srcx,
int srcy,
int w,
int h)
gdImageCreateFromGd2Part is called to load parts of images from gd2 format files.
gdImagePtr gdImageCreateFromGd2PartCtx (gdIOCtx *in,
int srcx,
int srcy,
int w,
int h)
gdImagePtr gdImageCreateFromGd2PartPtr (int size,
void *data,
int srcx,
int srcy,
int w,
int h)
gdImagePtr gdImageCreateFromGd2Ptr (int size,
void *data)
gdImagePtr gdImageCreateFromGdCtx (gdIOCtxPtr in)
Reads in a GD image via a gdIOCtx struct.
gdImagePtr gdImageCreateFromGdPtr (int size,
void *data)
gdImagePtr gdImageCreateFromGif(FILE *fdFile)
gdImageCreateFromGif is called to load images from GIF format files.
gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd)
See gdImageCreateFromGif.
gdImagePtr gdImageCreateFromGifPtr (int size,
void *data)
gdImagePtr gdImageCreateFromJpeg(FILE *inFile)
See gdImageCreateFromJpegEx.
gdImagePtr gdImageCreateFromJpegCtx(gdIOCtx *infile)
See gdImageCreateFromJpeg.
gdImagePtr gdImageCreateFromJpegCtxEx(gdIOCtx *infile,
int ignore_warning)
See gdImageCreateFromJpeg.
gdImagePtr gdImageCreateFromJpegEx(FILE *inFile,
int ignore_warning)
gdImageCreateFromJpegEx is called to load truecolor images from JPEG format files.
gdImagePtr gdImageCreateFromJpegPtr(int size,
void *data)
gdImagePtr gdImageCreateFromJpegPtrEx(int size,
void *data,
int ignore_warning)
gdImagePtr gdImageCreateFromPng (FILE *inFile)
gdImageCreateFromPng is called to load images from PNG format files.
gdImagePtr gdImageCreateFromPngCtx (gdIOCtx *infile)
See gdImageCreateFromPng.
gdImagePtr gdImageCreateFromPngPtr (int size,
void *data)
See gdImageCreateFromPng.
gdImagePtr gdImageCreateFromPngSource (gdSourcePtr inSource)
See gdImageCreateFromPng for documentation.
gdImagePtr gdImageCreateFromTga(FILE *fp)
Creates a gdImage from a TGA file
gdImagePtr gdImageCreateFromTgaCtx(gdIOCtx *ctx)
Creates a gdImage from a gdIOCtx referencing a TGA binary file.
gdImagePtr gdImageCreateFromTgaPtr(int size,
void *data)
gdImagePtr gdImageCreateFromTiffCtx(gdIOCtx *infile)
Create a gdImage from a TIFF file input from an gdIOCtx.
gdImagePtr gdImageCreateFromTiffPtr(int size,
void *data)
gdImagePtr gdImageCreateFromWBMP(FILE *inFile)
gdImageCreateFromWBMP is called to load images from WBMP format files.
gdImagePtr gdImageCreateFromWBMPCtx(gdIOCtx *infile)
Reads in a WBMP image via a gdIOCtx struct.
gdImagePtr gdImageCreateFromWBMPPtr(int size,
void *data)
gdImagePtr gdImageCreateFromXbm(FILE *fd)
gdImageCreateFromXbm is called to load images from X bitmap format files.
gdImagePtr gdImageCreateFromXpm(char *filename)
gdImageCreateFromXbm is called to load images from XPM X Window System color bitmap format files.
gdImagePtr gdImageCreatePaletteFromTrueColor (gdImagePtr im,
int dither,
int colorsWanted)
gdImagePtr gdImageCreateTrueColor (int sx,
int sy)
gdImageCreateTrueColor is called to create truecolor images, with an essentially unlimited number of colors.
gdImagePtr gdImageCrop(gdImagePtr src,
const gdRect *crop)
gdImagePtr gdImageCropAuto(gdImagePtr im,
const unsigned int mode)
gdImagePtr gdImageCropThreshold(gdImagePtr im,
const unsigned int color,
const float threshold)
void gdImageDashedLine (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
void gdImageDestroy (gdImagePtr im)
gdImageDestroy is used to free the memory associated with an image.
int gdImageEdgeDetectQuick(gdImagePtr src)
void gdImageEllipse(gdImagePtr im,
int mx,
int my,
int w,
int h,
int c)
int gdImageEmboss(gdImagePtr im)
int gdImageFile(gdImagePtr im,
const char *filename)
Writes an image to a file in the format indicated by the filename.
void gdImageFill(gdImagePtr im,
int x,
int y,
int nc)
void gdImageFilledArc (gdImagePtr im,
int cx,
int cy,
int w,
int h,
int s,
int e,
int color,
int style)
void gdImageFilledEllipse (gdImagePtr im,
int mx,
int my,
int w,
int h,
int c)
void gdImageFilledPolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
void gdImageFilledRectangle (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
void gdImageFillToBorder (gdImagePtr im,
int x,
int y,
int border,
int color)
void gdImageFlipBoth(gdImagePtr im)
void gdImageFlipHorizontal(gdImagePtr im)
void gdImageFlipVertical(gdImagePtr im)
int gdImageGaussianBlur(gdImagePtr im)
gdImageGaussianBlur performs a Gaussian blur of radius 1 on the image.
void gdImageGd (gdImagePtr im,
FILE *outFile)
void gdImageGd2 (gdImagePtr im,
FILE *outFile,
int cs,
int fmt)
void * gdImageGd2Ptr (gdImagePtr im,
int cs,
int fmt,
int *size)
void * gdImageGdPtr (gdImagePtr im,
int *size)
void gdImageGetClip (gdImagePtr im,
int *x1P,
int *y1P,
int *x2P,
int *y2P)
gdInterpolationMethod gdImageGetInterpolationMethod(gdImagePtr im)
Return the interpolation mode set in ‘im’.
int gdImageGetPixel (gdImagePtr im,
int x,
int y)
int gdImageGetTrueColorPixel (gdImagePtr im,
int x,
int y)
void gdImageGif(gdImagePtr im,
FILE *outFile)
gdImageGif outputs the specified image to the specified file in GIF format.
void gdImageGifAnimAdd(gdImagePtr im,
FILE *outFile,
int LocalCM,
int LeftOfs,
int TopOfs,
int Delay,
int Disposal,
gdImagePtr previm)
This function writes GIF animation frames to GIF animation, which was initialized with gdImageGifAnimBegin.
void gdImageGifAnimAddCtx(gdImagePtr im,
gdIOCtxPtr out,
int LocalCM,
int LeftOfs,
int TopOfs,
int Delay,
int Disposal,
gdImagePtr previm)
Adds an animation frame via a gdIOCtxPtr.
void * gdImageGifAnimAddPtr(gdImagePtr im,
int *size,
int LocalCM,
int LeftOfs,
int TopOfs,
int Delay,
int Disposal,
gdImagePtr previm)
Like gdImageGifAnimAdd (which contains more information) except that it stores the data to write into memory and returns a pointer to it.
void gdImageGifAnimBegin(gdImagePtr im,
FILE *outFile,
int GlobalCM,
int Loops)
This function must be called as the first function when creating a GIF animation.
void gdImageGifAnimBeginCtx(gdImagePtr im,
gdIOCtxPtr out,
int GlobalCM,
int Loops)
Like gdImageGifAnimBegin except that it outputs to gdIOCtx.
void * gdImageGifAnimBeginPtr(gdImagePtr im,
int *size,
int GlobalCM,
int Loops)
Like gdImageGifAnimBegin except that it outputs to a memory buffer.
void gdImageGifAnimEnd(FILE *outFile)
Terminates the GIF file properly.
void gdImageGifAnimEndCtx(gdIOCtx *out)
Like gdImageGifAnimEnd, but writes its data via a gdIOCtx.
void * gdImageGifAnimEndPtr(int *size)
Like gdImageGifAnimEnd (which contains more information) except that it stores the data to write into memory and returns a pointer to it.
void gdImageGifCtx(gdImagePtr im,
gdIOCtxPtr out)
Writes a GIF image via a gdIOCtx.
void * gdImageGifPtr(gdImagePtr im,
int *size)
Identical to gdImageGif except that it returns a pointer to a memory area with the GIF data.
int gdImageGrayScale(gdImagePtr src)
Convert the image src to a grayscale image.
void gdImageInterlace (gdImagePtr im,
int interlaceArg)
void gdImageJpeg(gdImagePtr im,
FILE *outFile,
int quality)
gdImageJpeg outputs the specified image to the specified file in JPEG format.
void gdImageJpegCtx(gdImagePtr im,
gdIOCtx *outfile,
int quality)
Write the image as JPEG data via a gdIOCtx.
void * gdImageJpegPtr(gdImagePtr im,
int *size,
int quality)
Identical to gdImageJpeg except that it returns a pointer to a memory area with the JPEG data.
void gdImageLine (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
Bresenham as presented in Foley & Van Dam.
int gdImageMeanRemoval(gdImagePtr im)
int gdImageNegate(gdImagePtr src)
Invert src image.
gdImagePtr gdImageNeuQuant(gdImagePtr im,
const int max_color,
int sample_factor)
void gdImageOpenPolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
void gdImagePaletteCopy (gdImagePtr to,
gdImagePtr from)
int gdImagePaletteToTrueColor(gdImagePtr src)
Convert a palette image to true color.
int gdImagePixelate(gdImagePtr im,
int block_size,
const unsigned int mode)
void gdImagePng (gdImagePtr im,
FILE *outFile)
Equivalent to calling gdImagePngEx with compression of -1.
void gdImagePngCtx (gdImagePtr im,
gdIOCtx *outfile)
Equivalent to calling gdImagePngCtxEx with compression of -1.
Outputs the given image as PNG data, but using a gdIOCtx instead of a file.
void gdImagePngEx (gdImagePtr im,
FILE *outFile,
int level)
gdImagePngEx outputs the specified image to the specified file in PNG format.
void * gdImagePngPtr (gdImagePtr im,
int *size)
Equivalent to calling gdImagePngPtrEx with compression of -1.
void * gdImagePngPtrEx (gdImagePtr im,
int *size,
int level)
Identical to gdImagePngEx except that it returns a pointer to a memory area with the PNG data.
void gdImagePngToSink (gdImagePtr im,
gdSinkPtr outSink)
void gdImagePolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
void gdImageRectangle (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
gdImagePtr gdImageRotateInterpolated(const gdImagePtr src,
const float angle,
int bgcolor)
void gdImageSaveAlpha (gdImagePtr im,
int saveAlphaArg)
gdImagePtr gdImageScale(const gdImagePtr src,
const unsigned int new_width,
const unsigned int new_height)
int gdImageScatter(gdImagePtr im,
int sub,
int plus)
int gdImageScatterColor(gdImagePtr im,
int sub,
int plus,
int colors[],
unsigned int num_colors)
int gdImageScatterEx(gdImagePtr im,
gdScatterPtr scatter)
int gdImageSelectiveBlur(gdImagePtr src)
void gdImageSetAntiAliased (gdImagePtr im,
int c)
void gdImageSetAntiAliasedDontBlend (gdImagePtr im,
int c,
int dont_blend)
void gdImageSetBrush (gdImagePtr im,
gdImagePtr brush)
void gdImageSetClip (gdImagePtr im,
int x1,
int y1,
int x2,
int y2)
int gdImageSetInterpolationMethod(gdImagePtr im,
gdInterpolationMethod id)
void gdImageSetPixel (gdImagePtr im,
int x,
int y,
int color)
void gdImageSetResolution(gdImagePtr im,
const unsigned int res_x,
const unsigned int res_y)
void gdImageSetStyle (gdImagePtr im,
int *style,
int noOfPixels)
void gdImageSetThickness (gdImagePtr im,
int thickness)
void gdImageSetTile (gdImagePtr im,
gdImagePtr tile)
void gdImageSharpen (gdImagePtr im,
int pct)
Sharpen function added on 2003-11-19 by Paul Troughton (paul<dot>troughton<at>ieee<dot>org) Simple 3x3 convolution kernel Makes use of seperability Faster, but less flexible, than full-blown unsharp masking pct is sharpening percentage, and can be greater than 100 Silently does nothing to non-truecolor images Silently does nothing for pct<0, as not a useful blurring function Leaves transparency/alpha-channel untouched
int gdImageSmooth(gdImagePtr im,
float weight)
gdImagePtr gdImageSquareToCircle (gdImagePtr im,
int radius)
void gdImageString (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned char *s,
int color)
void gdImageString16 (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned short *s,
int color)
char * gdImageStringFT (gdImage *im,
int *brect,
int fg,
char *fontlist,
double ptsize,
double angle,
int x,
int y,
char *string)
Render a utf8 string onto a gd image.
char * gdImageStringFTCircle (gdImagePtr im,
int cx,
int cy,
double radius,
double textRadius,
double fillPortion,
char *font,
double points,
char *top,
char *bottom,
int fgcolor)
gdImageStringFTEx extends the capabilities of gdImageStringFT by providing a way to pass additional parameters.
char * gdImageStringTTF (gdImage *im,
int *brect,
int fg,
char *fontlist,
double ptsize,
double angle,
int x,
int y,
char *string)
void gdImageStringUp (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned char *s,
int color)
void gdImageStringUp16 (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned short *s,
int color)
void gdImageTiff(gdImagePtr im,
FILE *outFile)
void gdImageTiffCtx(gdImagePtr image,
gdIOCtx *out)
Write the gd image as a tiff file.
void * gdImageTiffPtr(gdImagePtr im,
int *size)
int gdImageTrueColorToPalette (gdImagePtr im,
int dither,
int colorsWanted)
int gdImageTrueColorToPaletteSetMethod (gdImagePtr im,
int method,
int speed)
Selects quantization method used for subsequent gdImageTrueColorToPalette calls.
void gdImageTrueColorToPaletteSetQuality (gdImagePtr im,
int min_quality,
int max_quality)
Chooses quality range that subsequent call to gdImageTrueColorToPalette will aim for.
void gdImageWBMP(gdImagePtr im,
int fg,
FILE *outFile)
void gdImageWBMPCtx(gdImagePtr image,
int fg,
gdIOCtx *out)
Write the image as a wbmp file
void * gdImageWBMPPtr(gdImagePtr im,
int *size,
int fg)
void gdImageWebp (gdImagePtr im,
FILE *outFile)
void gdImageWebpEx (gdImagePtr im,
FILE *outFile,
int quantization)
void * gdImageWebpPtr (gdImagePtr im,
int *size)
void * gdImageWebpPtrEx (gdImagePtr im,
int *size,
int quantization)
void gdImageXbmCtx(gdImagePtr image,
char *file_name,
int fg,
gdIOCtx *out)
int gdLayerMultiply (int dst,
int src)
Apply ‘multiply’ effect.
int gdLayerOverlay (int dst,
int src)
int gdMajorVersion()
int gdMinorVersion()
gdIOCtx * gdNewDynamicCtx(int initialSize,
void *data)
Return data as a dynamic pointer.
gdIOCtx * gdNewDynamicCtxEx(int initialSize,
void *data,
int freeOKFlag)
gdIOCtx * gdNewFileCtx(FILE *f)
Return data as a dynamic pointer.
gdIOCtx * gdNewSSCtx(gdSourcePtr src,
gdSinkPtr snk)
Return data as a dynamic pointer.
int gdReleaseVersion()
void gdSetErrorMethod(gdErrorMethod error_method)
int gdSupportsFileType(const char *filename,
int writing)
Tests if a given file type is supported by GD.
int gdTransformAffineBoundingBox(gdRectPtr src,
const double affine[6],
gdRectPtr bbox)
Returns the bounding box of an affine transformation applied to a rectangular area gdRect
int gdTransformAffineCopy(gdImagePtr dst,
int dst_x,
int dst_y,
const gdImagePtr src,
gdRectPtr src_region,
const double affine[6])
Applies an affine transformation to a region and copy the result in a destination to the given position.
int gdTransformAffineGetImage(gdImagePtr *dst,
const gdImagePtr src,
gdRectPtr src_area,
const double affine[6])
Applies an affine transformation to a region and return an image containing the complete transformation.
const char * gdVersionString()
- -
- - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/General.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/General.html deleted file mode 100644 index a98f68313d4..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/General.html +++ /dev/null @@ -1,46 +0,0 @@ - - -Index - - - - - - - - - -
Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
0-9
 3, About LibGD 2::2
A
 Affine transformation
C
 Crop
F
 Functions
- -
gd is a graphics library.
- - - - - - - - - - - - - -
- - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/General2.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/General2.html deleted file mode 100644 index 32323a5972b..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/General2.html +++ /dev/null @@ -1,34 +0,0 @@ - - -Index - - - - - - - - - -
Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
G
 gd.c
 gd.h
 GD_BELL
 GD_BESSEL
 GD_BICUBIC
 GD_BICUBIC_FIXED
 GD_BILINEAR_FIXED
 GD_BLACKMAN
 gd_bmp.c
 GD_BOX
 GD_BSPLINE
 GD_CATMULLROM
 gd_crop.c
 GD_CROP_BLACK
 GD_CROP_DEFAULT
 GD_CROP_SIDES
 GD_CROP_TRANSPARENT
 GD_CROP_WHITE
 gd_filename.c
 gd_filter.c
 GD_GAUSSIAN
 gd_gd.c
 gd_gd2.c
 GD_GENERALIZED_CUBIC
 gd_gif_in.c
 gd_gif_out.c
 GD_HAMMING
 GD_HANNING
 GD_HERMITE
 gd_interpolation.c
 gd_io.h
 gd_io_dp.c
 gd_jpeg.c
 GD_LINEAR
 GD_MITCHELL
 GD_NEAREST_NEIGHBOUR
 gd_png.c
 GD_POWER
 GD_QUADRATIC
 GD_SINC
 gd_ss.c
 gd_tga.c
 gd_tiff.c
 gd_topal.c
 gd_transform.c
 GD_TRIANGLE
 gd_version.c
 gd_wbmp.c
 gd_webp.c
 GD_WEIGHTED4
 gd_xbm.c
 gdAffineApplyToPointF
 gdAffineConcat
 gdAffineEqual
 gdAffineFlip
 gdAffineIdentity
 gdAffineInvert
 gdAffineRectilinear
 gdAffineRotate
 gdAffineScale
 gdAffineShearHorizontal
 gdAffineShearVertical
 gdAffineTranslate
 gdAlphaBlend
 gdClearErrorMethod
 gdColorMapLookup
 gdCropMode
 gdDisposalNone
 gdDisposalRestoreBackground
 gdDisposalRestorePrevious
 gdDisposalUnknown
 gdDPExtractData
 gdExtraVersion
 gdFont
 gdFontCacheSetup
 gdFontCacheShutdown
 gdFontGetGiant
 gdFontGetLarge
 gdFontGetMediumBold
 gdFontGetSmall
 gdFontGetTiny
 gdFontPtr
 gdFree
 gdFreeFontCache
 gdft.c
 gdFTStringExtra
 gdFTStringExtraPtr
 gdFTUseFontConfig
 gdfx.c
 gdImage
 gdImageAABlend
 gdImageAlphaBlending
 gdImageArc
 gdImageBmp
 gdImageBmpCtx
 gdImageBmpPtr
 gdImageBoundsSafe
 gdImageBrightness
 gdImageChar
 gdImageCharUp
 gdImageClone
 gdImageColor
 gdImageColorAllocate
 gdImageColorAllocateAlpha
 gdImageColorClosest
 gdImageColorClosestAlpha
 gdImageColorClosestHWB
 gdImageColorDeallocate
 gdImageColorExact
 gdImageColorExactAlpha
 gdImageColorMatch
 gdImageColorReplace
 gdImageColorReplaceArray
 gdImageColorReplaceCallback
 gdImageColorReplaceThreshold
 gdImageColorResolve
 gdImageColorResolveAlpha
 gdImageColorTransparent
 gdImageCompare
 gdImageContrast
 gdImageConvolution
 gdImageCopy
 gdImageCopyGaussianBlurred
 gdImageCopyMerge
 gdImageCopyMergeGray
 gdImageCopyResampled
 gdImageCopyResized
 gdImageCopyRotated
 gdImageCreate
 gdImageCreateFromBmp
 gdImageCreateFromBmpCtx
 gdImageCreateFromBmpPtr
 gdImageCreateFromFile
 gdImageCreateFromGd
 gdImageCreateFromGd2
 gdImageCreateFromGd2Ctx
 gdImageCreateFromGd2Part
 gdImageCreateFromGd2PartCtx
 gdImageCreateFromGd2PartPtr
 gdImageCreateFromGd2Ptr
 gdImageCreateFromGdCtx
 gdImageCreateFromGdPtr
 gdImageCreateFromGif
 gdImageCreateFromGifCtx
 gdImageCreateFromGifPtr
 gdImageCreateFromJpeg
 gdImageCreateFromJpegCtx
 gdImageCreateFromJpegCtxEx
 gdImageCreateFromJpegEx
 gdImageCreateFromJpegPtr
 gdImageCreateFromJpegPtrEx
 gdImageCreateFromPng
 gdImageCreateFromPngCtx
 gdImageCreateFromPngPtr
 gdImageCreateFromPngSource
 gdImageCreateFromTga
 gdImageCreateFromTgaCtx
 gdImageCreateFromTgaPtr
 gdImageCreateFromTIFF
 gdImageCreateFromTiffCtx
 gdImageCreateFromTiffPtr
 gdImageCreateFromWBMP
 gdImageCreateFromWBMPCtx
 gdImageCreateFromWBMPPtr
 gdImageCreateFromXbm
 gdImageCreateFromXpm
 gdImageCreatePaletteFromTrueColor
 gdImageCreateTrueColor
 gdImageCrop
 gdImageCropAuto
 gdImageCropThreshold
 gdImageDashedLine
 gdImageDestroy
 gdImageEdgeDetectQuick
 gdImageEllipse
 gdImageEmboss
 gdImageFile
 gdImageFill
 gdImageFilledArc
 gdImageFilledEllipse
 gdImageFilledPolygon
 gdImageFilledRectangle
 gdImageFillToBorder
 gdImageFlipBoth
 gdImageFlipHorizontal
 gdImageFlipVertical
 gdImageGaussianBlur
 gdImageGd
 gdImageGd2
 gdImageGd2Ptr
 gdImageGdPtr
 gdImageGetClip
 gdImageGetInterpolationMethod
 gdImageGetPixel
 gdImageGetTrueColorPixel
 gdImageGif
 gdImageGifAnim
 gdImageGifAnimAdd
 gdImageGifAnimAddCtx
 gdImageGifAnimAddPtr
 gdImageGifAnimBegin
 gdImageGifAnimBeginCtx
 gdImageGifAnimBeginPtr
 gdImageGifAnimEnd
 gdImageGifAnimEndCtx
 gdImageGifAnimEndPtr
 gdImageGifCtx
 gdImageGifPtr
 gdImageGrayScale
 gdImageInterlace
 gdImageJpeg
 gdImageJpegCtx
 gdImageJpegPtr
 gdImageLine
 gdImageMeanRemoval
 gdImageNegate
 gdImageNeuQuant
 gdImageOpenPolygon
 gdImagePaletteCopy
 gdImagePaletteToTrueColor
 gdImagePixelate
 gdImagePng
 gdImagePngCtx
 gdImagePngCtxEx
 gdImagePngEx
 gdImagePngPtr
 gdImagePngPtrEx
 gdImagePngToSink
 gdImagePolygon
 gdImagePtr
 gdImageRectangle
 gdImageRotateInterpolated
 gdImageSaveAlpha
 gdImageScale
 gdImageScatter
 gdImageScatterColor
 gdImageScatterEx
 gdImageSelectiveBlur
 gdImageSetAntiAliased
 gdImageSetAntiAliasedDontBlend
 gdImageSetBrush
 gdImageSetClip
 gdImageSetInterpolationMethod
 gdImageSetPixel
 gdImageSetResolution
 gdImageSetStyle
 gdImageSetThickness
 gdImageSetTile
 gdImageSharpen
 gdImageSmooth
 gdImageSquareToCircle
 gdImageString
 gdImageString16
 gdImageStringFT
 gdImageStringFTCircle
 gdImageStringFTEx
 gdImageStringTTF
 gdImageStringUp
 gdImageStringUp16
 gdImageTiff
 gdImageTiffCtx
 gdImageTiffPtr
 gdImageTrueColorToPalette
 gdImageTrueColorToPaletteSetMethod
 gdImageTrueColorToPaletteSetQuality
 gdImageWBMP
 gdImageWBMPCtx
 gdImageWBMPPtr
 gdImageWebp
 gdImageWebpEx
 gdImageWebpPtr
 gdImageWebpPtrEx
 gdImageXbmCtx
 gdInterpolationMethod
 gdIOCtx
 gdLayerMultiply
 gdLayerOverlay
 gdMajorVersion
 gdMinorVersion
 gdNewDynamicCtx
 gdNewDynamicCtxEx
 gdNewFileCtx
 gdNewSSCtx
 gdPoint
 gdPointF
 gdPointFPtr
 gdPointPtr
 gdReleaseVersion
 gdSetErrorMethod
 gdSink
 gdSinkPtr
 gdSource
 gdSourcePtr
 gdSupportsFileType
 gdTransformAffineBoundingBox
 gdTransformAffineCopy
 gdTransformAffineGetImage
 gdVersionString
 GifAnim
- -
Bell
Bessel
Bicubic
fixed point bicubic integer
fixed point bilinear
Blackman
Box
BSpline
Catmullrom
Crop black borders
Default crop mode (4 corners or background)
Crop using colors of the 4 corners
Crop using the transparent color
Crop white borders
Gaussian
Generalized cubic
Hamming
Hannig
Hermite
bilinear interpolation
Mitchell
Nearest neighbour interpolation
Power
Quadratic
Sinc
Triangle
4 pixels weighted bilinear interpolation
int gdAffineApplyToPointF (gdPointFPtr dst,
const gdPointFPtr src,
const double affine[6])
Applies an affine transformation to a point (floating point gdPointF)
int gdAffineConcat (double dst[6],
const double m1[6],
const double m2[6])
Concat (Multiply) two affine transformation matrices.
int gdAffineEqual (const double m1[6],
const double m2[6])
Determines whether two affine transformations are equal.
int gdAffineFlip (double dst[6],
const double src[6],
const int flip_h,
const int flip_v)
Flip an affine transformation horizontally or vertically.
int gdAffineIdentity (double dst[6])
Set up the identity matrix.
int gdAffineInvert (double dst[6],
const double src[6])
Find the inverse of an affine transformation.
int gdAffineRectilinear (const double m[6])
Determines whether the affine transformation is axis aligned.
int gdAffineRotate (double dst[6],
const double angle)
Set up a rotation affine transform.
int gdAffineScale (double dst[6],
const double scale_x,
const double scale_y)
Set up a scaling matrix.
int gdAffineShearHorizontal(double dst[6],
const double angle)
Set up a horizontal shearing matrix || becomes \\.
int gdAffineShearVertical(double dst[6],
const double angle)
Set up a vertical shearing matrix, columns are untouched.
int gdAffineTranslate (double dst[6],
const double offset_x,
const double offset_y)
Set up a translation matrix.
int gdAlphaBlend (int dst,
int src)
void gdClearErrorMethod(void)
int gdColorMapLookup(const gdColorMap color_map,
const char *color_name,
int *r,
int *g,
int *b)
Preserve previous frame
First allocated color of palette
Restore to before start of frame
Not recommended
void * gdDPExtractData (struct gdIOCtx *ctx,
int *size)
const char * gdExtraVersion()
int gdFontCacheSetup (void)
void gdFontCacheShutdown ()
gdFontPtr gdFontGetGiant (void)
gdFontPtr gdFontGetLarge (void)
gdFontPtr gdFontGetMediumBold (void)
gdFontPtr gdFontGetSmall (void)
gdFontPtr gdFontGetTiny (void)
A font structure, containing the bitmaps of all characters in a font.
void gdFree (void *ptr)
void gdFreeFontCache ()
A structure and associated pointer type used to pass additional parameters to the gdImageStringFTEx function.
int gdFTUseFontConfig(int flag)
void gdImageAABlend (gdImagePtr im)
NO-OP, kept for library compatibility.
void gdImageAlphaBlending (gdImagePtr im,
int alphaBlendingArg)
void gdImageArc (gdImagePtr im,
int cx,
int cy,
int w,
int h,
int s,
int e,
int color)
void gdImageBmp(gdImagePtr im,
FILE *outFile,
int compression)
void gdImageBmpCtx(gdImagePtr im,
gdIOCtxPtr out,
int compression)
void * gdImageBmpPtr(gdImagePtr im,
int *size,
int compression)
int gdImageBoundsSafe (gdImagePtr im,
int x,
int y)
int gdImageBrightness(gdImagePtr src,
int brightness)
Set the brightness level level for the image src.
void gdImageChar (gdImagePtr im,
gdFontPtr f,
int x,
int y,
int c,
int color)
void gdImageCharUp (gdImagePtr im,
gdFontPtr f,
int x,
int y,
int c,
int color)
gdImagePtr gdImageClone (gdImagePtr src)
int gdImageColor(gdImagePtr src,
const int red,
const int green,
const int blue,
const int alpha)
int gdImageColorAllocate (gdImagePtr im,
int r,
int g,
int b)
int gdImageColorAllocateAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
int gdImageColorClosest (gdImagePtr im,
int r,
int g,
int b)
int gdImageColorClosestAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
int gdImageColorClosestHWB (gdImagePtr im,
int r,
int g,
int b)
void gdImageColorDeallocate (gdImagePtr im,
int color)
int gdImageColorExact (gdImagePtr im,
int r,
int g,
int b)
int gdImageColorExactAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
int gdImageColorMatch (gdImagePtr im1,
gdImagePtr im2)
Bring the palette colors in im2 to be closer to im1.
int gdImageColorReplace (gdImagePtr im,
int src,
int dst)
int gdImageColorReplaceArray (gdImagePtr im,
int len,
int *src,
int *dst)
int gdImageColorReplaceCallback (gdImagePtr im,
gdCallbackImageColor callback)
int gdImageColorReplaceThreshold (gdImagePtr im,
int src,
int dst,
float threshold)
int gdImageColorResolve (gdImagePtr im,
int r,
int g,
int b)
gdImageColorResolve is an alternative for the code fragment
int gdImageColorResolveAlpha (gdImagePtr im,
int r,
int g,
int b,
int a)
void gdImageColorTransparent (gdImagePtr im,
int color)
int gdImageCompare (gdImagePtr im1,
gdImagePtr im2)
int gdImageContrast(gdImagePtr src,
double contrast)
int gdImageConvolution(gdImagePtr src,
float filter[3][3],
float filter_div,
float offset)
void gdImageCopy (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int w,
int h)
Return a copy of the source image src blurred according to the parameters using the Gaussian Blur algorithm.
void gdImageCopyMerge (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int w,
int h,
int pct)
This function is a substitute for real alpha channel operations, so it doesn’t pay attention to the alpha channel.
void gdImageCopyMergeGray (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int w,
int h,
int pct)
This function is a substitute for real alpha channel operations, so it doesn’t pay attention to the alpha channel.
void gdImageCopyResampled (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int dstW,
int dstH,
int srcW,
int srcH)
void gdImageCopyResized (gdImagePtr dst,
gdImagePtr src,
int dstX,
int dstY,
int srcX,
int srcY,
int dstW,
int dstH,
int srcW,
int srcH)
void gdImageCopyRotated (gdImagePtr dst,
gdImagePtr src,
double dstX,
double dstY,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
int angle)
gdImagePtr gdImageCreate (int sx,
int sy)
gdImageCreate is called to create palette-based images, with no more than 256 colors.
gdImagePtr gdImageCreateFromBmp(FILE *inFile)
gdImagePtr gdImageCreateFromBmpCtx(gdIOCtxPtr infile)
gdImagePtr gdImageCreateFromBmpPtr(int size,
void *data)
gdImagePtr gdImageCreateFromFile(const char *filename)
Read an image file of any supported.
gdImagePtr gdImageCreateFromGd (FILE *inFile)
gdImageCreateFromGd is called to load images from gd format files.
gdImagePtr gdImageCreateFromGd2 (FILE *inFile)
gdImageCreateFromGd2 is called to load images from gd2 format files.
gdImagePtr gdImageCreateFromGd2Ctx (gdIOCtxPtr in)
Reads in a GD2 image via a gdIOCtx struct.
gdImagePtr gdImageCreateFromGd2Part (FILE *inFile,
int srcx,
int srcy,
int w,
int h)
gdImageCreateFromGd2Part is called to load parts of images from gd2 format files.
gdImagePtr gdImageCreateFromGd2PartCtx (gdIOCtx *in,
int srcx,
int srcy,
int w,
int h)
gdImagePtr gdImageCreateFromGd2PartPtr (int size,
void *data,
int srcx,
int srcy,
int w,
int h)
gdImagePtr gdImageCreateFromGd2Ptr (int size,
void *data)
gdImagePtr gdImageCreateFromGdCtx (gdIOCtxPtr in)
Reads in a GD image via a gdIOCtx struct.
gdImagePtr gdImageCreateFromGdPtr (int size,
void *data)
gdImagePtr gdImageCreateFromGif(FILE *fdFile)
gdImageCreateFromGif is called to load images from GIF format files.
gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd)
See gdImageCreateFromGif.
gdImagePtr gdImageCreateFromGifPtr (int size,
void *data)
gdImagePtr gdImageCreateFromJpeg(FILE *inFile)
See gdImageCreateFromJpegEx.
gdImagePtr gdImageCreateFromJpegCtx(gdIOCtx *infile)
See gdImageCreateFromJpeg.
gdImagePtr gdImageCreateFromJpegCtxEx(gdIOCtx *infile,
int ignore_warning)
See gdImageCreateFromJpeg.
gdImagePtr gdImageCreateFromJpegEx(FILE *inFile,
int ignore_warning)
gdImageCreateFromJpegEx is called to load truecolor images from JPEG format files.
gdImagePtr gdImageCreateFromJpegPtr(int size,
void *data)
gdImagePtr gdImageCreateFromJpegPtrEx(int size,
void *data,
int ignore_warning)
gdImagePtr gdImageCreateFromPng (FILE *inFile)
gdImageCreateFromPng is called to load images from PNG format files.
gdImagePtr gdImageCreateFromPngCtx (gdIOCtx *infile)
See gdImageCreateFromPng.
gdImagePtr gdImageCreateFromPngPtr (int size,
void *data)
See gdImageCreateFromPng.
gdImagePtr gdImageCreateFromPngSource (gdSourcePtr inSource)
See gdImageCreateFromPng for documentation.
gdImagePtr gdImageCreateFromTga(FILE *fp)
Creates a gdImage from a TGA file
gdImagePtr gdImageCreateFromTgaCtx(gdIOCtx *ctx)
Creates a gdImage from a gdIOCtx referencing a TGA binary file.
gdImagePtr gdImageCreateFromTgaPtr(int size,
void *data)
gdImagePtr gdImageCreateFromTiffCtx(gdIOCtx *infile)
Create a gdImage from a TIFF file input from an gdIOCtx.
gdImagePtr gdImageCreateFromTiffPtr(int size,
void *data)
gdImagePtr gdImageCreateFromWBMP(FILE *inFile)
gdImageCreateFromWBMP is called to load images from WBMP format files.
gdImagePtr gdImageCreateFromWBMPCtx(gdIOCtx *infile)
Reads in a WBMP image via a gdIOCtx struct.
gdImagePtr gdImageCreateFromWBMPPtr(int size,
void *data)
gdImagePtr gdImageCreateFromXbm(FILE *fd)
gdImageCreateFromXbm is called to load images from X bitmap format files.
gdImagePtr gdImageCreateFromXpm(char *filename)
gdImageCreateFromXbm is called to load images from XPM X Window System color bitmap format files.
gdImagePtr gdImageCreatePaletteFromTrueColor (gdImagePtr im,
int dither,
int colorsWanted)
gdImagePtr gdImageCreateTrueColor (int sx,
int sy)
gdImageCreateTrueColor is called to create truecolor images, with an essentially unlimited number of colors.
gdImagePtr gdImageCrop(gdImagePtr src,
const gdRect *crop)
gdImagePtr gdImageCropAuto(gdImagePtr im,
const unsigned int mode)
gdImagePtr gdImageCropThreshold(gdImagePtr im,
const unsigned int color,
const float threshold)
void gdImageDashedLine (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
void gdImageDestroy (gdImagePtr im)
gdImageDestroy is used to free the memory associated with an image.
int gdImageEdgeDetectQuick(gdImagePtr src)
void gdImageEllipse(gdImagePtr im,
int mx,
int my,
int w,
int h,
int c)
int gdImageEmboss(gdImagePtr im)
int gdImageFile(gdImagePtr im,
const char *filename)
Writes an image to a file in the format indicated by the filename.
void gdImageFill(gdImagePtr im,
int x,
int y,
int nc)
void gdImageFilledArc (gdImagePtr im,
int cx,
int cy,
int w,
int h,
int s,
int e,
int color,
int style)
void gdImageFilledEllipse (gdImagePtr im,
int mx,
int my,
int w,
int h,
int c)
void gdImageFilledPolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
void gdImageFilledRectangle (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
void gdImageFillToBorder (gdImagePtr im,
int x,
int y,
int border,
int color)
void gdImageFlipBoth(gdImagePtr im)
void gdImageFlipHorizontal(gdImagePtr im)
void gdImageFlipVertical(gdImagePtr im)
int gdImageGaussianBlur(gdImagePtr im)
gdImageGaussianBlur performs a Gaussian blur of radius 1 on the image.
void gdImageGd (gdImagePtr im,
FILE *outFile)
void gdImageGd2 (gdImagePtr im,
FILE *outFile,
int cs,
int fmt)
void * gdImageGd2Ptr (gdImagePtr im,
int cs,
int fmt,
int *size)
void * gdImageGdPtr (gdImagePtr im,
int *size)
void gdImageGetClip (gdImagePtr im,
int *x1P,
int *y1P,
int *x2P,
int *y2P)
gdInterpolationMethod gdImageGetInterpolationMethod(gdImagePtr im)
Return the interpolation mode set in ‘im’.
int gdImageGetPixel (gdImagePtr im,
int x,
int y)
int gdImageGetTrueColorPixel (gdImagePtr im,
int x,
int y)
void gdImageGif(gdImagePtr im,
FILE *outFile)
gdImageGif outputs the specified image to the specified file in GIF format.
void gdImageGifAnimAdd(gdImagePtr im,
FILE *outFile,
int LocalCM,
int LeftOfs,
int TopOfs,
int Delay,
int Disposal,
gdImagePtr previm)
This function writes GIF animation frames to GIF animation, which was initialized with gdImageGifAnimBegin.
void gdImageGifAnimAddCtx(gdImagePtr im,
gdIOCtxPtr out,
int LocalCM,
int LeftOfs,
int TopOfs,
int Delay,
int Disposal,
gdImagePtr previm)
Adds an animation frame via a gdIOCtxPtr.
void * gdImageGifAnimAddPtr(gdImagePtr im,
int *size,
int LocalCM,
int LeftOfs,
int TopOfs,
int Delay,
int Disposal,
gdImagePtr previm)
Like gdImageGifAnimAdd (which contains more information) except that it stores the data to write into memory and returns a pointer to it.
void gdImageGifAnimBegin(gdImagePtr im,
FILE *outFile,
int GlobalCM,
int Loops)
This function must be called as the first function when creating a GIF animation.
void gdImageGifAnimBeginCtx(gdImagePtr im,
gdIOCtxPtr out,
int GlobalCM,
int Loops)
Like gdImageGifAnimBegin except that it outputs to gdIOCtx.
void * gdImageGifAnimBeginPtr(gdImagePtr im,
int *size,
int GlobalCM,
int Loops)
Like gdImageGifAnimBegin except that it outputs to a memory buffer.
void gdImageGifAnimEnd(FILE *outFile)
Terminates the GIF file properly.
void gdImageGifAnimEndCtx(gdIOCtx *out)
Like gdImageGifAnimEnd, but writes its data via a gdIOCtx.
void * gdImageGifAnimEndPtr(int *size)
Like gdImageGifAnimEnd (which contains more information) except that it stores the data to write into memory and returns a pointer to it.
void gdImageGifCtx(gdImagePtr im,
gdIOCtxPtr out)
Writes a GIF image via a gdIOCtx.
void * gdImageGifPtr(gdImagePtr im,
int *size)
Identical to gdImageGif except that it returns a pointer to a memory area with the GIF data.
int gdImageGrayScale(gdImagePtr src)
Convert the image src to a grayscale image.
void gdImageInterlace (gdImagePtr im,
int interlaceArg)
void gdImageJpeg(gdImagePtr im,
FILE *outFile,
int quality)
gdImageJpeg outputs the specified image to the specified file in JPEG format.
void gdImageJpegCtx(gdImagePtr im,
gdIOCtx *outfile,
int quality)
Write the image as JPEG data via a gdIOCtx.
void * gdImageJpegPtr(gdImagePtr im,
int *size,
int quality)
Identical to gdImageJpeg except that it returns a pointer to a memory area with the JPEG data.
void gdImageLine (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
Bresenham as presented in Foley & Van Dam.
int gdImageMeanRemoval(gdImagePtr im)
int gdImageNegate(gdImagePtr src)
Invert src image.
gdImagePtr gdImageNeuQuant(gdImagePtr im,
const int max_color,
int sample_factor)
void gdImageOpenPolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
void gdImagePaletteCopy (gdImagePtr to,
gdImagePtr from)
int gdImagePaletteToTrueColor(gdImagePtr src)
Convert a palette image to true color.
int gdImagePixelate(gdImagePtr im,
int block_size,
const unsigned int mode)
void gdImagePng (gdImagePtr im,
FILE *outFile)
Equivalent to calling gdImagePngEx with compression of -1.
void gdImagePngCtx (gdImagePtr im,
gdIOCtx *outfile)
Equivalent to calling gdImagePngCtxEx with compression of -1.
Outputs the given image as PNG data, but using a gdIOCtx instead of a file.
void gdImagePngEx (gdImagePtr im,
FILE *outFile,
int level)
gdImagePngEx outputs the specified image to the specified file in PNG format.
void * gdImagePngPtr (gdImagePtr im,
int *size)
Equivalent to calling gdImagePngPtrEx with compression of -1.
void * gdImagePngPtrEx (gdImagePtr im,
int *size,
int level)
Identical to gdImagePngEx except that it returns a pointer to a memory area with the PNG data.
void gdImagePngToSink (gdImagePtr im,
gdSinkPtr outSink)
void gdImagePolygon (gdImagePtr im,
gdPointPtr p,
int n,
int c)
The data structure in which gd stores images.
void gdImageRectangle (gdImagePtr im,
int x1,
int y1,
int x2,
int y2,
int color)
gdImagePtr gdImageRotateInterpolated(const gdImagePtr src,
const float angle,
int bgcolor)
void gdImageSaveAlpha (gdImagePtr im,
int saveAlphaArg)
gdImagePtr gdImageScale(const gdImagePtr src,
const unsigned int new_width,
const unsigned int new_height)
int gdImageScatter(gdImagePtr im,
int sub,
int plus)
int gdImageScatterColor(gdImagePtr im,
int sub,
int plus,
int colors[],
unsigned int num_colors)
int gdImageScatterEx(gdImagePtr im,
gdScatterPtr scatter)
int gdImageSelectiveBlur(gdImagePtr src)
void gdImageSetAntiAliased (gdImagePtr im,
int c)
void gdImageSetAntiAliasedDontBlend (gdImagePtr im,
int c,
int dont_blend)
void gdImageSetBrush (gdImagePtr im,
gdImagePtr brush)
void gdImageSetClip (gdImagePtr im,
int x1,
int y1,
int x2,
int y2)
int gdImageSetInterpolationMethod(gdImagePtr im,
gdInterpolationMethod id)
void gdImageSetPixel (gdImagePtr im,
int x,
int y,
int color)
void gdImageSetResolution(gdImagePtr im,
const unsigned int res_x,
const unsigned int res_y)
void gdImageSetStyle (gdImagePtr im,
int *style,
int noOfPixels)
void gdImageSetThickness (gdImagePtr im,
int thickness)
void gdImageSetTile (gdImagePtr im,
gdImagePtr tile)
void gdImageSharpen (gdImagePtr im,
int pct)
Sharpen function added on 2003-11-19 by Paul Troughton (paul<dot>troughton<at>ieee<dot>org) Simple 3x3 convolution kernel Makes use of seperability Faster, but less flexible, than full-blown unsharp masking pct is sharpening percentage, and can be greater than 100 Silently does nothing to non-truecolor images Silently does nothing for pct<0, as not a useful blurring function Leaves transparency/alpha-channel untouched
int gdImageSmooth(gdImagePtr im,
float weight)
gdImagePtr gdImageSquareToCircle (gdImagePtr im,
int radius)
void gdImageString (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned char *s,
int color)
void gdImageString16 (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned short *s,
int color)
char * gdImageStringFT (gdImage *im,
int *brect,
int fg,
char *fontlist,
double ptsize,
double angle,
int x,
int y,
char *string)
Render a utf8 string onto a gd image.
char * gdImageStringFTCircle (gdImagePtr im,
int cx,
int cy,
double radius,
double textRadius,
double fillPortion,
char *font,
double points,
char *top,
char *bottom,
int fgcolor)
gdImageStringFTEx extends the capabilities of gdImageStringFT by providing a way to pass additional parameters.
char * gdImageStringTTF (gdImage *im,
int *brect,
int fg,
char *fontlist,
double ptsize,
double angle,
int x,
int y,
char *string)
void gdImageStringUp (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned char *s,
int color)
void gdImageStringUp16 (gdImagePtr im,
gdFontPtr f,
int x,
int y,
unsigned short *s,
int color)
void gdImageTiff(gdImagePtr im,
FILE *outFile)
void gdImageTiffCtx(gdImagePtr image,
gdIOCtx *out)
Write the gd image as a tiff file.
void * gdImageTiffPtr(gdImagePtr im,
int *size)
int gdImageTrueColorToPalette (gdImagePtr im,
int dither,
int colorsWanted)
int gdImageTrueColorToPaletteSetMethod (gdImagePtr im,
int method,
int speed)
Selects quantization method used for subsequent gdImageTrueColorToPalette calls.
void gdImageTrueColorToPaletteSetQuality (gdImagePtr im,
int min_quality,
int max_quality)
Chooses quality range that subsequent call to gdImageTrueColorToPalette will aim for.
void gdImageWBMP(gdImagePtr im,
int fg,
FILE *outFile)
void gdImageWBMPCtx(gdImagePtr image,
int fg,
gdIOCtx *out)
Write the image as a wbmp file
void * gdImageWBMPPtr(gdImagePtr im,
int *size,
int fg)
void gdImageWebp (gdImagePtr im,
FILE *outFile)
void gdImageWebpEx (gdImagePtr im,
FILE *outFile,
int quantization)
void * gdImageWebpPtr (gdImagePtr im,
int *size)
void * gdImageWebpPtrEx (gdImagePtr im,
int *size,
int quantization)
void gdImageXbmCtx(gdImagePtr image,
char *file_name,
int fg,
gdIOCtx *out)
gdIOCtx structures hold function pointers for doing image IO.
int gdLayerMultiply (int dst,
int src)
Apply ‘multiply’ effect.
int gdLayerOverlay (int dst,
int src)
int gdMajorVersion()
int gdMinorVersion()
gdIOCtx * gdNewDynamicCtx(int initialSize,
void *data)
Return data as a dynamic pointer.
gdIOCtx * gdNewDynamicCtxEx(int initialSize,
void *data,
int freeOKFlag)
gdIOCtx * gdNewFileCtx(FILE *f)
Return data as a dynamic pointer.
gdIOCtx * gdNewSSCtx(gdSourcePtr src,
gdSinkPtr snk)
Return data as a dynamic pointer.
Defines a point in a 2D coordinate system using floating point values.
Pointer to a gdPointF
Represents a point in the coordinate space of the image; used by gdImagePolygon, gdImageOpenPolygon and gdImageFilledPolygon for polygon drawing.
int gdReleaseVersion()
void gdSetErrorMethod(gdErrorMethod error_method)
Note: This interface is obsolete and kept only for *compatibility.
Note: This interface is obsolete and kept only for *compatibility.
int gdSupportsFileType(const char *filename,
int writing)
Tests if a given file type is supported by GD.
int gdTransformAffineBoundingBox(gdRectPtr src,
const double affine[6],
gdRectPtr bbox)
Returns the bounding box of an affine transformation applied to a rectangular area gdRect
int gdTransformAffineCopy(gdImagePtr dst,
int dst_x,
int dst_y,
const gdImagePtr src,
gdRectPtr src_region,
const double affine[6])
Applies an affine transformation to a region and copy the result in a destination to the given position.
int gdTransformAffineGetImage(gdImagePtr *dst,
const gdImagePtr src,
gdRectPtr src_area,
const double affine[6])
Applies an affine transformation to a region and return an image containing the complete transformation.
const char * gdVersionString()
Legal values for Disposal.
- -
- - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/General3.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/General3.html deleted file mode 100644 index 00d092f05c4..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/General3.html +++ /dev/null @@ -1,42 +0,0 @@ - - -Index - - - - - - - - - -
Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
L
 License
M
 Matrix
T
 Transform
 Types
- - - - - -
Group: Affine Matrix
- - - - - -
- - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Types.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Types.html deleted file mode 100644 index 897bd13898a..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/index/Types.html +++ /dev/null @@ -1,34 +0,0 @@ - - -Type Index - - - - - - - - - -
Type Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
G
 gdFont
 gdFontPtr
 gdFTStringExtra
 gdFTStringExtraPtr
 gdImage
 gdImagePtr
 gdIOCtx
 gdPoint
 gdPointF
 gdPointFPtr
 gdPointPtr
 gdSink
 gdSinkPtr
 gdSource
 gdSourcePtr
- -
A font structure, containing the bitmaps of all characters in a font.
A structure and associated pointer type used to pass additional parameters to the gdImageStringFTEx function.
The data structure in which gd stores images.
gdIOCtx structures hold function pointers for doing image IO.
Defines a point in a 2D coordinate system using floating point values.
Pointer to a gdPointF
Represents a point in the coordinate space of the image; used by gdImagePolygon, gdImageOpenPolygon and gdImageFilledPolygon for polygon drawing.
Note: This interface is obsolete and kept only for *compatibility.
Note: This interface is obsolete and kept only for *compatibility.
- -
- - - - - - - - - - - - \ No newline at end of file diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/javascript/main.js b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/javascript/main.js deleted file mode 100644 index 3f42acde648..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/javascript/main.js +++ /dev/null @@ -1,841 +0,0 @@ -// This file is part of Natural Docs, which is Copyright © 2003-2010 Greg Valure -// Natural Docs is licensed under version 3 of the GNU Affero General Public License (AGPL) -// Refer to License.txt for the complete details - -// This file may be distributed with documentation files generated by Natural Docs. -// Such documentation is not covered by Natural Docs' copyright and licensing, -// and may have its own copyright and distribution terms as decided by its author. - - -// -// Browser Styles -// ____________________________________________________________________________ - -var agt=navigator.userAgent.toLowerCase(); -var browserType; -var browserVer; - -if (agt.indexOf("opera") != -1) - { - browserType = "Opera"; - - if (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1) - { browserVer = "Opera7"; } - else if (agt.indexOf("opera 8") != -1 || agt.indexOf("opera/8") != -1) - { browserVer = "Opera8"; } - else if (agt.indexOf("opera 9") != -1 || agt.indexOf("opera/9") != -1) - { browserVer = "Opera9"; } - } - -else if (agt.indexOf("applewebkit") != -1) - { - browserType = "Safari"; - - if (agt.indexOf("version/3") != -1) - { browserVer = "Safari3"; } - else if (agt.indexOf("safari/4") != -1) - { browserVer = "Safari2"; } - } - -else if (agt.indexOf("khtml") != -1) - { - browserType = "Konqueror"; - } - -else if (agt.indexOf("msie") != -1) - { - browserType = "IE"; - - if (agt.indexOf("msie 6") != -1) - { browserVer = "IE6"; } - else if (agt.indexOf("msie 7") != -1) - { browserVer = "IE7"; } - } - -else if (agt.indexOf("gecko") != -1) - { - browserType = "Firefox"; - - if (agt.indexOf("rv:1.7") != -1) - { browserVer = "Firefox1"; } - else if (agt.indexOf("rv:1.8)") != -1 || agt.indexOf("rv:1.8.0") != -1) - { browserVer = "Firefox15"; } - else if (agt.indexOf("rv:1.8.1") != -1) - { browserVer = "Firefox2"; } - } - - -// -// Support Functions -// ____________________________________________________________________________ - - -function GetXPosition(item) - { - var position = 0; - - if (item.offsetWidth != null) - { - while (item != document.body && item != null) - { - position += item.offsetLeft; - item = item.offsetParent; - }; - }; - - return position; - }; - - -function GetYPosition(item) - { - var position = 0; - - if (item.offsetWidth != null) - { - while (item != document.body && item != null) - { - position += item.offsetTop; - item = item.offsetParent; - }; - }; - - return position; - }; - - -function MoveToPosition(item, x, y) - { - // Opera 5 chokes on the px extension, so it can use the Microsoft one instead. - - if (item.style.left != null) - { - item.style.left = x + "px"; - item.style.top = y + "px"; - } - else if (item.style.pixelLeft != null) - { - item.style.pixelLeft = x; - item.style.pixelTop = y; - }; - }; - - -// -// Menu -// ____________________________________________________________________________ - - -function ToggleMenu(id) - { - if (!window.document.getElementById) - { return; }; - - var display = window.document.getElementById(id).style.display; - - if (display == "none") - { display = "block"; } - else - { display = "none"; } - - window.document.getElementById(id).style.display = display; - } - -function HideAllBut(ids, max) - { - if (document.getElementById) - { - ids.sort( function(a,b) { return a - b; } ); - var number = 1; - - while (number < max) - { - if (ids.length > 0 && number == ids[0]) - { ids.shift(); } - else - { - document.getElementById("MGroupContent" + number).style.display = "none"; - }; - - number++; - }; - }; - } - - -// -// Tooltips -// ____________________________________________________________________________ - - -var tooltipTimer = 0; - -function ShowTip(event, tooltipID, linkID) - { - if (tooltipTimer) - { clearTimeout(tooltipTimer); }; - - var docX = event.clientX + window.pageXOffset; - var docY = event.clientY + window.pageYOffset; - - var showCommand = "ReallyShowTip('" + tooltipID + "', '" + linkID + "', " + docX + ", " + docY + ")"; - - tooltipTimer = setTimeout(showCommand, 1000); - } - -function ReallyShowTip(tooltipID, linkID, docX, docY) - { - tooltipTimer = 0; - - var tooltip; - var link; - - if (document.getElementById) - { - tooltip = document.getElementById(tooltipID); - link = document.getElementById(linkID); - } -/* else if (document.all) - { - tooltip = eval("document.all['" + tooltipID + "']"); - link = eval("document.all['" + linkID + "']"); - } -*/ - if (tooltip) - { - var left = GetXPosition(link); - var top = GetYPosition(link); - top += link.offsetHeight; - - - // The fallback method is to use the mouse X and Y relative to the document. We use a separate if and test if its a number - // in case some browser snuck through the above if statement but didn't support everything. - - if (!isFinite(top) || top == 0) - { - left = docX; - top = docY; - } - - // Some spacing to get it out from under the cursor. - - top += 10; - - // Make sure the tooltip doesnt get smushed by being too close to the edge, or in some browsers, go off the edge of the - // page. We do it here because Konqueror does get offsetWidth right even if it doesnt get the positioning right. - - if (tooltip.offsetWidth != null) - { - var width = tooltip.offsetWidth; - var docWidth = document.body.clientWidth; - - if (left + width > docWidth) - { left = docWidth - width - 1; } - - // If there's a horizontal scroll bar we could go past zero because it's using the page width, not the window width. - if (left < 0) - { left = 0; }; - } - - MoveToPosition(tooltip, left, top); - tooltip.style.visibility = "visible"; - } - } - -function HideTip(tooltipID) - { - if (tooltipTimer) - { - clearTimeout(tooltipTimer); - tooltipTimer = 0; - } - - var tooltip; - - if (document.getElementById) - { tooltip = document.getElementById(tooltipID); } - else if (document.all) - { tooltip = eval("document.all['" + tooltipID + "']"); } - - if (tooltip) - { tooltip.style.visibility = "hidden"; } - } - - -// -// Blockquote fix for IE -// ____________________________________________________________________________ - - -function NDOnLoad() - { - if (browserVer == "IE6") - { - var scrollboxes = document.getElementsByTagName('blockquote'); - - if (scrollboxes.item(0)) - { - NDDoResize(); - window.onresize=NDOnResize; - }; - }; - }; - - -var resizeTimer = 0; - -function NDOnResize() - { - if (resizeTimer != 0) - { clearTimeout(resizeTimer); }; - - resizeTimer = setTimeout(NDDoResize, 250); - }; - - -function NDDoResize() - { - var scrollboxes = document.getElementsByTagName('blockquote'); - - var i; - var item; - - i = 0; - while (item = scrollboxes.item(i)) - { - item.style.width = 100; - i++; - }; - - i = 0; - while (item = scrollboxes.item(i)) - { - item.style.width = item.parentNode.offsetWidth; - i++; - }; - - clearTimeout(resizeTimer); - resizeTimer = 0; - } - - - -/* ________________________________________________________________________________________________________ - - Class: SearchPanel - ________________________________________________________________________________________________________ - - A class handling everything associated with the search panel. - - Parameters: - - name - The name of the global variable that will be storing this instance. Is needed to be able to set timeouts. - mode - The mode the search is going to work in. Pass CommandLineOption()>, so the - value will be something like "HTML" or "FramedHTML". - - ________________________________________________________________________________________________________ -*/ - - -function SearchPanel(name, mode, resultsPath) - { - if (!name || !mode || !resultsPath) - { alert("Incorrect parameters to SearchPanel."); }; - - - // Group: Variables - // ________________________________________________________________________ - - /* - var: name - The name of the global variable that will be storing this instance of the class. - */ - this.name = name; - - /* - var: mode - The mode the search is going to work in, such as "HTML" or "FramedHTML". - */ - this.mode = mode; - - /* - var: resultsPath - The relative path from the current HTML page to the results page directory. - */ - this.resultsPath = resultsPath; - - /* - var: keyTimeout - The timeout used between a keystroke and when a search is performed. - */ - this.keyTimeout = 0; - - /* - var: keyTimeoutLength - The length of in thousandths of a second. - */ - this.keyTimeoutLength = 500; - - /* - var: lastSearchValue - The last search string executed, or an empty string if none. - */ - this.lastSearchValue = ""; - - /* - var: lastResultsPage - The last results page. The value is only relevant if is set. - */ - this.lastResultsPage = ""; - - /* - var: deactivateTimeout - - The timeout used between when a control is deactivated and when the entire panel is deactivated. Is necessary - because a control may be deactivated in favor of another control in the same panel, in which case it should stay - active. - */ - this.deactivateTimout = 0; - - /* - var: deactivateTimeoutLength - The length of in thousandths of a second. - */ - this.deactivateTimeoutLength = 200; - - - - - // Group: DOM Elements - // ________________________________________________________________________ - - - // Function: DOMSearchField - this.DOMSearchField = function() - { return document.getElementById("MSearchField"); }; - - // Function: DOMSearchType - this.DOMSearchType = function() - { return document.getElementById("MSearchType"); }; - - // Function: DOMPopupSearchResults - this.DOMPopupSearchResults = function() - { return document.getElementById("MSearchResults"); }; - - // Function: DOMPopupSearchResultsWindow - this.DOMPopupSearchResultsWindow = function() - { return document.getElementById("MSearchResultsWindow"); }; - - // Function: DOMSearchPanel - this.DOMSearchPanel = function() - { return document.getElementById("MSearchPanel"); }; - - - - - // Group: Event Handlers - // ________________________________________________________________________ - - - /* - Function: OnSearchFieldFocus - Called when focus is added or removed from the search field. - */ - this.OnSearchFieldFocus = function(isActive) - { - this.Activate(isActive); - }; - - - /* - Function: OnSearchFieldChange - Called when the content of the search field is changed. - */ - this.OnSearchFieldChange = function() - { - if (this.keyTimeout) - { - clearTimeout(this.keyTimeout); - this.keyTimeout = 0; - }; - - var searchValue = this.DOMSearchField().value.replace(/ +/g, ""); - - if (searchValue != this.lastSearchValue) - { - if (searchValue != "") - { - this.keyTimeout = setTimeout(this.name + ".Search()", this.keyTimeoutLength); - } - else - { - if (this.mode == "HTML") - { this.DOMPopupSearchResultsWindow().style.display = "none"; }; - this.lastSearchValue = ""; - }; - }; - }; - - - /* - Function: OnSearchTypeFocus - Called when focus is added or removed from the search type. - */ - this.OnSearchTypeFocus = function(isActive) - { - this.Activate(isActive); - }; - - - /* - Function: OnSearchTypeChange - Called when the search type is changed. - */ - this.OnSearchTypeChange = function() - { - var searchValue = this.DOMSearchField().value.replace(/ +/g, ""); - - if (searchValue != "") - { - this.Search(); - }; - }; - - - - // Group: Action Functions - // ________________________________________________________________________ - - - /* - Function: CloseResultsWindow - Closes the results window. - */ - this.CloseResultsWindow = function() - { - this.DOMPopupSearchResultsWindow().style.display = "none"; - this.Activate(false, true); - }; - - - /* - Function: Search - Performs a search. - */ - this.Search = function() - { - this.keyTimeout = 0; - - var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); - var searchTopic = this.DOMSearchType().value; - - var pageExtension = searchValue.substr(0,1); - - if (pageExtension.match(/^[a-z]/i)) - { pageExtension = pageExtension.toUpperCase(); } - else if (pageExtension.match(/^[0-9]/)) - { pageExtension = 'Numbers'; } - else - { pageExtension = "Symbols"; }; - - var resultsPage; - var resultsPageWithSearch; - var hasResultsPage; - - // indexSectionsWithContent is defined in searchdata.js - if (indexSectionsWithContent[searchTopic][pageExtension] == true) - { - resultsPage = this.resultsPath + '/' + searchTopic + pageExtension + '.html'; - resultsPageWithSearch = resultsPage+'?'+escape(searchValue); - hasResultsPage = true; - } - else - { - resultsPage = this.resultsPath + '/NoResults.html'; - resultsPageWithSearch = resultsPage; - hasResultsPage = false; - }; - - var resultsFrame; - if (this.mode == "HTML") - { resultsFrame = window.frames.MSearchResults; } - else if (this.mode == "FramedHTML") - { resultsFrame = window.top.frames['Content']; }; - - - if (resultsPage != this.lastResultsPage || - - // Bug in IE. If everything becomes hidden in a run, none of them will be able to be reshown in the next for some - // reason. It counts the right number of results, and you can even read the display as "block" after setting it, but it - // just doesn't work in IE 6 or IE 7. So if we're on the right page but the previous search had no results, reload the - // page anyway to get around the bug. - (browserType == "IE" && hasResultsPage && - (!resultsFrame.searchResults || resultsFrame.searchResults.lastMatchCount == 0)) ) - - { - resultsFrame.location.href = resultsPageWithSearch; - } - - // So if the results page is right and there's no IE bug, reperform the search on the existing page. We have to check if there - // are results because NoResults.html doesn't have any JavaScript, and it would be useless to do anything on that page even - // if it did. - else if (hasResultsPage) - { - // We need to check if this exists in case the frame is present but didn't finish loading. - if (resultsFrame.searchResults) - { resultsFrame.searchResults.Search(searchValue); } - - // Otherwise just reload instead of waiting. - else - { resultsFrame.location.href = resultsPageWithSearch; }; - }; - - - var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); - - if (this.mode == "HTML" && domPopupSearchResultsWindow.style.display != "block") - { - var domSearchType = this.DOMSearchType(); - - var left = GetXPosition(domSearchType); - var top = GetYPosition(domSearchType) + domSearchType.offsetHeight; - - MoveToPosition(domPopupSearchResultsWindow, left, top); - domPopupSearchResultsWindow.style.display = 'block'; - }; - - - this.lastSearchValue = searchValue; - this.lastResultsPage = resultsPage; - }; - - - - // Group: Activation Functions - // Functions that handle whether the entire panel is active or not. - // ________________________________________________________________________ - - - /* - Function: Activate - - Activates or deactivates the search panel, resetting things to their default values if necessary. You can call this on every - control's OnBlur() and it will handle not deactivating the entire panel when focus is just switching between them transparently. - - Parameters: - - isActive - Whether you're activating or deactivating the panel. - ignoreDeactivateDelay - Set if you're positive the action will deactivate the panel and thus want to skip the delay. - */ - this.Activate = function(isActive, ignoreDeactivateDelay) - { - // We want to ignore isActive being false while the results window is open. - if (isActive || (this.mode == "HTML" && this.DOMPopupSearchResultsWindow().style.display == "block")) - { - if (this.inactivateTimeout) - { - clearTimeout(this.inactivateTimeout); - this.inactivateTimeout = 0; - }; - - this.DOMSearchPanel().className = 'MSearchPanelActive'; - - var searchField = this.DOMSearchField(); - - if (searchField.value == 'Search') - { searchField.value = ""; } - } - else if (!ignoreDeactivateDelay) - { - this.inactivateTimeout = setTimeout(this.name + ".InactivateAfterTimeout()", this.inactivateTimeoutLength); - } - else - { - this.InactivateAfterTimeout(); - }; - }; - - - /* - Function: InactivateAfterTimeout - - Called by , which is set by . Inactivation occurs on a timeout because a control may - receive OnBlur() when focus is really transferring to another control in the search panel. In this case we don't want to - actually deactivate the panel because not only would that cause a visible flicker but it could also reset the search value. - So by doing it on a timeout instead, there's a short period where the second control's OnFocus() can cancel the deactivation. - */ - this.InactivateAfterTimeout = function() - { - this.inactivateTimeout = 0; - - this.DOMSearchPanel().className = 'MSearchPanelInactive'; - this.DOMSearchField().value = "Search"; - - this.lastSearchValue = ""; - this.lastResultsPage = ""; - }; - }; - - - - -/* ________________________________________________________________________________________________________ - - Class: SearchResults - _________________________________________________________________________________________________________ - - The class that handles everything on the search results page. - _________________________________________________________________________________________________________ -*/ - - -function SearchResults(name, mode) - { - /* - var: mode - The mode the search is going to work in, such as "HTML" or "FramedHTML". - */ - this.mode = mode; - - /* - var: lastMatchCount - The number of matches from the last run of . - */ - this.lastMatchCount = 0; - - - /* - Function: Toggle - Toggles the visibility of the passed element ID. - */ - this.Toggle = function(id) - { - if (this.mode == "FramedHTML") - { return; }; - - var parentElement = document.getElementById(id); - - var element = parentElement.firstChild; - - while (element && element != parentElement) - { - if (element.nodeName == 'DIV' && element.className == 'ISubIndex') - { - if (element.style.display == 'block') - { element.style.display = "none"; } - else - { element.style.display = 'block'; } - }; - - if (element.nodeName == 'DIV' && element.hasChildNodes()) - { element = element.firstChild; } - else if (element.nextSibling) - { element = element.nextSibling; } - else - { - do - { - element = element.parentNode; - } - while (element && element != parentElement && !element.nextSibling); - - if (element && element != parentElement) - { element = element.nextSibling; }; - }; - }; - }; - - - /* - Function: Search - - Searches for the passed string. If there is no parameter, it takes it from the URL query. - - Always returns true, since other documents may try to call it and that may or may not be possible. - */ - this.Search = function(search) - { - if (!search) - { - search = window.location.search; - search = search.substring(1); // Remove the leading ? - search = unescape(search); - }; - - search = search.replace(/^ +/, ""); - search = search.replace(/ +$/, ""); - search = search.toLowerCase(); - - if (search.match(/[^a-z0-9]/)) // Just a little speedup so it doesn't have to go through the below unnecessarily. - { - search = search.replace(/\_/g, "_und"); - search = search.replace(/\ +/gi, "_spc"); - search = search.replace(/\~/g, "_til"); - search = search.replace(/\!/g, "_exc"); - search = search.replace(/\@/g, "_att"); - search = search.replace(/\#/g, "_num"); - search = search.replace(/\$/g, "_dol"); - search = search.replace(/\%/g, "_pct"); - search = search.replace(/\^/g, "_car"); - search = search.replace(/\&/g, "_amp"); - search = search.replace(/\*/g, "_ast"); - search = search.replace(/\(/g, "_lpa"); - search = search.replace(/\)/g, "_rpa"); - search = search.replace(/\-/g, "_min"); - search = search.replace(/\+/g, "_plu"); - search = search.replace(/\=/g, "_equ"); - search = search.replace(/\{/g, "_lbc"); - search = search.replace(/\}/g, "_rbc"); - search = search.replace(/\[/g, "_lbk"); - search = search.replace(/\]/g, "_rbk"); - search = search.replace(/\:/g, "_col"); - search = search.replace(/\;/g, "_sco"); - search = search.replace(/\"/g, "_quo"); - search = search.replace(/\'/g, "_apo"); - search = search.replace(/\/g, "_ran"); - search = search.replace(/\,/g, "_com"); - search = search.replace(/\./g, "_per"); - search = search.replace(/\?/g, "_que"); - search = search.replace(/\//g, "_sla"); - search = search.replace(/[^a-z0-9\_]i/gi, "_zzz"); - }; - - var resultRows = document.getElementsByTagName("div"); - var matches = 0; - - var i = 0; - while (i < resultRows.length) - { - var row = resultRows.item(i); - - if (row.className == "SRResult") - { - var rowMatchName = row.id.toLowerCase(); - rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); - - if (search.length <= rowMatchName.length && rowMatchName.substr(0, search.length) == search) - { - row.style.display = "block"; - matches++; - } - else - { row.style.display = "none"; }; - }; - - i++; - }; - - document.getElementById("Searching").style.display="none"; - - if (matches == 0) - { document.getElementById("NoMatches").style.display="block"; } - else - { document.getElementById("NoMatches").style.display="none"; } - - this.lastMatchCount = matches; - - return true; - }; - }; - diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/javascript/prettify.js b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/javascript/prettify.js deleted file mode 100644 index fda4bf1eda7..00000000000 --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/javascript/prettify.js +++ /dev/null @@ -1,1526 +0,0 @@ - -// This code comes from the December 2009 release of Google Prettify, which is Copyright © 2006 Google Inc. -// Minor modifications are marked with "ND Change" comments. -// As part of Natural Docs, this code is licensed under version 3 of the GNU Affero General Public License (AGPL.) -// However, it may also be obtained separately under version 2.0 of the Apache License. -// Refer to License.txt for the complete details - - -// Main code -// ____________________________________________________________________________ - -// Copyright (C) 2006 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -/** - * @fileoverview - * some functions for browser-side pretty printing of code contained in html. - *

- * - * For a fairly comprehensive set of languages see the - * README - * file that came with this source. At a minimum, the lexer should work on a - * number of languages including C and friends, Java, Python, Bash, SQL, HTML, - * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk - * and a subset of Perl, but, because of commenting conventions, doesn't work on - * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class. - *

- * Usage:

    - *
  1. include this source file in an html page via - * {@code } - *
  2. define style rules. See the example page for examples. - *
  3. mark the {@code
    } and {@code } tags in your source with
    - *    {@code class=prettyprint.}
    - *    You can also use the (html deprecated) {@code } tag, but the pretty
    - *    printer needs to do more substantial DOM manipulations to support that, so
    - *    some css styles may not be preserved.
    - * </ol>
    - * That's it.  I wanted to keep the API as simple as possible, so there's no
    - * need to specify which language the code is in, but if you wish, you can add
    - * another class to the {@code <pre>} or {@code <code>} element to specify the
    - * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
    - * starts with "lang-" followed by a file extension, specifies the file type.
    - * See the "lang-*.js" files in this directory for code that implements
    - * per-language file handlers.
    - * <p>
    - * Change log:<br>
    - * cbeust, 2006/08/22
    - * <blockquote>
    - *   Java annotations (start with "@") are now captured as literals ("lit")
    - * </blockquote>
    - * @requires console
    - * @overrides window
    - */
    -
    -// JSLint declarations
    -/*global console, document, navigator, setTimeout, window */
    -
    -/**
    - * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
    - * UI events.
    - * If set to {@code false}, {@code prettyPrint()} is synchronous.
    - */
    -window['PR_SHOULD_USE_CONTINUATION'] = true;
    -
    -/** the number of characters between tab columns */
    -window['PR_TAB_WIDTH'] = 8;
    -
    -/** Walks the DOM returning a properly escaped version of innerHTML.
    -  * @param {Node} node
    -  * @param {Array.<string>} out output buffer that receives chunks of HTML.
    -  */
    -window['PR_normalizedHtml']
    -
    -/** Contains functions for creating and registering new language handlers.
    -  * @type {Object}
    -  */
    -  = window['PR']
    -
    -/** Pretty print a chunk of code.
    -  *
    -  * @param {string} sourceCodeHtml code as html
    -  * @return {string} code as html, but prettier
    -  */
    -  = window['prettyPrintOne']
    -/** Find all the {@code <pre>} and {@code <code>} tags in the DOM with
    -  * {@code class=prettyprint} and prettify them.
    -  * @param {Function?} opt_whenDone if specified, called when the last entry
    -  *     has been finished.
    -  */
    -  = window['prettyPrint'] = void 0;
    -
    -/** browser detection. @extern @returns false if not IE, otherwise the major version. */
    -window['_pr_isIE6'] = function () {
    -  var ieVersion = navigator && navigator.userAgent &&
    -      navigator.userAgent.match(/\bMSIE ([678])\./);
    -  ieVersion = ieVersion ? +ieVersion[1] : false;
    -  window['_pr_isIE6'] = function () { return ieVersion; };
    -  return ieVersion;
    -};
    -
    -
    -(function () {
    -  // Keyword lists for various languages.
    -  var FLOW_CONTROL_KEYWORDS =
    -      "break continue do else for if return while ";
    -  var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default " +
    -      "double enum extern float goto int long register short signed sizeof " +
    -      "static struct switch typedef union unsigned void volatile ";
    -  var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import " +
    -      "new operator private protected public this throw true try typeof ";
    -  var CPP_KEYWORDS = COMMON_KEYWORDS + "alignof align_union asm axiom bool " +
    -      "concept concept_map const_cast constexpr decltype " +
    -      "dynamic_cast explicit export friend inline late_check " +
    -      "mutable namespace nullptr reinterpret_cast static_assert static_cast " +
    -      "template typeid typename using virtual wchar_t where ";
    -  var JAVA_KEYWORDS = COMMON_KEYWORDS +
    -      "abstract boolean byte extends final finally implements import " +
    -      "instanceof null native package strictfp super synchronized throws " +
    -      "transient ";
    -  var CSHARP_KEYWORDS = JAVA_KEYWORDS +
    -      "as base by checked decimal delegate descending event " +
    -      "fixed foreach from group implicit in interface internal into is lock " +
    -      "object out override orderby params partial readonly ref sbyte sealed " +
    -      "stackalloc string select uint ulong unchecked unsafe ushort var ";
    -  var JSCRIPT_KEYWORDS = COMMON_KEYWORDS +
    -      "debugger eval export function get null set undefined var with " +
    -      "Infinity NaN ";
    -  var PERL_KEYWORDS = "caller delete die do dump elsif eval exit foreach for " +
    -      "goto if import last local my next no our print package redo require " +
    -      "sub undef unless until use wantarray while BEGIN END ";
    -  var PYTHON_KEYWORDS = FLOW_CONTROL_KEYWORDS + "and as assert class def del " +
    -      "elif except exec finally from global import in is lambda " +
    -      "nonlocal not or pass print raise try with yield " +
    -      "False True None ";
    -  var RUBY_KEYWORDS = FLOW_CONTROL_KEYWORDS + "alias and begin case class def" +
    -      " defined elsif end ensure false in module next nil not or redo rescue " +
    -      "retry self super then true undef unless until when yield BEGIN END ";
    -  var SH_KEYWORDS = FLOW_CONTROL_KEYWORDS + "case done elif esac eval fi " +
    -      "function in local set then until ";
    -  var ALL_KEYWORDS = (
    -      CPP_KEYWORDS + CSHARP_KEYWORDS + JSCRIPT_KEYWORDS + PERL_KEYWORDS +
    -      PYTHON_KEYWORDS + RUBY_KEYWORDS + SH_KEYWORDS);
    -
    -  // token style names.  correspond to css classes
    -  /** token style for a string literal */
    -  var PR_STRING = 'str';
    -  /** token style for a keyword */
    -  var PR_KEYWORD = 'kwd';
    -  /** token style for a comment */
    -  var PR_COMMENT = 'com';
    -  /** token style for a type */
    -  var PR_TYPE = 'typ';
    -  /** token style for a literal value.  e.g. 1, null, true. */
    -  var PR_LITERAL = 'lit';
    -  /** token style for a punctuation string. */
    -  var PR_PUNCTUATION = 'pun';
    -  /** token style for a punctuation string. */
    -  var PR_PLAIN = 'pln';
    -
    -  /** token style for an sgml tag. */
    -  var PR_TAG = 'tag';
    -  /** token style for a markup declaration such as a DOCTYPE. */
    -  var PR_DECLARATION = 'dec';
    -  /** token style for embedded source. */
    -  var PR_SOURCE = 'src';
    -  /** token style for an sgml attribute name. */
    -  var PR_ATTRIB_NAME = 'atn';
    -  /** token style for an sgml attribute value. */
    -  var PR_ATTRIB_VALUE = 'atv';
    -
    -  /**
    -   * A class that indicates a section of markup that is not code, e.g. to allow
    -   * embedding of line numbers within code listings.
    -   */
    -  var PR_NOCODE = 'nocode';
    -
    -  /** A set of tokens that can precede a regular expression literal in
    -    * javascript.
    -    * http://www.mozilla.org/js/language/js20/rationale/syntax.html has the full
    -    * list, but I've removed ones that might be problematic when seen in
    -    * languages that don't support regular expression literals.
    -    *
    -    * <p>Specifically, I've removed any keywords that can't precede a regexp
    -    * literal in a syntactically legal javascript program, and I've removed the
    -    * "in" keyword since it's not a keyword in many languages, and might be used
    -    * as a count of inches.
    -    *
    -    * <p>The link a above does not accurately describe EcmaScript rules since
    -    * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
    -    * very well in practice.
    -    *
    -    * @private
    -    */
    -  var REGEXP_PRECEDER_PATTERN = function () {
    -      var preceders = [
    -          "!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=",
    -          "&=", "(", "*", "*=", /* "+", */ "+=", ",", /* "-", */ "-=",
    -          "->", /*".", "..", "...", handled below */ "/", "/=", ":", "::", ";",
    -          "<", "<<", "<<=", "<=", "=", "==", "===", ">",
    -          ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[",
    -          "^", "^=", "^^", "^^=", "{", "|", "|=", "||",
    -          "||=", "~" /* handles =~ and !~ */,
    -          "break", "case", "continue", "delete",
    -          "do", "else", "finally", "instanceof",
    -          "return", "throw", "try", "typeof"
    -          ];
    -      var pattern = '(?:^^|[+-]';
    -      for (var i = 0; i < preceders.length; ++i) {
    -        pattern += '|' + preceders[i].replace(/([^=<>:&a-z])/g, '\\$1');
    -      }
    -      pattern += ')\\s*';  // matches at end, and matches empty string
    -      return pattern;
    -      // CAVEAT: this does not properly handle the case where a regular
    -      // expression immediately follows another since a regular expression may
    -      // have flags for case-sensitivity and the like.  Having regexp tokens
    -      // adjacent is not valid in any language I'm aware of, so I'm punting.
    -      // TODO: maybe style special characters inside a regexp as punctuation.
    -    }();
    -
    -  // Define regexps here so that the interpreter doesn't have to create an
    -  // object each time the function containing them is called.
    -  // The language spec requires a new object created even if you don't access
    -  // the $1 members.
    -  var pr_amp = /&/g;
    -  var pr_lt = /</g;
    -  var pr_gt = />/g;
    -  var pr_quot = /\"/g;
    -  /** like textToHtml but escapes double quotes to be attribute safe. */
    -  function attribToHtml(str) {
    -    return str.replace(pr_amp, '&amp;')
    -        .replace(pr_lt, '&lt;')
    -        .replace(pr_gt, '&gt;')
    -        .replace(pr_quot, '&quot;');
    -  }
    -
    -  /** escapest html special characters to html. */
    -  function textToHtml(str) {
    -    return str.replace(pr_amp, '&amp;')
    -        .replace(pr_lt, '&lt;')
    -        .replace(pr_gt, '&gt;');
    -  }
    -
    -
    -  var pr_ltEnt = /&lt;/g;
    -  var pr_gtEnt = /&gt;/g;
    -  var pr_aposEnt = /&apos;/g;
    -  var pr_quotEnt = /&quot;/g;
    -  var pr_ampEnt = /&amp;/g;
    -  var pr_nbspEnt = /&nbsp;/g;
    -  /** unescapes html to plain text. */
    -  function htmlToText(html) {
    -    var pos = html.indexOf('&');
    -    if (pos < 0) { return html; }
    -    // Handle numeric entities specially.  We can't use functional substitution
    -    // since that doesn't work in older versions of Safari.
    -    // These should be rare since most browsers convert them to normal chars.
    -    for (--pos; (pos = html.indexOf('&#', pos + 1)) >= 0;) {
    -      var end = html.indexOf(';', pos);
    -      if (end >= 0) {
    -        var num = html.substring(pos + 3, end);
    -        var radix = 10;
    -        if (num && num.charAt(0) === 'x') {
    -          num = num.substring(1);
    -          radix = 16;
    -        }
    -        var codePoint = parseInt(num, radix);
    -        if (!isNaN(codePoint)) {
    -          html = (html.substring(0, pos) + String.fromCharCode(codePoint) +
    -                  html.substring(end + 1));
    -        }
    -      }
    -    }
    -
    -    return html.replace(pr_ltEnt, '<')
    -        .replace(pr_gtEnt, '>')
    -        .replace(pr_aposEnt, "'")
    -        .replace(pr_quotEnt, '"')
    -        .replace(pr_nbspEnt, ' ')
    -        .replace(pr_ampEnt, '&');
    -  }
    -
    -  /** is the given node's innerHTML normally unescaped? */
    -  function isRawContent(node) {
    -    return 'XMP' === node.tagName;
    -  }
    -
    -  var newlineRe = /[\r\n]/g;
    -  /**
    -   * Are newlines and adjacent spaces significant in the given node's innerHTML?
    -   */
    -  function isPreformatted(node, content) {
    -    // PRE means preformatted, and is a very common case, so don't create
    -    // unnecessary computed style objects.
    -    if ('PRE' === node.tagName) { return true; }
    -    if (!newlineRe.test(content)) { return true; }  // Don't care
    -    var whitespace = '';
    -    // For disconnected nodes, IE has no currentStyle.
    -    if (node.currentStyle) {
    -      whitespace = node.currentStyle.whiteSpace;
    -    } else if (window.getComputedStyle) {
    -      // Firefox makes a best guess if node is disconnected whereas Safari
    -      // returns the empty string.
    -      whitespace = window.getComputedStyle(node, null).whiteSpace;
    -    }
    -    return !whitespace || whitespace === 'pre';
    -  }
    -
    -  function normalizedHtml(node, out) {
    -    switch (node.nodeType) {
    -      case 1:  // an element
    -        var name = node.tagName.toLowerCase();
    -        out.push('<', name);
    -        for (var i = 0; i < node.attributes.length; ++i) {
    -          var attr = node.attributes[i];
    -          if (!attr.specified) { continue; }
    -          out.push(' ');
    -          normalizedHtml(attr, out);
    -        }
    -        out.push('>');
    -        for (var child = node.firstChild; child; child = child.nextSibling) {
    -          normalizedHtml(child, out);
    -        }
    -        if (node.firstChild || !/^(?:br|link|img)$/.test(name)) {
    -          out.push('<\/', name, '>');
    -        }
    -        break;
    -      case 2: // an attribute
    -        out.push(node.name.toLowerCase(), '="', attribToHtml(node.value), '"');
    -        break;
    -      case 3: case 4: // text
    -        out.push(textToHtml(node.nodeValue));
    -        break;
    -    }
    -  }
    -
    -  /**
    -   * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
    -   * matches the union o the sets o strings matched d by the input RegExp.
    -   * Since it matches globally, if the input strings have a start-of-input
    -   * anchor (/^.../), it is ignored for the purposes of unioning.
    -   * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
    -   * @return {RegExp} a global regex.
    -   */
    -  function combinePrefixPatterns(regexs) {
    -    var capturedGroupIndex = 0;
    -
    -    var needToFoldCase = false;
    -    var ignoreCase = false;
    -    for (var i = 0, n = regexs.length; i < n; ++i) {
    -      var regex = regexs[i];
    -      if (regex.ignoreCase) {
    -        ignoreCase = true;
    -      } else if (/[a-z]/i.test(regex.source.replace(
    -                     /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
    -        needToFoldCase = true;
    -        ignoreCase = false;
    -        break;
    -      }
    -    }
    -
    -    function decodeEscape(charsetPart) {
    -      if (charsetPart.charAt(0) !== '\\') { return charsetPart.charCodeAt(0); }
    -      switch (charsetPart.charAt(1)) {
    -        case 'b': return 8;
    -        case 't': return 9;
    -        case 'n': return 0xa;
    -        case 'v': return 0xb;
    -        case 'f': return 0xc;
    -        case 'r': return 0xd;
    -        case 'u': case 'x':
    -          return parseInt(charsetPart.substring(2), 16)
    -              || charsetPart.charCodeAt(1);
    -        case '0': case '1': case '2': case '3': case '4':
    -        case '5': case '6': case '7':
    -          return parseInt(charsetPart.substring(1), 8);
    -        default: return charsetPart.charCodeAt(1);
    -      }
    -    }
    -
    -    function encodeEscape(charCode) {
    -      if (charCode < 0x20) {
    -        return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
    -      }
    -      var ch = String.fromCharCode(charCode);
    -      if (ch === '\\' || ch === '-' || ch === '[' || ch === ']') {
    -        ch = '\\' + ch;
    -      }
    -      return ch;
    -    }
    -
    -    function caseFoldCharset(charSet) {
    -      var charsetParts = charSet.substring(1, charSet.length - 1).match(
    -          new RegExp(
    -              '\\\\u[0-9A-Fa-f]{4}'
    -              + '|\\\\x[0-9A-Fa-f]{2}'
    -              + '|\\\\[0-3][0-7]{0,2}'
    -              + '|\\\\[0-7]{1,2}'
    -              + '|\\\\[\\s\\S]'
    -              + '|-'
    -              + '|[^-\\\\]',
    -              'g'));
    -      var groups = [];
    -      var ranges = [];
    -      var inverse = charsetParts[0] === '^';
    -      for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
    -        var p = charsetParts[i];
    -        switch (p) {
    -          case '\\B': case '\\b':
    -          case '\\D': case '\\d':
    -          case '\\S': case '\\s':
    -          case '\\W': case '\\w':
    -            groups.push(p);
    -            continue;
    -        }
    -        var start = decodeEscape(p);
    -        var end;
    -        if (i + 2 < n && '-' === charsetParts[i + 1]) {
    -          end = decodeEscape(charsetParts[i + 2]);
    -          i += 2;
    -        } else {
    -          end = start;
    -        }
    -        ranges.push([start, end]);
    -        // If the range might intersect letters, then expand it.
    -        if (!(end < 65 || start > 122)) {
    -          if (!(end < 65 || start > 90)) {
    -            ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
    -          }
    -          if (!(end < 97 || start > 122)) {
    -            ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
    -          }
    -        }
    -      }
    -
    -      // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
    -      // -> [[1, 12], [14, 14], [16, 17]]
    -      ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
    -      var consolidatedRanges = [];
    -      var lastRange = [NaN, NaN];
    -      for (var i = 0; i < ranges.length; ++i) {
    -        var range = ranges[i];
    -        if (range[0] <= lastRange[1] + 1) {
    -          lastRange[1] = Math.max(lastRange[1], range[1]);
    -        } else {
    -          consolidatedRanges.push(lastRange = range);
    -        }
    -      }
    -
    -      var out = ['['];
    -      if (inverse) { out.push('^'); }
    -      out.push.apply(out, groups);
    -      for (var i = 0; i < consolidatedRanges.length; ++i) {
    -        var range = consolidatedRanges[i];
    -        out.push(encodeEscape(range[0]));
    -        if (range[1] > range[0]) {
    -          if (range[1] + 1 > range[0]) { out.push('-'); }
    -          out.push(encodeEscape(range[1]));
    -        }
    -      }
    -      out.push(']');
    -      return out.join('');
    -    }
    -
    -    function allowAnywhereFoldCaseAndRenumberGroups(regex) {
    -      // Split into character sets, escape sequences, punctuation strings
    -      // like ('(', '(?:', ')', '^'), and runs of characters that do not
    -      // include any of the above.
    -      var parts = regex.source.match(
    -          new RegExp(
    -              '(?:'
    -              + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
    -              + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
    -              + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
    -              + '|\\\\[0-9]+'  // a back-reference or octal escape
    -              + '|\\\\[^ux0-9]'  // other escape sequence
    -              + '|\\(\\?[:!=]'  // start of a non-capturing group
    -              + '|[\\(\\)\\^]'  // start/emd of a group, or line start
    -              + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
    -              + ')',
    -              'g'));
    -      var n = parts.length;
    -
    -      // Maps captured group numbers to the number they will occupy in
    -      // the output or to -1 if that has not been determined, or to
    -      // undefined if they need not be capturing in the output.
    -      var capturedGroups = [];
    -
    -      // Walk over and identify back references to build the capturedGroups
    -      // mapping.
    -      for (var i = 0, groupIndex = 0; i < n; ++i) {
    -        var p = parts[i];
    -        if (p === '(') {
    -          // groups are 1-indexed, so max group index is count of '('
    -          ++groupIndex;
    -        } else if ('\\' === p.charAt(0)) {
    -          var decimalValue = +p.substring(1);
    -          if (decimalValue && decimalValue <= groupIndex) {
    -            capturedGroups[decimalValue] = -1;
    -          }
    -        }
    -      }
    -
    -      // Renumber groups and reduce capturing groups to non-capturing groups
    -      // where possible.
    -      for (var i = 1; i < capturedGroups.length; ++i) {
    -        if (-1 === capturedGroups[i]) {
    -          capturedGroups[i] = ++capturedGroupIndex;
    -        }
    -      }
    -      for (var i = 0, groupIndex = 0; i < n; ++i) {
    -        var p = parts[i];
    -        if (p === '(') {
    -          ++groupIndex;
    -          if (capturedGroups[groupIndex] === undefined) {
    -            parts[i] = '(?:';
    -          }
    -        } else if ('\\' === p.charAt(0)) {
    -          var decimalValue = +p.substring(1);
    -          if (decimalValue && decimalValue <= groupIndex) {
    -            parts[i] = '\\' + capturedGroups[groupIndex];
    -          }
    -        }
    -      }
    -
    -      // Remove any prefix anchors so that the output will match anywhere.
    -      // ^^ really does mean an anchored match though.
    -      for (var i = 0, groupIndex = 0; i < n; ++i) {
    -        if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
    -      }
    -
    -      // Expand letters to groupts to handle mixing of case-sensitive and
    -      // case-insensitive patterns if necessary.
    -      if (regex.ignoreCase && needToFoldCase) {
    -        for (var i = 0; i < n; ++i) {
    -          var p = parts[i];
    -          var ch0 = p.charAt(0);
    -          if (p.length >= 2 && ch0 === '[') {
    -            parts[i] = caseFoldCharset(p);
    -          } else if (ch0 !== '\\') {
    -            // TODO: handle letters in numeric escapes.
    -            parts[i] = p.replace(
    -                /[a-zA-Z]/g,
    -                function (ch) {
    -                  var cc = ch.charCodeAt(0);
    -                  return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
    -                });
    -          }
    -        }
    -      }
    -
    -      return parts.join('');
    -    }
    -
    -    var rewritten = [];
    -    for (var i = 0, n = regexs.length; i < n; ++i) {
    -      var regex = regexs[i];
    -      if (regex.global || regex.multiline) { throw new Error('' + regex); }
    -      rewritten.push(
    -          '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
    -    }
    -
    -    return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
    -  }
    -
    -  var PR_innerHtmlWorks = null;
    -  function getInnerHtml(node) {
    -    // inner html is hopelessly broken in Safari 2.0.4 when the content is
    -    // an html description of well formed XML and the containing tag is a PRE
    -    // tag, so we detect that case and emulate innerHTML.
    -    if (null === PR_innerHtmlWorks) {
    -      var testNode = document.createElement('PRE');
    -      testNode.appendChild(
    -          document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));
    -      PR_innerHtmlWorks = !/</.test(testNode.innerHTML);
    -    }
    -
    -    if (PR_innerHtmlWorks) {
    -      var content = node.innerHTML;
    -      // XMP tags contain unescaped entities so require special handling.
    -      if (isRawContent(node)) {
    -        content = textToHtml(content);
    -      } else if (!isPreformatted(node, content)) {
    -        content = content.replace(/(<br\s*\/?>)[\r\n]+/g, '$1')
    -            .replace(/(?:[\r\n]+[ \t]*)+/g, ' ');
    -      }
    -      return content;
    -    }
    -
    -    var out = [];
    -    for (var child = node.firstChild; child; child = child.nextSibling) {
    -      normalizedHtml(child, out);
    -    }
    -    return out.join('');
    -  }
    -
    -  /** returns a function that expand tabs to spaces.  This function can be fed
    -    * successive chunks of text, and will maintain its own internal state to
    -    * keep track of how tabs are expanded.
    -    * @return {function (string) : string} a function that takes
    -    *   plain text and return the text with tabs expanded.
    -    * @private
    -    */
    -  function makeTabExpander(tabWidth) {
    -    var SPACES = '                ';
    -    var charInLine = 0;
    -
    -    return function (plainText) {
    -      // walk over each character looking for tabs and newlines.
    -      // On tabs, expand them.  On newlines, reset charInLine.
    -      // Otherwise increment charInLine
    -      var out = null;
    -      var pos = 0;
    -      for (var i = 0, n = plainText.length; i < n; ++i) {
    -        var ch = plainText.charAt(i);
    -
    -        switch (ch) {
    -          case '\t':
    -            if (!out) { out = []; }
    -            out.push(plainText.substring(pos, i));
    -            // calculate how much space we need in front of this part
    -            // nSpaces is the amount of padding -- the number of spaces needed
    -            // to move us to the next column, where columns occur at factors of
    -            // tabWidth.
    -            var nSpaces = tabWidth - (charInLine % tabWidth);
    -            charInLine += nSpaces;
    -            for (; nSpaces >= 0; nSpaces -= SPACES.length) {
    -              out.push(SPACES.substring(0, nSpaces));
    -            }
    -            pos = i + 1;
    -            break;
    -          case '\n':
    -            charInLine = 0;
    -            break;
    -          default:
    -            ++charInLine;
    -        }
    -      }
    -      if (!out) { return plainText; }
    -      out.push(plainText.substring(pos));
    -      return out.join('');
    -    };
    -  }
    -
    -  var pr_chunkPattern = new RegExp(
    -      '[^<]+'  // A run of characters other than '<'
    -      + '|<\!--[\\s\\S]*?--\>'  // an HTML comment
    -      + '|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>'  // a CDATA section
    -      // a probable tag that should not be highlighted
    -      + '|<\/?[a-zA-Z](?:[^>\"\']|\'[^\']*\'|\"[^\"]*\")*>'
    -      + '|<',  // A '<' that does not begin a larger chunk
    -      'g');
    -  var pr_commentPrefix = /^<\!--/;
    -  var pr_cdataPrefix = /^<!\[CDATA\[/;
    -  var pr_brPrefix = /^<br\b/i;
    -  var pr_tagNameRe = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/;
    -
    -  /** split markup into chunks of html tags (style null) and
    -    * plain text (style {@link #PR_PLAIN}), converting tags which are
    -    * significant for tokenization (<br>) into their textual equivalent.
    -    *
    -    * @param {string} s html where whitespace is considered significant.
    -    * @return {Object} source code and extracted tags.
    -    * @private
    -    */
    -  function extractTags(s) {
    -    // since the pattern has the 'g' modifier and defines no capturing groups,
    -    // this will return a list of all chunks which we then classify and wrap as
    -    // PR_Tokens
    -    var matches = s.match(pr_chunkPattern);
    -    var sourceBuf = [];
    -    var sourceBufLen = 0;
    -    var extractedTags = [];
    -    if (matches) {
    -      for (var i = 0, n = matches.length; i < n; ++i) {
    -        var match = matches[i];
    -        if (match.length > 1 && match.charAt(0) === '<') {
    -          if (pr_commentPrefix.test(match)) { continue; }
    -          if (pr_cdataPrefix.test(match)) {
    -            // strip CDATA prefix and suffix.  Don't unescape since it's CDATA
    -            sourceBuf.push(match.substring(9, match.length - 3));
    -            sourceBufLen += match.length - 12;
    -          } else if (pr_brPrefix.test(match)) {
    -            // <br> tags are lexically significant so convert them to text.
    -            // This is undone later.
    -            sourceBuf.push('\n');
    -            ++sourceBufLen;
    -          } else {
    -            if (match.indexOf(PR_NOCODE) >= 0 && isNoCodeTag(match)) {
    -              // A <span class="nocode"> will start a section that should be
    -              // ignored.  Continue walking the list until we see a matching end
    -              // tag.
    -              var name = match.match(pr_tagNameRe)[2];
    -              var depth = 1;
    -              var j;
    -              end_tag_loop:
    -              for (j = i + 1; j < n; ++j) {
    -                var name2 = matches[j].match(pr_tagNameRe);
    -                if (name2 && name2[2] === name) {
    -                  if (name2[1] === '/') {
    -                    if (--depth === 0) { break end_tag_loop; }
    -                  } else {
    -                    ++depth;
    -                  }
    -                }
    -              }
    -              if (j < n) {
    -                extractedTags.push(
    -                    sourceBufLen, matches.slice(i, j + 1).join(''));
    -                i = j;
    -              } else {  // Ignore unclosed sections.
    -                extractedTags.push(sourceBufLen, match);
    -              }
    -            } else {
    -              extractedTags.push(sourceBufLen, match);
    -            }
    -          }
    -        } else {
    -          var literalText = htmlToText(match);
    -          sourceBuf.push(literalText);
    -          sourceBufLen += literalText.length;
    -        }
    -      }
    -    }
    -    return { source: sourceBuf.join(''), tags: extractedTags };
    -  }
    -
    -  /** True if the given tag contains a class attribute with the nocode class. */
    -  function isNoCodeTag(tag) {
    -    return !!tag
    -        // First canonicalize the representation of attributes
    -        .replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,
    -                 ' $1="$2$3$4"')
    -        // Then look for the attribute we want.
    -        .match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/);
    -  }
    -
    -  /**
    -   * Apply the given language handler to sourceCode and add the resulting
    -   * decorations to out.
    -   * @param {number} basePos the index of sourceCode within the chunk of source
    -   *    whose decorations are already present on out.
    -   */
    -  function appendDecorations(basePos, sourceCode, langHandler, out) {
    -    if (!sourceCode) { return; }
    -    var job = {
    -      source: sourceCode,
    -      basePos: basePos
    -    };
    -    langHandler(job);
    -    out.push.apply(out, job.decorations);
    -  }
    -
    -  /** Given triples of [style, pattern, context] returns a lexing function,
    -    * The lexing function interprets the patterns to find token boundaries and
    -    * returns a decoration list of the form
    -    * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
    -    * where index_n is an index into the sourceCode, and style_n is a style
    -    * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
    -    * all characters in sourceCode[index_n-1:index_n].
    -    *
    -    * The stylePatterns is a list whose elements have the form
    -    * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
    -    *
    -    * Style is a style constant like PR_PLAIN, or can be a string of the
    -    * form 'lang-FOO', where FOO is a language extension describing the
    -    * language of the portion of the token in $1 after pattern executes.
    -    * E.g., if style is 'lang-lisp', and group 1 contains the text
    -    * '(hello (world))', then that portion of the token will be passed to the
    -    * registered lisp handler for formatting.
    -    * The text before and after group 1 will be restyled using this decorator
    -    * so decorators should take care that this doesn't result in infinite
    -    * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
    -    * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
    -    * '<script>foo()<\/script>', which would cause the current decorator to
    -    * be called with '<script>' which would not match the same rule since
    -    * group 1 must not be empty, so it would be instead styled as PR_TAG by
    -    * the generic tag rule.  The handler registered for the 'js' extension would
    -    * then be called with 'foo()', and finally, the current decorator would
    -    * be called with '<\/script>' which would not match the original rule and
    -    * so the generic tag rule would identify it as a tag.
    -    *
    -    * Pattern must only match prefixes, and if it matches a prefix, then that
    -    * match is considered a token with the same style.
    -    *
    -    * Context is applied to the last non-whitespace, non-comment token
    -    * recognized.
    -    *
    -    * Shortcut is an optional string of characters, any of which, if the first
    -    * character, gurantee that this pattern and only this pattern matches.
    -    *
    -    * @param {Array} shortcutStylePatterns patterns that always start with
    -    *   a known character.  Must have a shortcut string.
    -    * @param {Array} fallthroughStylePatterns patterns that will be tried in
    -    *   order if the shortcut ones fail.  May have shortcuts.
    -    *
    -    * @return {function (Object)} a
    -    *   function that takes source code and returns a list of decorations.
    -    */
    -  function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
    -    var shortcuts = {};
    -    var tokenizer;
    -    (function () {
    -      var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
    -      var allRegexs = [];
    -      var regexKeys = {};
    -      for (var i = 0, n = allPatterns.length; i < n; ++i) {
    -        var patternParts = allPatterns[i];
    -        var shortcutChars = patternParts[3];
    -        if (shortcutChars) {
    -          for (var c = shortcutChars.length; --c >= 0;) {
    -            shortcuts[shortcutChars.charAt(c)] = patternParts;
    -          }
    -        }
    -        var regex = patternParts[1];
    -        var k = '' + regex;
    -        if (!regexKeys.hasOwnProperty(k)) {
    -          allRegexs.push(regex);
    -          regexKeys[k] = null;
    -        }
    -      }
    -      allRegexs.push(/[\0-\uffff]/);
    -      tokenizer = combinePrefixPatterns(allRegexs);
    -    })();
    -
    -    var nPatterns = fallthroughStylePatterns.length;
    -    var notWs = /\S/;
    -
    -    /**
    -     * Lexes job.source and produces an output array job.decorations of style
    -     * classes preceded by the position at which they start in job.source in
    -     * order.
    -     *
    -     * @param {Object} job an object like {@code
    -     *    source: {string} sourceText plain text,
    -     *    basePos: {int} position of job.source in the larger chunk of
    -     *        sourceCode.
    -     * }
    -     */
    -    var decorate = function (job) {
    -      var sourceCode = job.source, basePos = job.basePos;
    -      /** Even entries are positions in source in ascending order.  Odd enties
    -        * are style markers (e.g., PR_COMMENT) that run from that position until
    -        * the end.
    -        * @type {Array.<number|string>}
    -        */
    -      var decorations = [basePos, PR_PLAIN];
    -      var pos = 0;  // index into sourceCode
    -      var tokens = sourceCode.match(tokenizer) || [];
    -      var styleCache = {};
    -
    -      for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
    -        var token = tokens[ti];
    -        var style = styleCache[token];
    -        var match = void 0;
    -
    -        var isEmbedded;
    -        if (typeof style === 'string') {
    -          isEmbedded = false;
    -        } else {
    -          var patternParts = shortcuts[token.charAt(0)];
    -          if (patternParts) {
    -            match = token.match(patternParts[1]);
    -            style = patternParts[0];
    -          } else {
    -            for (var i = 0; i < nPatterns; ++i) {
    -              patternParts = fallthroughStylePatterns[i];
    -              match = token.match(patternParts[1]);
    -              if (match) {
    -                style = patternParts[0];
    -                break;
    -              }
    -            }
    -
    -            if (!match) {  // make sure that we make progress
    -              style = PR_PLAIN;
    -            }
    -          }
    -
    -          isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
    -          if (isEmbedded && !(match && typeof match[1] === 'string')) {
    -            isEmbedded = false;
    -            style = PR_SOURCE;
    -          }
    -
    -          if (!isEmbedded) { styleCache[token] = style; }
    -        }
    -
    -        var tokenStart = pos;
    -        pos += token.length;
    -
    -        if (!isEmbedded) {
    -          decorations.push(basePos + tokenStart, style);
    -        } else {  // Treat group 1 as an embedded block of source code.
    -          var embeddedSource = match[1];
    -          var embeddedSourceStart = token.indexOf(embeddedSource);
    -          var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
    -          if (match[2]) {
    -            // If embeddedSource can be blank, then it would match at the
    -            // beginning which would cause us to infinitely recurse on the
    -            // entire token, so we catch the right context in match[2].
    -            embeddedSourceEnd = token.length - match[2].length;
    -            embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
    -          }
    -          var lang = style.substring(5);
    -          // Decorate the left of the embedded source
    -          appendDecorations(
    -              basePos + tokenStart,
    -              token.substring(0, embeddedSourceStart),
    -              decorate, decorations);
    -          // Decorate the embedded source
    -          appendDecorations(
    -              basePos + tokenStart + embeddedSourceStart,
    -              embeddedSource,
    -              langHandlerForExtension(lang, embeddedSource),
    -              decorations);
    -          // Decorate the right of the embedded section
    -          appendDecorations(
    -              basePos + tokenStart + embeddedSourceEnd,
    -              token.substring(embeddedSourceEnd),
    -              decorate, decorations);
    -        }
    -      }
    -      job.decorations = decorations;
    -    };
    -    return decorate;
    -  }
    -
    -  /** returns a function that produces a list of decorations from source text.
    -    *
    -    * This code treats ", ', and ` as string delimiters, and \ as a string
    -    * escape.  It does not recognize perl's qq() style strings.
    -    * It has no special handling for double delimiter escapes as in basic, or
    -    * the tripled delimiters used in python, but should work on those regardless
    -    * although in those cases a single string literal may be broken up into
    -    * multiple adjacent string literals.
    -    *
    -    * It recognizes C, C++, and shell style comments.
    -    *
    -    * @param {Object} options a set of optional parameters.
    -    * @return {function (Object)} a function that examines the source code
    -    *     in the input job and builds the decoration list.
    -    */
    -  function sourceDecorator(options) {
    -    var shortcutStylePatterns = [], fallthroughStylePatterns = [];
    -    if (options['tripleQuotedStrings']) {
    -      // '''multi-line-string''', 'single-line-string', and double-quoted
    -      shortcutStylePatterns.push(
    -          [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
    -           null, '\'"']);
    -    } else if (options['multiLineStrings']) {
    -      // 'multi-line-string', "multi-line-string"
    -      shortcutStylePatterns.push(
    -          [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
    -           null, '\'"`']);
    -    } else {
    -      // 'single-line-string', "single-line-string"
    -      shortcutStylePatterns.push(
    -          [PR_STRING,
    -           /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
    -           null, '"\'']);
    -    }
    -    if (options['verbatimStrings']) {
    -      // verbatim-string-literal production from the C# grammar.  See issue 93.
    -      fallthroughStylePatterns.push(
    -          [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
    -    }
    -    if (options['hashComments']) {
    -      if (options['cStyleComments']) {
    -        // Stop C preprocessor declarations at an unclosed open comment
    -        shortcutStylePatterns.push(
    -            [PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
    -             null, '#']);
    -        fallthroughStylePatterns.push(
    -            [PR_STRING,
    -             /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
    -             null]);
    -      } else {
    -        shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
    -      }
    -    }
    -    if (options['cStyleComments']) {
    -      fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
    -      fallthroughStylePatterns.push(
    -          [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
    -    }
    -    if (options['regexLiterals']) {
    -      var REGEX_LITERAL = (
    -          // A regular expression literal starts with a slash that is
    -          // not followed by * or / so that it is not confused with
    -          // comments.
    -          '/(?=[^/*])'
    -          // and then contains any number of raw characters,
    -          + '(?:[^/\\x5B\\x5C]'
    -          // escape sequences (\x5C),
    -          +    '|\\x5C[\\s\\S]'
    -          // or non-nesting character sets (\x5B\x5D);
    -          +    '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
    -          // finally closed by a /.
    -          + '/');
    -      fallthroughStylePatterns.push(
    -          ['lang-regex',
    -           new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
    -           ]);
    -    }
    -
    -    var keywords = options['keywords'].replace(/^\s+|\s+$/g, '');
    -    if (keywords.length) {
    -      fallthroughStylePatterns.push(
    -          [PR_KEYWORD,
    -           new RegExp('^(?:' + keywords.replace(/\s+/g, '|') + ')\\b'), null]);
    -    }
    -
    -    shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
    -    fallthroughStylePatterns.push(
    -        // TODO(mikesamuel): recognize non-latin letters and numerals in idents
    -        [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
    -        [PR_TYPE,        /^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, null],
    -        [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
    -        [PR_LITERAL,
    -         new RegExp(
    -             '^(?:'
    -             // A hex number
    -             + '0x[a-f0-9]+'
    -             // or an octal or decimal number,
    -             + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
    -             // possibly in scientific notation
    -             + '(?:e[+\\-]?\\d+)?'
    -             + ')'
    -             // with an optional modifier like UL for unsigned long
    -             + '[a-z]*', 'i'),
    -         null, '0123456789'],
    -        [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#]*/, null]);
    -
    -    return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
    -  }
    -
    -  var decorateSource = sourceDecorator({
    -        'keywords': ALL_KEYWORDS,
    -        'hashComments': true,
    -        'cStyleComments': true,
    -        'multiLineStrings': true,
    -        'regexLiterals': true
    -      });
    -
    -  /** Breaks {@code job.source} around style boundaries in
    -    * {@code job.decorations} while re-interleaving {@code job.extractedTags},
    -    * and leaves the result in {@code job.prettyPrintedHtml}.
    -    * @param {Object} job like {
    -    *    source: {string} source as plain text,
    -    *    extractedTags: {Array.<number|string>} extractedTags chunks of raw
    -    *                   html preceded by their position in {@code job.source}
    -    *                   in order
    -    *    decorations: {Array.<number|string} an array of style classes preceded
    -    *                 by the position at which they start in job.source in order
    -    * }
    -    * @private
    -    */
    -  function recombineTagsAndDecorations(job) {
    -    var sourceText = job.source;
    -    var extractedTags = job.extractedTags;
    -    var decorations = job.decorations;
    -
    -    var html = [];
    -    // index past the last char in sourceText written to html
    -    var outputIdx = 0;
    -
    -    var openDecoration = null;
    -    var currentDecoration = null;
    -    var tagPos = 0;  // index into extractedTags
    -    var decPos = 0;  // index into decorations
    -    var tabExpander = makeTabExpander(window['PR_TAB_WIDTH']);
    -
    -    var adjacentSpaceRe = /([\r\n ]) /g;
    -    var startOrSpaceRe = /(^| ) /gm;
    -    var newlineRe = /\r\n?|\n/g;
    -    var trailingSpaceRe = /[ \r\n]$/;
    -    var lastWasSpace = true;  // the last text chunk emitted ended with a space.
    -
    -    // A helper function that is responsible for opening sections of decoration
    -    // and outputing properly escaped chunks of source
    -    function emitTextUpTo(sourceIdx) {
    -      if (sourceIdx > outputIdx) {
    -        if (openDecoration && openDecoration !== currentDecoration) {
    -          // Close the current decoration
    -          html.push('</span>');
    -          openDecoration = null;
    -        }
    -        if (!openDecoration && currentDecoration) {
    -          openDecoration = currentDecoration;
    -          html.push('<span class="', openDecoration, '">');
    -        }
    -        // This interacts badly with some wikis which introduces paragraph tags
    -        // into pre blocks for some strange reason.
    -        // It's necessary for IE though which seems to lose the preformattedness
    -        // of <pre> tags when their innerHTML is assigned.
    -        // http://stud3.tuwien.ac.at/~e0226430/innerHtmlQuirk.html
    -        // and it serves to undo the conversion of <br>s to newlines done in
    -        // chunkify.
    -        var htmlChunk = textToHtml(
    -            tabExpander(sourceText.substring(outputIdx, sourceIdx)))
    -            .replace(lastWasSpace
    -                     ? startOrSpaceRe
    -                     : adjacentSpaceRe, '$1&nbsp;');
    -        // Keep track of whether we need to escape space at the beginning of the
    -        // next chunk.
    -        lastWasSpace = trailingSpaceRe.test(htmlChunk);
    -        // IE collapses multiple adjacient <br>s into 1 line break.
    -        // Prefix every <br> with '&nbsp;' can prevent such IE's behavior.
    -        var lineBreakHtml = window['_pr_isIE6']() ? '&nbsp;<br />' : '<br />';
    -        html.push(htmlChunk.replace(newlineRe, lineBreakHtml));
    -        outputIdx = sourceIdx;
    -      }
    -    }
    -
    -    while (true) {
    -      // Determine if we're going to consume a tag this time around.  Otherwise
    -      // we consume a decoration or exit.
    -      var outputTag;
    -      if (tagPos < extractedTags.length) {
    -        if (decPos < decorations.length) {
    -          // Pick one giving preference to extractedTags since we shouldn't open
    -          // a new style that we're going to have to immediately close in order
    -          // to output a tag.
    -          outputTag = extractedTags[tagPos] <= decorations[decPos];
    -        } else {
    -          outputTag = true;
    -        }
    -      } else {
    -        outputTag = false;
    -      }
    -      // Consume either a decoration or a tag or exit.
    -      if (outputTag) {
    -        emitTextUpTo(extractedTags[tagPos]);
    -        if (openDecoration) {
    -          // Close the current decoration
    -          html.push('</span>');
    -          openDecoration = null;
    -        }
    -        html.push(extractedTags[tagPos + 1]);
    -        tagPos += 2;
    -      } else if (decPos < decorations.length) {
    -        emitTextUpTo(decorations[decPos]);
    -        currentDecoration = decorations[decPos + 1];
    -        decPos += 2;
    -      } else {
    -        break;
    -      }
    -    }
    -    emitTextUpTo(sourceText.length);
    -    if (openDecoration) {
    -      html.push('</span>');
    -    }
    -    job.prettyPrintedHtml = html.join('');
    -  }
    -
    -  /** Maps language-specific file extensions to handlers. */
    -  var langHandlerRegistry = {};
    -  /** Register a language handler for the given file extensions.
    -    * @param {function (Object)} handler a function from source code to a list
    -    *      of decorations.  Takes a single argument job which describes the
    -    *      state of the computation.   The single parameter has the form
    -    *      {@code {
    -    *        source: {string} as plain text.
    -    *        decorations: {Array.<number|string>} an array of style classes
    -    *                     preceded by the position at which they start in
    -    *                     job.source in order.
    -    *                     The language handler should assigned this field.
    -    *        basePos: {int} the position of source in the larger source chunk.
    -    *                 All positions in the output decorations array are relative
    -    *                 to the larger source chunk.
    -    *      } }
    -    * @param {Array.<string>} fileExtensions
    -    */
    -  function registerLangHandler(handler, fileExtensions) {
    -    for (var i = fileExtensions.length; --i >= 0;) {
    -      var ext = fileExtensions[i];
    -      if (!langHandlerRegistry.hasOwnProperty(ext)) {
    -        langHandlerRegistry[ext] = handler;
    -      } else if ('console' in window) {
    -        console.warn('cannot override language handler %s', ext);
    -      }
    -    }
    -  }
    -  function langHandlerForExtension(extension, source) {
    -    if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
    -      // Treat it as markup if the first non whitespace character is a < and
    -      // the last non-whitespace character is a >.
    -      extension = /^\s*</.test(source)
    -          ? 'default-markup'
    -          : 'default-code';
    -    }
    -    return langHandlerRegistry[extension];
    -  }
    -  registerLangHandler(decorateSource, ['default-code']);
    -  registerLangHandler(
    -      createSimpleLexer(
    -          [],
    -          [
    -           [PR_PLAIN,       /^[^<?]+/],
    -           [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
    -           [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
    -           // Unescaped content in an unknown language
    -           ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
    -           ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
    -           [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
    -           ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
    -           // Unescaped content in javascript.  (Or possibly vbscript).
    -           ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
    -           // Contains unescaped stylesheet content
    -           ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
    -           ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
    -          ]),
    -      ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
    -  registerLangHandler(
    -      createSimpleLexer(
    -          [
    -           [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
    -           [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
    -           ],
    -          [
    -           [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
    -           [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
    -           ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
    -           [PR_PUNCTUATION,  /^[=<>\/]+/],
    -           ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
    -           ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
    -           ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
    -           ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
    -           ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
    -           ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
    -           ]),
    -      ['in.tag']);
    -  registerLangHandler(
    -      createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': CPP_KEYWORDS,
    -          'hashComments': true,
    -          'cStyleComments': true
    -        }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': 'null true false'
    -        }), ['json']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': CSHARP_KEYWORDS,
    -          'hashComments': true,
    -          'cStyleComments': true,
    -          'verbatimStrings': true
    -        }), ['cs']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': JAVA_KEYWORDS,
    -          'cStyleComments': true
    -        }), ['java']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': SH_KEYWORDS,
    -          'hashComments': true,
    -          'multiLineStrings': true
    -        }), ['bsh', 'csh', 'sh']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': PYTHON_KEYWORDS,
    -          'hashComments': true,
    -          'multiLineStrings': true,
    -          'tripleQuotedStrings': true
    -        }), ['cv', 'py']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': PERL_KEYWORDS,
    -          'hashComments': true,
    -          'multiLineStrings': true,
    -          'regexLiterals': true
    -        }), ['perl', 'pl', 'pm']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': RUBY_KEYWORDS,
    -          'hashComments': true,
    -          'multiLineStrings': true,
    -          'regexLiterals': true
    -        }), ['rb']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': JSCRIPT_KEYWORDS,
    -          'cStyleComments': true,
    -          'regexLiterals': true
    -        }), ['js']);
    -  registerLangHandler(
    -      createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
    -
    -  function applyDecorator(job) {
    -    var sourceCodeHtml = job.sourceCodeHtml;
    -    var opt_langExtension = job.langExtension;
    -
    -    // Prepopulate output in case processing fails with an exception.
    -    job.prettyPrintedHtml = sourceCodeHtml;
    -
    -    try {
    -      // Extract tags, and convert the source code to plain text.
    -      var sourceAndExtractedTags = extractTags(sourceCodeHtml);
    -      /** Plain text. @type {string} */
    -      var source = sourceAndExtractedTags.source;
    -      job.source = source;
    -      job.basePos = 0;
    -
    -      /** Even entries are positions in source in ascending order.  Odd entries
    -        * are tags that were extracted at that position.
    -        * @type {Array.<number|string>}
    -        */
    -      job.extractedTags = sourceAndExtractedTags.tags;
    -
    -      // Apply the appropriate language handler
    -      langHandlerForExtension(opt_langExtension, source)(job);
    -      // Integrate the decorations and tags back into the source code to produce
    -      // a decorated html string which is left in job.prettyPrintedHtml.
    -      recombineTagsAndDecorations(job);
    -    } catch (e) {
    -      if ('console' in window) {
    -        console.log(e);
    -        console.trace();
    -      }
    -    }
    -  }
    -
    -  function prettyPrintOne(sourceCodeHtml, opt_langExtension) {
    -    var job = {
    -      sourceCodeHtml: sourceCodeHtml,
    -      langExtension: opt_langExtension
    -    };
    -    applyDecorator(job);
    -    return job.prettyPrintedHtml;
    -  }
    -
    -  function prettyPrint(opt_whenDone) {
    -    var isIE678 = window['_pr_isIE6']();
    -    var ieNewline = isIE678 === 6 ? '\r\n' : '\r';
    -    // See bug 71 and http://stackoverflow.com/questions/136443/why-doesnt-ie7-
    -
    -    // fetch a list of nodes to rewrite
    -    var codeSegments = [
    -        document.getElementsByTagName('pre'),
    -        document.getElementsByTagName('code'),
    -        document.getElementsByTagName('td'),  /* ND Change: Add tables to support prototypes. */
    -        document.getElementsByTagName('xmp') ];
    -    var elements = [];
    -    for (var i = 0; i < codeSegments.length; ++i) {
    -      for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
    -        elements.push(codeSegments[i][j]);
    -      }
    -    }
    -    codeSegments = null;
    -
    -    var clock = Date;
    -    if (!clock['now']) {
    -      clock = { 'now': function () { return (new Date).getTime(); } };
    -    }
    -
    -    // The loop is broken into a series of continuations to make sure that we
    -    // don't make the browser unresponsive when rewriting a large page.
    -    var k = 0;
    -    var prettyPrintingJob;
    -
    -    function doWork() {
    -      var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ?
    -                     clock.now() + 250 /* ms */ :
    -                     Infinity);
    -      for (; k < elements.length && clock.now() < endTime; k++) {
    -        var cs = elements[k];
    -        if (cs.className && cs.className.indexOf('prettyprint') >= 0) {
    -          // If the classes includes a language extensions, use it.
    -          // Language extensions can be specified like
    -          //     <pre class="prettyprint lang-cpp">
    -          // the language extension "cpp" is used to find a language handler as
    -          // passed to PR_registerLangHandler.
    -          var langExtension = cs.className.match(/\blang-(\w+)\b/);
    -          if (langExtension) { langExtension = langExtension[1]; }
    -
    -          // make sure this is not nested in an already prettified element
    -          var nested = false;
    -          for (var p = cs.parentNode; p; p = p.parentNode) {
    -            if ((p.tagName === 'pre' || p.tagName === 'code' ||
    -                 p.tagName === 'xmp' || p.tagName === 'td') &&  /* ND Change: Add tables to support prototypes */
    -                p.className && p.className.indexOf('prettyprint') >= 0) {
    -              nested = true;
    -              break;
    -            }
    -          }
    -          if (!nested) {
    -            // fetch the content as a snippet of properly escaped HTML.
    -            // Firefox adds newlines at the end.
    -            var content = getInnerHtml(cs);
    -            content = content.replace(/(?:\r\n?|\n)$/, '');
    -
    -	  		/* ND Change: we need to preserve &nbsp;s so change them to a special character instead of a space. */
    -			content = content.replace(/&nbsp;/g, '\x11');
    -
    -            // do the pretty printing
    -            prettyPrintingJob = {
    -              sourceCodeHtml: content,
    -              langExtension: langExtension,
    -              sourceNode: cs
    -            };
    -            applyDecorator(prettyPrintingJob);
    -            replaceWithPrettyPrintedHtml();
    -          }
    -        }
    -      }
    -      if (k < elements.length) {
    -        // finish up in a continuation
    -        setTimeout(doWork, 250);
    -      } else if (opt_whenDone) {
    -        opt_whenDone();
    -      }
    -    }
    -
    -    function replaceWithPrettyPrintedHtml() {
    -      var newContent = prettyPrintingJob.prettyPrintedHtml;
    -      if (!newContent) { return; }
    -
    -      /* ND Change: Restore the preserved &nbsp;s.  */
    -	  newContent = newContent.replace(/\x11/g, '&nbsp;');
    -
    -      var cs = prettyPrintingJob.sourceNode;
    -
    -      // push the prettified html back into the tag.
    -      if (!isRawContent(cs)) {
    -        // just replace the old html with the new
    -        cs.innerHTML = newContent;
    -      } else {
    -        // we need to change the tag to a <pre> since <xmp>s do not allow
    -        // embedded tags such as the span tags used to attach styles to
    -        // sections of source code.
    -        var pre = document.createElement('PRE');
    -        for (var i = 0; i < cs.attributes.length; ++i) {
    -          var a = cs.attributes[i];
    -          if (a.specified) {
    -            var aname = a.name.toLowerCase();
    -            if (aname === 'class') {
    -              pre.className = a.value;  // For IE 6
    -            } else {
    -              pre.setAttribute(a.name, a.value);
    -            }
    -          }
    -        }
    -        pre.innerHTML = newContent;
    -
    -        // remove the old
    -        cs.parentNode.replaceChild(pre, cs);
    -        cs = pre;
    -      }
    -
    -      // Replace <br>s with line-feeds so that copying and pasting works
    -      // on IE 6.
    -      // Doing this on other browsers breaks lots of stuff since \r\n is
    -      // treated as two newlines on Firefox, and doing this also slows
    -      // down rendering.
    -      if (isIE678 && cs.tagName === 'PRE') {
    -        var lineBreaks = cs.getElementsByTagName('br');
    -        for (var j = lineBreaks.length; --j >= 0;) {
    -          var lineBreak = lineBreaks[j];
    -          lineBreak.parentNode.replaceChild(
    -              document.createTextNode(ieNewline), lineBreak);
    -        }
    -      }
    -    }
    -
    -    doWork();
    -  }
    -
    -  window['PR_normalizedHtml'] = normalizedHtml;
    -  window['prettyPrintOne'] = prettyPrintOne;
    -  window['prettyPrint'] = prettyPrint;
    -  window['PR'] = {
    -        'combinePrefixPatterns': combinePrefixPatterns,
    -        'createSimpleLexer': createSimpleLexer,
    -        'registerLangHandler': registerLangHandler,
    -        'sourceDecorator': sourceDecorator,
    -        'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
    -        'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
    -        'PR_COMMENT': PR_COMMENT,
    -        'PR_DECLARATION': PR_DECLARATION,
    -        'PR_KEYWORD': PR_KEYWORD,
    -        'PR_LITERAL': PR_LITERAL,
    -        'PR_NOCODE': PR_NOCODE,
    -        'PR_PLAIN': PR_PLAIN,
    -        'PR_PUNCTUATION': PR_PUNCTUATION,
    -        'PR_SOURCE': PR_SOURCE,
    -        'PR_STRING': PR_STRING,
    -        'PR_TAG': PR_TAG,
    -        'PR_TYPE': PR_TYPE
    -      };
    -})();
    -
    -
    -// ____________________________________________________________________________
    -
    -
    -
    -// Lua extension
    -
    -PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[\t\n\r \xA0]+/,null,'	\n\r \xa0'],[PR.PR_STRING,/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,'\"\'']],[[PR.PR_COMMENT,/^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],[PR.PR_STRING,/^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],[PR.PR_KEYWORD,/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],[PR.PR_LITERAL,/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],[PR.PR_PLAIN,/^[a-z_]\w*/i],[PR.PR_PUNCTUATION,/^[^\w\t\n\r \xA0][^\w\t\n\r \xA0\"\'\-\+=]*/]]),['lua'])
    -
    -
    -// Haskell extension
    -
    -PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[\t\n\x0B\x0C\r ]+/,null,'	\n\r '],[PR.PR_STRING,/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'\"'],[PR.PR_STRING,/^\'(?:[^\'\\\n\x0C\r]|\\[^&])\'?/,null,'\''],[PR.PR_LITERAL,/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,'0123456789']],[[PR.PR_COMMENT,/^(?:(?:--+(?:[^\r\n\x0C]*)?)|(?:\{-(?:[^-]|-+[^-\}])*-\}))/],[PR.PR_KEYWORD,/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^a-zA-Z0-9\']|$)/,null],[PR.PR_PLAIN,/^(?:[A-Z][\w\']*\.)*[a-zA-Z][\w\']*/],[PR.PR_PUNCTUATION,/^[^\t\n\x0B\x0C\r a-zA-Z0-9\'\"]+/]]),['hs'])
    -
    -
    -// ML extension
    -
    -PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[\t\n\r \xA0]+/,null,'	\n\r \xa0'],[PR.PR_COMMENT,/^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,null,'#'],[PR.PR_STRING,/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,'\"\'']],[[PR.PR_COMMENT,/^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],[PR.PR_KEYWORD,/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],[PR.PR_LITERAL,/^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],[PR.PR_PLAIN,/^(?:[a-z_]\w*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],[PR.PR_PUNCTUATION,/^[^\t\n\r \xA0\"\'\w]+/]]),['fs','ml'])
    -
    -
    -// SQL extension
    -
    -PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[\t\n\r \xA0]+/,null,'	\n\r \xa0'],[PR.PR_STRING,/^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/,null,'\"\'']],[[PR.PR_COMMENT,/^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],[PR.PR_KEYWORD,/^(?:ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\w-]|$)/i,null],[PR.PR_LITERAL,/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],[PR.PR_PLAIN,/^[a-z_][\w-]*/i],[PR.PR_PUNCTUATION,/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]]),['sql'])
    -
    -
    -// VB extension
    -
    -PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[\t\n\r \xA0\u2028\u2029]+/,null,'	\n\r \xa0\u2028\u2029'],[PR.PR_STRING,/^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i,null,'\"\u201c\u201d'],[PR.PR_COMMENT,/^[\'\u2018\u2019][^\r\n\u2028\u2029]*/,null,'\'\u2018\u2019']],[[PR.PR_KEYWORD,/^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i,null],[PR.PR_COMMENT,/^REM[^\r\n\u2028\u2029]*/i],[PR.PR_LITERAL,/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],[PR.PR_PLAIN,/^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*\])/i],[PR.PR_PUNCTUATION,/^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],[PR.PR_PUNCTUATION,/^(?:\[|\])/]]),['vb','vbs'])
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/javascript/searchdata.js b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/javascript/searchdata.js
    deleted file mode 100644
    index a57e862535c..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/javascript/searchdata.js
    +++ /dev/null
    @@ -1,152 +0,0 @@
    -var indexSectionsWithContent = {
    -   "General": {
    -      "Symbols": false,
    -      "Numbers": true,
    -      "A": true,
    -      "B": false,
    -      "C": true,
    -      "D": false,
    -      "E": false,
    -      "F": true,
    -      "G": true,
    -      "H": false,
    -      "I": false,
    -      "J": false,
    -      "K": false,
    -      "L": true,
    -      "M": true,
    -      "N": false,
    -      "O": false,
    -      "P": false,
    -      "Q": false,
    -      "R": false,
    -      "S": false,
    -      "T": true,
    -      "U": false,
    -      "V": false,
    -      "W": false,
    -      "X": false,
    -      "Y": false,
    -      "Z": false
    -      },
    -   "Constants": {
    -      "Symbols": false,
    -      "Numbers": false,
    -      "A": false,
    -      "B": false,
    -      "C": false,
    -      "D": false,
    -      "E": false,
    -      "F": false,
    -      "G": true,
    -      "H": false,
    -      "I": false,
    -      "J": false,
    -      "K": false,
    -      "L": false,
    -      "M": false,
    -      "N": false,
    -      "O": false,
    -      "P": false,
    -      "Q": false,
    -      "R": false,
    -      "S": false,
    -      "T": false,
    -      "U": false,
    -      "V": false,
    -      "W": false,
    -      "X": false,
    -      "Y": false,
    -      "Z": false
    -      },
    -   "Files": {
    -      "Symbols": false,
    -      "Numbers": false,
    -      "A": false,
    -      "B": false,
    -      "C": false,
    -      "D": false,
    -      "E": false,
    -      "F": false,
    -      "G": true,
    -      "H": false,
    -      "I": false,
    -      "J": false,
    -      "K": false,
    -      "L": false,
    -      "M": false,
    -      "N": false,
    -      "O": false,
    -      "P": false,
    -      "Q": false,
    -      "R": false,
    -      "S": false,
    -      "T": false,
    -      "U": false,
    -      "V": false,
    -      "W": false,
    -      "X": false,
    -      "Y": false,
    -      "Z": false
    -      },
    -   "Types": {
    -      "Symbols": false,
    -      "Numbers": false,
    -      "A": false,
    -      "B": false,
    -      "C": false,
    -      "D": false,
    -      "E": false,
    -      "F": false,
    -      "G": true,
    -      "H": false,
    -      "I": false,
    -      "J": false,
    -      "K": false,
    -      "L": false,
    -      "M": false,
    -      "N": false,
    -      "O": false,
    -      "P": false,
    -      "Q": false,
    -      "R": false,
    -      "S": false,
    -      "T": false,
    -      "U": false,
    -      "V": false,
    -      "W": false,
    -      "X": false,
    -      "Y": false,
    -      "Z": false
    -      },
    -   "Functions": {
    -      "Symbols": false,
    -      "Numbers": false,
    -      "A": false,
    -      "B": false,
    -      "C": false,
    -      "D": false,
    -      "E": false,
    -      "F": false,
    -      "G": true,
    -      "H": false,
    -      "I": false,
    -      "J": false,
    -      "K": false,
    -      "L": false,
    -      "M": false,
    -      "N": false,
    -      "O": false,
    -      "P": false,
    -      "Q": false,
    -      "R": false,
    -      "S": false,
    -      "T": false,
    -      "U": false,
    -      "V": false,
    -      "W": false,
    -      "X": false,
    -      "Y": false,
    -      "Z": false
    -      }
    -   }
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/ConstantsG.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/ConstantsG.html
    deleted file mode 100644
    index f0e774996b9..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/ConstantsG.html
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    -
    -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="PopupSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
    -if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
    -
    -<!--  Generated by Natural Docs, version 1.51 -->
    -<!--  http://www.naturaldocs.org  -->
    -
    -<!-- saved from url=(0026)http://www.naturaldocs.org -->
    -
    -
    -
    -
    -<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_GD_undBELL><div class=IEntry><a href="../files/gd-h.html#GD_BELL" target=_parent class=ISymbol>GD_BELL</a></div></div><div class=SRResult id=SR_GD_undBESSEL><div class=IEntry><a href="../files/gd-h.html#GD_BESSEL" target=_parent class=ISymbol>GD_BESSEL</a></div></div><div class=SRResult id=SR_GD_undBICUBIC><div class=IEntry><a href="../files/gd-h.html#GD_BICUBIC" target=_parent class=ISymbol>GD_BICUBIC</a></div></div><div class=SRResult id=SR_GD_undBICUBIC_undFIXED><div class=IEntry><a href="../files/gd-h.html#GD_BICUBIC_FIXED" target=_parent class=ISymbol>GD_BICUBIC_FIXED</a></div></div><div class=SRResult id=SR_GD_undBILINEAR_undFIXED><div class=IEntry><a href="../files/gd-h.html#GD_BILINEAR_FIXED" target=_parent class=ISymbol>GD_BILINEAR_FIXED</a></div></div><div class=SRResult id=SR_GD_undBLACKMAN><div class=IEntry><a href="../files/gd-h.html#GD_BLACKMAN" target=_parent class=ISymbol>GD_BLACKMAN</a></div></div><div class=SRResult id=SR_GD_undBOX><div class=IEntry><a href="../files/gd-h.html#GD_BOX" target=_parent class=ISymbol>GD_BOX</a></div></div><div class=SRResult id=SR_GD_undBSPLINE><div class=IEntry><a href="../files/gd-h.html#GD_BSPLINE" target=_parent class=ISymbol>GD_BSPLINE</a></div></div><div class=SRResult id=SR_GD_undCATMULLROM><div class=IEntry><a href="../files/gd-h.html#GD_CATMULLROM" target=_parent class=ISymbol>GD_CATMULLROM</a></div></div><div class=SRResult id=SR_GD_undCROP_undBLACK><div class=IEntry><a href="../files/gd-h.html#GD_CROP_BLACK" target=_parent class=ISymbol>GD_CROP_BLACK</a></div></div><div class=SRResult id=SR_GD_undCROP_undDEFAULT><div class=IEntry><a href="../files/gd-h.html#GD_CROP_DEFAULT" target=_parent class=ISymbol>GD_CROP_DEFAULT</a></div></div><div class=SRResult id=SR_GD_undCROP_undSIDES><div class=IEntry><a href="../files/gd-h.html#GD_CROP_SIDES" target=_parent class=ISymbol>GD_CROP_SIDES</a></div></div><div class=SRResult id=SR_GD_undCROP_undTRANSPARENT><div class=IEntry><a href="../files/gd-h.html#GD_CROP_TRANSPARENT" target=_parent class=ISymbol>GD_CROP_TRANSPARENT</a></div></div><div class=SRResult id=SR_GD_undCROP_undWHITE><div class=IEntry><a href="../files/gd-h.html#GD_CROP_WHITE" target=_parent class=ISymbol>GD_CROP_WHITE</a></div></div><div class=SRResult id=SR_GD_undGAUSSIAN><div class=IEntry><a href="../files/gd-h.html#GD_GAUSSIAN" target=_parent class=ISymbol>GD_GAUSSIAN</a></div></div><div class=SRResult id=SR_GD_undGENERALIZED_undCUBIC><div class=IEntry><a href="../files/gd-h.html#GD_GENERALIZED_CUBIC" target=_parent class=ISymbol>GD_GENERALIZED_CUBIC</a></div></div><div class=SRResult id=SR_GD_undHAMMING><div class=IEntry><a href="../files/gd-h.html#GD_HAMMING" target=_parent class=ISymbol>GD_HAMMING</a></div></div><div class=SRResult id=SR_GD_undHANNING><div class=IEntry><a href="../files/gd-h.html#GD_HANNING" target=_parent class=ISymbol>GD_HANNING</a></div></div><div class=SRResult id=SR_GD_undHERMITE><div class=IEntry><a href="../files/gd-h.html#GD_HERMITE" target=_parent class=ISymbol>GD_HERMITE</a></div></div><div class=SRResult id=SR_GD_undLINEAR><div class=IEntry><a href="../files/gd-h.html#GD_LINEAR" target=_parent class=ISymbol>GD_LINEAR</a></div></div><div class=SRResult id=SR_GD_undMITCHELL><div class=IEntry><a href="../files/gd-h.html#GD_MITCHELL" target=_parent class=ISymbol>GD_MITCHELL</a></div></div><div class=SRResult id=SR_GD_undNEAREST_undNEIGHBOUR><div class=IEntry><a href="../files/gd-h.html#GD_NEAREST_NEIGHBOUR" target=_parent class=ISymbol>GD_NEAREST_NEIGHBOUR</a></div></div><div class=SRResult id=SR_GD_undPOWER><div class=IEntry><a href="../files/gd-h.html#GD_POWER" target=_parent class=ISymbol>GD_POWER</a></div></div><div class=SRResult id=SR_GD_undQUADRATIC><div class=IEntry><a href="../files/gd-h.html#GD_QUADRATIC" target=_parent class=ISymbol>GD_QUADRATIC</a></div></div><div class=SRResult id=SR_GD_undSINC><div class=IEntry><a href="../files/gd-h.html#GD_SINC" target=_parent class=ISymbol>GD_SINC</a></div></div><div class=SRResult id=SR_GD_undTRIANGLE><div class=IEntry><a href="../files/gd-h.html#GD_TRIANGLE" target=_parent class=ISymbol>GD_TRIANGLE</a></div></div><div class=SRResult id=SR_GD_undWEIGHTED4><div class=IEntry><a href="../files/gd-h.html#GD_WEIGHTED4" target=_parent class=ISymbol>GD_WEIGHTED4</a></div></div><div class=SRResult id=SR_gdCropMode><div class=IEntry><a href="../files/gd-h.html#gdCropMode" target=_parent class=ISymbol>gdCropMode</a></div></div><div class=SRResult id=SR_gdDisposalNone><div class=IEntry><a href="../files/gd-h.html#gdDisposalNone" target=_parent class=ISymbol>gdDisposalNone</a></div></div><div class=SRResult id=SR_gdDisposalRestoreBackground><div class=IEntry><a href="../files/gd-h.html#gdDisposalRestoreBackground" target=_parent class=ISymbol>gdDisposalRestoreBackground</a></div></div><div class=SRResult id=SR_gdDisposalRestorePrevious><div class=IEntry><a href="../files/gd-h.html#gdDisposalRestorePrevious" target=_parent class=ISymbol>gdDisposalRestorePrevious</a></div></div><div class=SRResult id=SR_gdDisposalUnknown><div class=IEntry><a href="../files/gd-h.html#gdDisposalUnknown" target=_parent class=ISymbol>gdDisposalUnknown</a></div></div><div class=SRResult id=SR_gdImageGifAnim><div class=IEntry><a href="../files/gd-h.html#gdImageGifAnim" target=_parent class=ISymbol>gdImageGifAnim</a></div></div><div class=SRResult id=SR_gdInterpolationMethod><div class=IEntry><a href="../files/gd-h.html#gdInterpolationMethod" target=_parent class=ISymbol>gdInterpolationMethod</a></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
    -document.getElementById("Loading").style.display="none";
    -document.getElementById("NoMatches").style.display="none";
    -var searchResults = new SearchResults("searchResults", "HTML");
    -searchResults.Search();
    ---></script></div><script language=JavaScript><!--
    -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/FilesG.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/FilesG.html
    deleted file mode 100644
    index 6aa0f18cb10..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/FilesG.html
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    -
    -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="PopupSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
    -if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
    -
    -<!--  Generated by Natural Docs, version 1.51 -->
    -<!--  http://www.naturaldocs.org  -->
    -
    -<!-- saved from url=(0026)http://www.naturaldocs.org -->
    -
    -
    -
    -
    -<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_gd_perc><div class=IEntry><a href="../files/gd-c.html#gd.c" target=_parent class=ISymbol>gd.c</a></div></div><div class=SRResult id=SR_gd_perh><div class=IEntry><a href="../files/gd-h.html#gd.h" target=_parent class=ISymbol>gd.h</a></div></div><div class=SRResult id=SR_gd_undbmp_perc><div class=IEntry><a href="../files/gd_bmp-c.html#gd_bmp.c" target=_parent class=ISymbol>gd_bmp.c</a></div></div><div class=SRResult id=SR_gd_undcrop_perc><div class=IEntry><a href="../files/gd_crop-c.html#gd_crop.c" target=_parent class=ISymbol>gd_crop.c</a></div></div><div class=SRResult id=SR_gd_undfilename_perc><div class=IEntry><a href="../files/gd_filename-c.html#gd_filename.c" target=_parent class=ISymbol>gd_filename.c</a></div></div><div class=SRResult id=SR_gd_undfilter_perc><div class=IEntry><a href="../files/gd_filter-c.html#gd_filter.c" target=_parent class=ISymbol>gd_filter.c</a></div></div><div class=SRResult id=SR_gd_undgd_perc><div class=IEntry><a href="../files/gd_gd-c.html#gd_gd.c" target=_parent class=ISymbol>gd_gd.c</a></div></div><div class=SRResult id=SR_gd_undgd2_perc><div class=IEntry><a href="../files/gd_gd2-c.html#gd_gd2.c" target=_parent class=ISymbol>gd_gd2.c</a></div></div><div class=SRResult id=SR_gd_undgif_undin_perc><div class=IEntry><a href="../files/gd_gif_in-c.html#gd_gif_in.c" target=_parent class=ISymbol>gd_gif_in.c</a></div></div><div class=SRResult id=SR_gd_undgif_undout_perc><div class=IEntry><a href="../files/gd_gif_out-c.html#gd_gif_out.c" target=_parent class=ISymbol>gd_gif_out.c</a></div></div><div class=SRResult id=SR_gd_undinterpolation_perc><div class=IEntry><a href="../files/gd_interpolation-c.html#gd_interpolation.c" target=_parent class=ISymbol>gd_interpolation.c</a></div></div><div class=SRResult id=SR_gd_undio_perh><div class=IEntry><a href="../files/gd_io-h.html#gd_io.h" target=_parent class=ISymbol>gd_io.h</a></div></div><div class=SRResult id=SR_gd_undio_unddp_perc><div class=IEntry><a href="../files/gd_io_dp-c.html#gd_io_dp.c" target=_parent class=ISymbol>gd_io_dp.c</a></div></div><div class=SRResult id=SR_gd_undjpeg_perc><div class=IEntry><a href="../files/gd_jpeg-c.html#gd_jpeg.c" target=_parent class=ISymbol>gd_jpeg.c</a></div></div><div class=SRResult id=SR_gd_undpng_perc><div class=IEntry><a href="../files/gd_png-c.html#gd_png.c" target=_parent class=ISymbol>gd_png.c</a></div></div><div class=SRResult id=SR_gd_undss_perc><div class=IEntry><a href="../files/gd_ss-c.html#gd_ss.c" target=_parent class=ISymbol>gd_ss.c</a></div></div><div class=SRResult id=SR_gd_undtga_perc><div class=IEntry><a href="../files/gd_tga-c.html#gd_tga.c" target=_parent class=ISymbol>gd_tga.c</a></div></div><div class=SRResult id=SR_gd_undtiff_perc><div class=IEntry><a href="../files/gd_tiff-c.html#gd_tiff.c" target=_parent class=ISymbol>gd_tiff.c</a></div></div><div class=SRResult id=SR_gd_undtopal_perc><div class=IEntry><a href="../files/gd_topal-c.html#gd_topal.c" target=_parent class=ISymbol>gd_topal.c</a></div></div><div class=SRResult id=SR_gd_undtransform_perc><div class=IEntry><a href="../files/gd_transform-c.html#gd_transform.c" target=_parent class=ISymbol>gd_transform.c</a></div></div><div class=SRResult id=SR_gd_undversion_perc><div class=IEntry><a href="../files/gd_version-c.html#gd_version.c" target=_parent class=ISymbol>gd_version.c</a></div></div><div class=SRResult id=SR_gd_undwbmp_perc><div class=IEntry><a href="../files/gd_wbmp-c.html#gd_wbmp.c" target=_parent class=ISymbol>gd_wbmp.c</a></div></div><div class=SRResult id=SR_gd_undwebp_perc><div class=IEntry><a href="../files/gd_webp-c.html#gd_webp.c" target=_parent class=ISymbol>gd_webp.c</a></div></div><div class=SRResult id=SR_gd_undxbm_perc><div class=IEntry><a href="../files/gd_xbm-c.html#gd_xbm.c" target=_parent class=ISymbol>gd_xbm.c</a></div></div><div class=SRResult id=SR_gdft_perc><div class=IEntry><a href="../files/gdft-c.html#gdft.c" target=_parent class=ISymbol>gdft.c</a></div></div><div class=SRResult id=SR_gdfx_perc><div class=IEntry><a href="../files/gdfx-c.html#gdfx.c" target=_parent class=ISymbol>gdfx.c</a></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
    -document.getElementById("Loading").style.display="none";
    -document.getElementById("NoMatches").style.display="none";
    -var searchResults = new SearchResults("searchResults", "HTML");
    -searchResults.Search();
    ---></script></div><script language=JavaScript><!--
    -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/FunctionsG.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/FunctionsG.html
    deleted file mode 100644
    index b6853e6e088..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/FunctionsG.html
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    -
    -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="PopupSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
    -if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
    -
    -<!--  Generated by Natural Docs, version 1.51 -->
    -<!--  http://www.naturaldocs.org  -->
    -
    -<!-- saved from url=(0026)http://www.naturaldocs.org -->
    -
    -
    -
    -
    -<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_gdAffineApplyToPointF><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineApplyToPointF" target=_parent class=ISymbol>gdAffineApplyToPointF</a></div></div><div class=SRResult id=SR_gdAffineConcat><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineConcat" target=_parent class=ISymbol>gdAffineConcat</a></div></div><div class=SRResult id=SR_gdAffineEqual><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineEqual" target=_parent class=ISymbol>gdAffineEqual</a></div></div><div class=SRResult id=SR_gdAffineFlip><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineFlip" target=_parent class=ISymbol>gdAffineFlip</a></div></div><div class=SRResult id=SR_gdAffineIdentity><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineIdentity" target=_parent class=ISymbol>gdAffineIdentity</a></div></div><div class=SRResult id=SR_gdAffineInvert><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineInvert" target=_parent class=ISymbol>gdAffineInvert</a></div></div><div class=SRResult id=SR_gdAffineRectilinear><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineRectilinear" target=_parent class=ISymbol>gdAffineRectilinear</a></div></div><div class=SRResult id=SR_gdAffineRotate><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineRotate" target=_parent class=ISymbol>gdAffineRotate</a></div></div><div class=SRResult id=SR_gdAffineScale><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineScale" target=_parent class=ISymbol>gdAffineScale</a></div></div><div class=SRResult id=SR_gdAffineShearHorizontal><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineShearHorizontal" target=_parent class=ISymbol>gdAffineShearHorizontal</a></div></div><div class=SRResult id=SR_gdAffineShearVertical><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineShearVertical" target=_parent class=ISymbol>gdAffineShearVertical</a></div></div><div class=SRResult id=SR_gdAffineTranslate><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineTranslate" target=_parent class=ISymbol>gdAffineTranslate</a></div></div><div class=SRResult id=SR_gdAlphaBlend><div class=IEntry><a href="../files/gd-c.html#gdAlphaBlend" target=_parent class=ISymbol>gdAlphaBlend</a></div></div><div class=SRResult id=SR_gdClearErrorMethod><div class=IEntry><a href="../files/gd-c.html#gdClearErrorMethod" target=_parent class=ISymbol>gdClearErrorMethod</a></div></div><div class=SRResult id=SR_gdColorMapLookup><div class=IEntry><a href="../files/gd_color_map-c.html#gdColorMapLookup" target=_parent class=ISymbol>gdColorMapLookup</a></div></div><div class=SRResult id=SR_gdDPExtractData><div class=IEntry><a href="../files/gd_io_dp-c.html#gdDPExtractData" target=_parent class=ISymbol>gdDPExtractData</a></div></div><div class=SRResult id=SR_gdExtraVersion><div class=IEntry><a href="../files/gd_version-c.html#gdExtraVersion" target=_parent class=ISymbol>gdExtraVersion</a></div></div><div class=SRResult id=SR_gdFontCacheSetup><div class=IEntry><a href="../files/gdft-c.html#gdFontCacheSetup" target=_parent class=ISymbol>gdFontCacheSetup</a></div></div><div class=SRResult id=SR_gdFontCacheShutdown><div class=IEntry><a href="../files/gdft-c.html#gdFontCacheShutdown" target=_parent class=ISymbol>gdFontCacheShutdown</a></div></div><div class=SRResult id=SR_gdFontGetGiant><div class=IEntry><a href="../files/gdfontg-c.html#gdFontGetGiant" target=_parent class=ISymbol>gdFontGetGiant</a></div></div><div class=SRResult id=SR_gdFontGetLarge><div class=IEntry><a href="../files/gdfontl-c.html#gdFontGetLarge" target=_parent class=ISymbol>gdFontGetLarge</a></div></div><div class=SRResult id=SR_gdFontGetMediumBold><div class=IEntry><a href="../files/gdfontmb-c.html#gdFontGetMediumBold" target=_parent class=ISymbol>gdFontGetMediumBold</a></div></div><div class=SRResult id=SR_gdFontGetSmall><div class=IEntry><a href="../files/gdfonts-c.html#gdFontGetSmall" target=_parent class=ISymbol>gdFontGetSmall</a></div></div><div class=SRResult id=SR_gdFontGetTiny><div class=IEntry><a href="../files/gdfontt-c.html#gdFontGetTiny" target=_parent class=ISymbol>gdFontGetTiny</a></div></div><div class=SRResult id=SR_gdFree><div class=IEntry><a href="../files/gdhelpers-c.html#gdFree" target=_parent class=ISymbol>gdFree</a></div></div><div class=SRResult id=SR_gdFreeFontCache><div class=IEntry><a href="../files/gdft-c.html#gdFreeFontCache" target=_parent class=ISymbol>gdFreeFontCache</a></div></div><div class=SRResult id=SR_gdFTUseFontConfig><div class=IEntry><a href="../files/gdft-c.html#gdFTUseFontConfig" target=_parent class=ISymbol>gdFTUseFontConfig</a></div></div><div class=SRResult id=SR_gdImageAABlend><div class=IEntry><a href="../files/gd-c.html#gdImageAABlend" target=_parent class=ISymbol>gdImageAABlend</a></div></div><div class=SRResult id=SR_gdImageAlphaBlending><div class=IEntry><a href="../files/gd-c.html#gdImageAlphaBlending" target=_parent class=ISymbol>gdImageAlphaBlending</a></div></div><div class=SRResult id=SR_gdImageArc><div class=IEntry><a href="../files/gd-c.html#gdImageArc" target=_parent class=ISymbol>gdImageArc</a></div></div><div class=SRResult id=SR_gdImageBmp><div class=IEntry><a href="../files/gd_bmp-c.html#gdImageBmp" target=_parent class=ISymbol>gdImageBmp</a></div></div><div class=SRResult id=SR_gdImageBmpCtx><div class=IEntry><a href="../files/gd_bmp-c.html#gdImageBmpCtx" target=_parent class=ISymbol>gdImageBmpCtx</a></div></div><div class=SRResult id=SR_gdImageBmpPtr><div class=IEntry><a href="../files/gd_bmp-c.html#gdImageBmpPtr" target=_parent class=ISymbol>gdImageBmpPtr</a></div></div><div class=SRResult id=SR_gdImageBoundsSafe><div class=IEntry><a href="../files/gd-c.html#gdImageBoundsSafe" target=_parent class=ISymbol>gdImageBoundsSafe</a></div></div><div class=SRResult id=SR_gdImageBrightness><div class=IEntry><a href="../files/gd_filter-c.html#gdImageBrightness" target=_parent class=ISymbol>gdImageBrightness</a></div></div><div class=SRResult id=SR_gdImageChar><div class=IEntry><a href="../files/gd-c.html#gdImageChar" target=_parent class=ISymbol>gdImageChar</a></div></div><div class=SRResult id=SR_gdImageCharUp><div class=IEntry><a href="../files/gd-c.html#gdImageCharUp" target=_parent class=ISymbol>gdImageCharUp</a></div></div><div class=SRResult id=SR_gdImageClone><div class=IEntry><a href="../files/gd-c.html#gdImageClone" target=_parent class=ISymbol>gdImageClone</a></div></div><div class=SRResult id=SR_gdImageColor><div class=IEntry><a href="../files/gd_filter-c.html#gdImageColor" target=_parent class=ISymbol>gdImageColor</a></div></div><div class=SRResult id=SR_gdImageColorAllocate><div class=IEntry><a href="../files/gd-c.html#gdImageColorAllocate" target=_parent class=ISymbol>gdImageColorAllocate</a></div></div><div class=SRResult id=SR_gdImageColorAllocateAlpha><div class=IEntry><a href="../files/gd-c.html#gdImageColorAllocateAlpha" target=_parent class=ISymbol>gdImageColorAllocateAlpha</a></div></div><div class=SRResult id=SR_gdImageColorClosest><div class=IEntry><a href="../files/gd-c.html#gdImageColorClosest" target=_parent class=ISymbol>gdImageColorClosest</a></div></div><div class=SRResult id=SR_gdImageColorClosestAlpha><div class=IEntry><a href="../files/gd-c.html#gdImageColorClosestAlpha" target=_parent class=ISymbol>gdImageColorClosestAlpha</a></div></div><div class=SRResult id=SR_gdImageColorClosestHWB><div class=IEntry><a href="../files/gd-c.html#gdImageColorClosestHWB" target=_parent class=ISymbol>gdImageColorClosestHWB</a></div></div><div class=SRResult id=SR_gdImageColorDeallocate><div class=IEntry><a href="../files/gd-c.html#gdImageColorDeallocate" target=_parent class=ISymbol>gdImageColorDeallocate</a></div></div><div class=SRResult id=SR_gdImageColorExact><div class=IEntry><a href="../files/gd-c.html#gdImageColorExact" target=_parent class=ISymbol>gdImageColorExact</a></div></div><div class=SRResult id=SR_gdImageColorExactAlpha><div class=IEntry><a href="../files/gd-c.html#gdImageColorExactAlpha" target=_parent class=ISymbol>gdImageColorExactAlpha</a></div></div><div class=SRResult id=SR_gdImageColorMatch><div class=IEntry><a href="../files/gd_color_match-c.html#gdImageColorMatch" target=_parent class=ISymbol>gdImageColorMatch</a></div></div><div class=SRResult id=SR_gdImageColorReplace><div class=IEntry><a href="../files/gd-c.html#gdImageColorReplace" target=_parent class=ISymbol>gdImageColorReplace</a></div></div><div class=SRResult id=SR_gdImageColorReplaceArray><div class=IEntry><a href="../files/gd-c.html#gdImageColorReplaceArray" target=_parent class=ISymbol>gdImageColorReplaceArray</a></div></div><div class=SRResult id=SR_gdImageColorReplaceCallback><div class=IEntry><a href="../files/gd-c.html#gdImageColorReplaceCallback" target=_parent class=ISymbol>gdImageColorReplaceCallback</a></div></div><div class=SRResult id=SR_gdImageColorReplaceThreshold><div class=IEntry><a href="../files/gd-c.html#gdImageColorReplaceThreshold" target=_parent class=ISymbol>gdImageColorReplaceThreshold</a></div></div><div class=SRResult id=SR_gdImageColorResolve><div class=IEntry><a href="../files/gd-c.html#gdImageColorResolve" target=_parent class=ISymbol>gdImageColorResolve</a></div></div><div class=SRResult id=SR_gdImageColorResolveAlpha><div class=IEntry><a href="../files/gd-c.html#gdImageColorResolveAlpha" target=_parent class=ISymbol>gdImageColorResolveAlpha</a></div></div><div class=SRResult id=SR_gdImageColorTransparent><div class=IEntry><a href="../files/gd-c.html#gdImageColorTransparent" target=_parent class=ISymbol>gdImageColorTransparent</a></div></div><div class=SRResult id=SR_gdImageCompare><div class=IEntry><a href="../files/gd-c.html#gdImageCompare" target=_parent class=ISymbol>gdImageCompare</a></div></div><div class=SRResult id=SR_gdImageContrast><div class=IEntry><a href="../files/gd_filter-c.html#gdImageContrast" target=_parent class=ISymbol>gdImageContrast</a></div></div><div class=SRResult id=SR_gdImageConvolution><div class=IEntry><a href="../files/gd_filter-c.html#gdImageConvolution" target=_parent class=ISymbol>gdImageConvolution</a></div></div><div class=SRResult id=SR_gdImageCopy><div class=IEntry><a href="../files/gd-c.html#gdImageCopy" target=_parent class=ISymbol>gdImageCopy</a></div></div><div class=SRResult id=SR_gdImageCopyGaussianBlurred><div class=IEntry><a href="../files/gd_filter-c.html#gdImageCopyGaussianBlurred" target=_parent class=ISymbol>gdImageCopyGaussianBlurred</a></div></div><div class=SRResult id=SR_gdImageCopyMerge><div class=IEntry><a href="../files/gd-c.html#gdImageCopyMerge" target=_parent class=ISymbol>gdImageCopyMerge</a></div></div><div class=SRResult id=SR_gdImageCopyMergeGray><div class=IEntry><a href="../files/gd-c.html#gdImageCopyMergeGray" target=_parent class=ISymbol>gdImageCopyMergeGray</a></div></div><div class=SRResult id=SR_gdImageCopyResampled><div class=IEntry><a href="../files/gd-c.html#gdImageCopyResampled" target=_parent class=ISymbol>gdImageCopyResampled</a></div></div><div class=SRResult id=SR_gdImageCopyResized><div class=IEntry><a href="../files/gd-c.html#gdImageCopyResized" target=_parent class=ISymbol>gdImageCopyResized</a></div></div><div class=SRResult id=SR_gdImageCopyRotated><div class=IEntry><a href="../files/gd-c.html#gdImageCopyRotated" target=_parent class=ISymbol>gdImageCopyRotated</a></div></div><div class=SRResult id=SR_gdImageCreate><div class=IEntry><a href="../files/gd-c.html#gdImageCreate" target=_parent class=ISymbol>gdImageCreate</a></div></div><div class=SRResult id=SR_gdImageCreateFromBmp><div class=IEntry><a href="../files/gd_bmp-c.html#gdImageCreateFromBmp" target=_parent class=ISymbol>gdImageCreateFromBmp</a></div></div><div class=SRResult id=SR_gdImageCreateFromBmpCtx><div class=IEntry><a href="../files/gd_bmp-c.html#gdImageCreateFromBmpCtx" target=_parent class=ISymbol>gdImageCreateFromBmpCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromBmpPtr><div class=IEntry><a href="../files/gd_bmp-c.html#gdImageCreateFromBmpPtr" target=_parent class=ISymbol>gdImageCreateFromBmpPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromFile><div class=IEntry><a href="../files/gd_filename-c.html#gdImageCreateFromFile" target=_parent class=ISymbol>gdImageCreateFromFile</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd><div class=IEntry><a href="../files/gd_gd-c.html#gdImageCreateFromGd" target=_parent class=ISymbol>gdImageCreateFromGd</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd2><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageCreateFromGd2" target=_parent class=ISymbol>gdImageCreateFromGd2</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd2Ctx><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageCreateFromGd2Ctx" target=_parent class=ISymbol>gdImageCreateFromGd2Ctx</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd2Part><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageCreateFromGd2Part" target=_parent class=ISymbol>gdImageCreateFromGd2Part</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd2PartCtx><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageCreateFromGd2PartCtx" target=_parent class=ISymbol>gdImageCreateFromGd2PartCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd2PartPtr><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageCreateFromGd2PartPtr" target=_parent class=ISymbol>gdImageCreateFromGd2PartPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd2Ptr><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageCreateFromGd2Ptr" target=_parent class=ISymbol>gdImageCreateFromGd2Ptr</a></div></div><div class=SRResult id=SR_gdImageCreateFromGdCtx><div class=IEntry><a href="../files/gd_gd-c.html#gdImageCreateFromGdCtx" target=_parent class=ISymbol>gdImageCreateFromGdCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromGdPtr><div class=IEntry><a href="../files/gd_gd-c.html#gdImageCreateFromGdPtr" target=_parent class=ISymbol>gdImageCreateFromGdPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromGif><div class=IEntry><a href="../files/gd_gif_in-c.html#gdImageCreateFromGif" target=_parent class=ISymbol>gdImageCreateFromGif</a></div></div><div class=SRResult id=SR_gdImageCreateFromGifCtx><div class=IEntry><a href="../files/gd_gif_in-c.html#gdImageCreateFromGifCtx" target=_parent class=ISymbol>gdImageCreateFromGifCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromGifPtr><div class=IEntry><a href="../files/gd_gif_in-c.html#gdImageCreateFromGifPtr" target=_parent class=ISymbol>gdImageCreateFromGifPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromJpeg><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageCreateFromJpeg" target=_parent class=ISymbol>gdImageCreateFromJpeg</a></div></div><div class=SRResult id=SR_gdImageCreateFromJpegCtx><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageCreateFromJpegCtx" target=_parent class=ISymbol>gdImageCreateFromJpegCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromJpegCtxEx><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageCreateFromJpegCtxEx" target=_parent class=ISymbol>gdImageCreateFromJpegCtxEx</a></div></div><div class=SRResult id=SR_gdImageCreateFromJpegEx><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageCreateFromJpegEx" target=_parent class=ISymbol>gdImageCreateFromJpegEx</a></div></div><div class=SRResult id=SR_gdImageCreateFromJpegPtr><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageCreateFromJpegPtr" target=_parent class=ISymbol>gdImageCreateFromJpegPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromJpegPtrEx><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageCreateFromJpegPtrEx" target=_parent class=ISymbol>gdImageCreateFromJpegPtrEx</a></div></div><div class=SRResult id=SR_gdImageCreateFromPng><div class=IEntry><a href="../files/gd_png-c.html#gdImageCreateFromPng" target=_parent class=ISymbol>gdImageCreateFromPng</a></div></div><div class=SRResult id=SR_gdImageCreateFromPngCtx><div class=IEntry><a href="../files/gd_png-c.html#gdImageCreateFromPngCtx" target=_parent class=ISymbol>gdImageCreateFromPngCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromPngPtr><div class=IEntry><a href="../files/gd_png-c.html#gdImageCreateFromPngPtr" target=_parent class=ISymbol>gdImageCreateFromPngPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromPngSource><div class=IEntry><a href="../files/gd_ss-c.html#gdImageCreateFromPngSource" target=_parent class=ISymbol>gdImageCreateFromPngSource</a></div></div><div class=SRResult id=SR_gdImageCreateFromTga><div class=IEntry><a href="../files/gd_tga-c.html#gdImageCreateFromTga" target=_parent class=ISymbol>gdImageCreateFromTga</a></div></div><div class=SRResult id=SR_gdImageCreateFromTgaCtx><div class=IEntry><a href="../files/gd_tga-c.html#gdImageCreateFromTgaCtx" target=_parent class=ISymbol>gdImageCreateFromTgaCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromTgaPtr><div class=IEntry><a href="../files/gd_tga-c.html#gdImageCreateFromTgaPtr" target=_parent class=ISymbol>gdImageCreateFromTgaPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromTIFF><div class=IEntry><a href="../files/gd_tiff-c.html#gdImageCreateFromTIFF" target=_parent class=ISymbol>gdImageCreateFromTIFF</a></div></div><div class=SRResult id=SR_gdImageCreateFromTiffCtx><div class=IEntry><a href="../files/gd_tiff-c.html#gdImageCreateFromTiffCtx" target=_parent class=ISymbol>gdImageCreateFromTiffCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromTiffPtr><div class=IEntry><a href="../files/gd_tiff-c.html#gdImageCreateFromTiffPtr" target=_parent class=ISymbol>gdImageCreateFromTiffPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromWBMP><div class=IEntry><a href="../files/gd_wbmp-c.html#gdImageCreateFromWBMP" target=_parent class=ISymbol>gdImageCreateFromWBMP</a></div></div><div class=SRResult id=SR_gdImageCreateFromWBMPCtx><div class=IEntry><a href="../files/gd_wbmp-c.html#gdImageCreateFromWBMPCtx" target=_parent class=ISymbol>gdImageCreateFromWBMPCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromWBMPPtr><div class=IEntry><a href="../files/gd_wbmp-c.html#gdImageCreateFromWBMPPtr" target=_parent class=ISymbol>gdImageCreateFromWBMPPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromXbm><div class=IEntry><a href="../files/gd_xbm-c.html#gdImageCreateFromXbm" target=_parent class=ISymbol>gdImageCreateFromXbm</a></div></div><div class=SRResult id=SR_gdImageCreateFromXpm><div class=IEntry><a href="../files/gdxpm-c.html#gdImageCreateFromXpm" target=_parent class=ISymbol>gdImageCreateFromXpm</a></div></div><div class=SRResult id=SR_gdImageCreatePaletteFromTrueColor><div class=IEntry><a href="../files/gd_topal-c.html#gdImageCreatePaletteFromTrueColor" target=_parent class=ISymbol>gdImageCreatePaletteFromTrueColor</a></div></div><div class=SRResult id=SR_gdImageCreateTrueColor><div class=IEntry><a href="../files/gd-c.html#gdImageCreateTrueColor" target=_parent class=ISymbol>gdImageCreateTrueColor</a></div></div><div class=SRResult id=SR_gdImageCrop><div class=IEntry><a href="../files/gd_crop-c.html#gdImageCrop" target=_parent class=ISymbol>gdImageCrop</a></div></div><div class=SRResult id=SR_gdImageCropAuto><div class=IEntry><a href="../files/gd_crop-c.html#gdImageCropAuto" target=_parent class=ISymbol>gdImageCropAuto</a></div></div><div class=SRResult id=SR_gdImageCropThreshold><div class=IEntry><a href="../files/gd_crop-c.html#gdImageCropThreshold" target=_parent class=ISymbol>gdImageCropThreshold</a></div></div><div class=SRResult id=SR_gdImageDashedLine><div class=IEntry><a href="../files/gd-c.html#gdImageDashedLine" target=_parent class=ISymbol>gdImageDashedLine</a></div></div><div class=SRResult id=SR_gdImageDestroy><div class=IEntry><a href="../files/gd-c.html#gdImageDestroy" target=_parent class=ISymbol>gdImageDestroy</a></div></div><div class=SRResult id=SR_gdImageEdgeDetectQuick><div class=IEntry><a href="../files/gd_filter-c.html#gdImageEdgeDetectQuick" target=_parent class=ISymbol>gdImageEdgeDetectQuick</a></div></div><div class=SRResult id=SR_gdImageEllipse><div class=IEntry><a href="../files/gd-c.html#gdImageEllipse" target=_parent class=ISymbol>gdImageEllipse</a></div></div><div class=SRResult id=SR_gdImageEmboss><div class=IEntry><a href="../files/gd_filter-c.html#gdImageEmboss" target=_parent class=ISymbol>gdImageEmboss</a></div></div><div class=SRResult id=SR_gdImageFile><div class=IEntry><a href="../files/gd_filename-c.html#gdImageFile" target=_parent class=ISymbol>gdImageFile</a></div></div><div class=SRResult id=SR_gdImageFill><div class=IEntry><a href="../files/gd-c.html#gdImageFill" target=_parent class=ISymbol>gdImageFill</a></div></div><div class=SRResult id=SR_gdImageFilledArc><div class=IEntry><a href="../files/gd-c.html#gdImageFilledArc" target=_parent class=ISymbol>gdImageFilledArc</a></div></div><div class=SRResult id=SR_gdImageFilledEllipse><div class=IEntry><a href="../files/gd-c.html#gdImageFilledEllipse" target=_parent class=ISymbol>gdImageFilledEllipse</a></div></div><div class=SRResult id=SR_gdImageFilledPolygon><div class=IEntry><a href="../files/gd-c.html#gdImageFilledPolygon" target=_parent class=ISymbol>gdImageFilledPolygon</a></div></div><div class=SRResult id=SR_gdImageFilledRectangle><div class=IEntry><a href="../files/gd-c.html#gdImageFilledRectangle" target=_parent class=ISymbol>gdImageFilledRectangle</a></div></div><div class=SRResult id=SR_gdImageFillToBorder><div class=IEntry><a href="../files/gd-c.html#gdImageFillToBorder" target=_parent class=ISymbol>gdImageFillToBorder</a></div></div><div class=SRResult id=SR_gdImageFlipBoth><div class=IEntry><a href="../files/gd_transform-c.html#gdImageFlipBoth" target=_parent class=ISymbol>gdImageFlipBoth</a></div></div><div class=SRResult id=SR_gdImageFlipHorizontal><div class=IEntry><a href="../files/gd_transform-c.html#gdImageFlipHorizontal" target=_parent class=ISymbol>gdImageFlipHorizontal</a></div></div><div class=SRResult id=SR_gdImageFlipVertical><div class=IEntry><a href="../files/gd_transform-c.html#gdImageFlipVertical" target=_parent class=ISymbol>gdImageFlipVertical</a></div></div><div class=SRResult id=SR_gdImageGaussianBlur><div class=IEntry><a href="../files/gd_filter-c.html#gdImageGaussianBlur" target=_parent class=ISymbol>gdImageGaussianBlur</a></div></div><div class=SRResult id=SR_gdImageGd><div class=IEntry><a href="../files/gd_gd-c.html#gdImageGd" target=_parent class=ISymbol>gdImageGd</a></div></div><div class=SRResult id=SR_gdImageGd2><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageGd2" target=_parent class=ISymbol>gdImageGd2</a></div></div><div class=SRResult id=SR_gdImageGd2Ptr><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageGd2Ptr" target=_parent class=ISymbol>gdImageGd2Ptr</a></div></div><div class=SRResult id=SR_gdImageGdPtr><div class=IEntry><a href="../files/gd_gd-c.html#gdImageGdPtr" target=_parent class=ISymbol>gdImageGdPtr</a></div></div><div class=SRResult id=SR_gdImageGetClip><div class=IEntry><a href="../files/gd-c.html#gdImageGetClip" target=_parent class=ISymbol>gdImageGetClip</a></div></div><div class=SRResult id=SR_gdImageGetInterpolationMethod><div class=IEntry><a href="../files/gd_interpolation-c.html#gdImageGetInterpolationMethod" target=_parent class=ISymbol>gdImageGetInterpolationMethod</a></div></div><div class=SRResult id=SR_gdImageGetPixel><div class=IEntry><a href="../files/gd-c.html#gdImageGetPixel" target=_parent class=ISymbol>gdImageGetPixel</a></div></div><div class=SRResult id=SR_gdImageGetTrueColorPixel><div class=IEntry><a href="../files/gd-c.html#gdImageGetTrueColorPixel" target=_parent class=ISymbol>gdImageGetTrueColorPixel</a></div></div><div class=SRResult id=SR_gdImageGif><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGif" target=_parent class=ISymbol>gdImageGif</a></div></div><div class=SRResult id=SR_gdImageGifAnimAdd><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimAdd" target=_parent class=ISymbol>gdImageGifAnimAdd</a></div></div><div class=SRResult id=SR_gdImageGifAnimAddCtx><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimAddCtx" target=_parent class=ISymbol>gdImageGifAnimAddCtx</a></div></div><div class=SRResult id=SR_gdImageGifAnimAddPtr><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimAddPtr" target=_parent class=ISymbol>gdImageGifAnimAddPtr</a></div></div><div class=SRResult id=SR_gdImageGifAnimBegin><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimBegin" target=_parent class=ISymbol>gdImageGifAnimBegin</a></div></div><div class=SRResult id=SR_gdImageGifAnimBeginCtx><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimBeginCtx" target=_parent class=ISymbol>gdImageGifAnimBeginCtx</a></div></div><div class=SRResult id=SR_gdImageGifAnimBeginPtr><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimBeginPtr" target=_parent class=ISymbol>gdImageGifAnimBeginPtr</a></div></div><div class=SRResult id=SR_gdImageGifAnimEnd><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimEnd" target=_parent class=ISymbol>gdImageGifAnimEnd</a></div></div><div class=SRResult id=SR_gdImageGifAnimEndCtx><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimEndCtx" target=_parent class=ISymbol>gdImageGifAnimEndCtx</a></div></div><div class=SRResult id=SR_gdImageGifAnimEndPtr><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimEndPtr" target=_parent class=ISymbol>gdImageGifAnimEndPtr</a></div></div><div class=SRResult id=SR_gdImageGifCtx><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifCtx" target=_parent class=ISymbol>gdImageGifCtx</a></div></div><div class=SRResult id=SR_gdImageGifPtr><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifPtr" target=_parent class=ISymbol>gdImageGifPtr</a></div></div><div class=SRResult id=SR_gdImageGrayScale><div class=IEntry><a href="../files/gd_filter-c.html#gdImageGrayScale" target=_parent class=ISymbol>gdImageGrayScale</a></div></div><div class=SRResult id=SR_gdImageInterlace><div class=IEntry><a href="../files/gd-c.html#gdImageInterlace" target=_parent class=ISymbol>gdImageInterlace</a></div></div><div class=SRResult id=SR_gdImageJpeg><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageJpeg" target=_parent class=ISymbol>gdImageJpeg</a></div></div><div class=SRResult id=SR_gdImageJpegCtx><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageJpegCtx" target=_parent class=ISymbol>gdImageJpegCtx</a></div></div><div class=SRResult id=SR_gdImageJpegPtr><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageJpegPtr" target=_parent class=ISymbol>gdImageJpegPtr</a></div></div><div class=SRResult id=SR_gdImageLine><div class=IEntry><a href="../files/gd-c.html#gdImageLine" target=_parent class=ISymbol>gdImageLine</a></div></div><div class=SRResult id=SR_gdImageMeanRemoval><div class=IEntry><a href="../files/gd_filter-c.html#gdImageMeanRemoval" target=_parent class=ISymbol>gdImageMeanRemoval</a></div></div><div class=SRResult id=SR_gdImageNegate><div class=IEntry><a href="../files/gd_filter-c.html#gdImageNegate" target=_parent class=ISymbol>gdImageNegate</a></div></div><div class=SRResult id=SR_gdImageNeuQuant><div class=IEntry><a href="../files/gd_nnquant-c.html#gdImageNeuQuant" target=_parent class=ISymbol>gdImageNeuQuant</a></div></div><div class=SRResult id=SR_gdImageOpenPolygon><div class=IEntry><a href="../files/gd-c.html#gdImageOpenPolygon" target=_parent class=ISymbol>gdImageOpenPolygon</a></div></div><div class=SRResult id=SR_gdImagePaletteCopy><div class=IEntry><a href="../files/gd-c.html#gdImagePaletteCopy" target=_parent class=ISymbol>gdImagePaletteCopy</a></div></div><div class=SRResult id=SR_gdImagePaletteToTrueColor><div class=IEntry><a href="../files/gd-c.html#gdImagePaletteToTrueColor" target=_parent class=ISymbol>gdImagePaletteToTrueColor</a></div></div><div class=SRResult id=SR_gdImagePixelate><div class=IEntry><a href="../files/gd_filter-c.html#gdImagePixelate" target=_parent class=ISymbol>gdImagePixelate</a></div></div><div class=SRResult id=SR_gdImagePng><div class=IEntry><a href="../files/gd_png-c.html#gdImagePng" target=_parent class=ISymbol>gdImagePng</a></div></div><div class=SRResult id=SR_gdImagePngCtx><div class=IEntry><a href="../files/gd_png-c.html#gdImagePngCtx" target=_parent class=ISymbol>gdImagePngCtx</a></div></div><div class=SRResult id=SR_gdImagePngCtxEx><div class=IEntry><a href="../files/gd_png-c.html#gdImagePngCtxEx" target=_parent class=ISymbol>gdImagePngCtxEx</a></div></div><div class=SRResult id=SR_gdImagePngEx><div class=IEntry><a href="../files/gd_png-c.html#gdImagePngEx" target=_parent class=ISymbol>gdImagePngEx</a></div></div><div class=SRResult id=SR_gdImagePngPtr><div class=IEntry><a href="../files/gd_png-c.html#gdImagePngPtr" target=_parent class=ISymbol>gdImagePngPtr</a></div></div><div class=SRResult id=SR_gdImagePngPtrEx><div class=IEntry><a href="../files/gd_png-c.html#gdImagePngPtrEx" target=_parent class=ISymbol>gdImagePngPtrEx</a></div></div><div class=SRResult id=SR_gdImagePngToSink><div class=IEntry><a href="../files/gd_ss-c.html#gdImagePngToSink" target=_parent class=ISymbol>gdImagePngToSink</a></div></div><div class=SRResult id=SR_gdImagePolygon><div class=IEntry><a href="../files/gd-c.html#gdImagePolygon" target=_parent class=ISymbol>gdImagePolygon</a></div></div><div class=SRResult id=SR_gdImageRectangle><div class=IEntry><a href="../files/gd-c.html#gdImageRectangle" target=_parent class=ISymbol>gdImageRectangle</a></div></div><div class=SRResult id=SR_gdImageRotateInterpolated><div class=IEntry><a href="../files/gd_interpolation-c.html#gdImageRotateInterpolated" target=_parent class=ISymbol>gdImageRotateInterpolated</a></div></div><div class=SRResult id=SR_gdImageSaveAlpha><div class=IEntry><a href="../files/gd-c.html#gdImageSaveAlpha" target=_parent class=ISymbol>gdImageSaveAlpha</a></div></div><div class=SRResult id=SR_gdImageScale><div class=IEntry><a href="../files/gd_interpolation-c.html#gdImageScale" target=_parent class=ISymbol>gdImageScale</a></div></div><div class=SRResult id=SR_gdImageScatter><div class=IEntry><a href="../files/gd_filter-c.html#gdImageScatter" target=_parent class=ISymbol>gdImageScatter</a></div></div><div class=SRResult id=SR_gdImageScatterColor><div class=IEntry><a href="../files/gd_filter-c.html#gdImageScatterColor" target=_parent class=ISymbol>gdImageScatterColor</a></div></div><div class=SRResult id=SR_gdImageScatterEx><div class=IEntry><a href="../files/gd_filter-c.html#gdImageScatterEx" target=_parent class=ISymbol>gdImageScatterEx</a></div></div><div class=SRResult id=SR_gdImageSelectiveBlur><div class=IEntry><a href="../files/gd_filter-c.html#gdImageSelectiveBlur" target=_parent class=ISymbol>gdImageSelectiveBlur</a></div></div><div class=SRResult id=SR_gdImageSetAntiAliased><div class=IEntry><a href="../files/gd-c.html#gdImageSetAntiAliased" target=_parent class=ISymbol>gdImageSetAntiAliased</a></div></div><div class=SRResult id=SR_gdImageSetAntiAliasedDontBlend><div class=IEntry><a href="../files/gd-c.html#gdImageSetAntiAliasedDontBlend" target=_parent class=ISymbol>gdImageSetAntiAliasedDontBlend</a></div></div><div class=SRResult id=SR_gdImageSetBrush><div class=IEntry><a href="../files/gd-c.html#gdImageSetBrush" target=_parent class=ISymbol>gdImageSetBrush</a></div></div><div class=SRResult id=SR_gdImageSetClip><div class=IEntry><a href="../files/gd-c.html#gdImageSetClip" target=_parent class=ISymbol>gdImageSetClip</a></div></div><div class=SRResult id=SR_gdImageSetInterpolationMethod><div class=IEntry><a href="../files/gd_interpolation-c.html#gdImageSetInterpolationMethod" target=_parent class=ISymbol>gdImageSetInterpolationMethod</a></div></div><div class=SRResult id=SR_gdImageSetPixel><div class=IEntry><a href="../files/gd-c.html#gdImageSetPixel" target=_parent class=ISymbol>gdImageSetPixel</a></div></div><div class=SRResult id=SR_gdImageSetResolution><div class=IEntry><a href="../files/gd-c.html#gdImageSetResolution" target=_parent class=ISymbol>gdImageSetResolution</a></div></div><div class=SRResult id=SR_gdImageSetStyle><div class=IEntry><a href="../files/gd-c.html#gdImageSetStyle" target=_parent class=ISymbol>gdImageSetStyle</a></div></div><div class=SRResult id=SR_gdImageSetThickness><div class=IEntry><a href="../files/gd-c.html#gdImageSetThickness" target=_parent class=ISymbol>gdImageSetThickness</a></div></div><div class=SRResult id=SR_gdImageSetTile><div class=IEntry><a href="../files/gd-c.html#gdImageSetTile" target=_parent class=ISymbol>gdImageSetTile</a></div></div><div class=SRResult id=SR_gdImageSharpen><div class=IEntry><a href="../files/gdfx-c.html#gdImageSharpen" target=_parent class=ISymbol>gdImageSharpen</a></div></div><div class=SRResult id=SR_gdImageSmooth><div class=IEntry><a href="../files/gd_filter-c.html#gdImageSmooth" target=_parent class=ISymbol>gdImageSmooth</a></div></div><div class=SRResult id=SR_gdImageSquareToCircle><div class=IEntry><a href="../files/gdfx-c.html#gdImageSquareToCircle" target=_parent class=ISymbol>gdImageSquareToCircle</a></div></div><div class=SRResult id=SR_gdImageString><div class=IEntry><a href="../files/gd-c.html#gdImageString" target=_parent class=ISymbol>gdImageString</a></div></div><div class=SRResult id=SR_gdImageString16><div class=IEntry><a href="../files/gd-c.html#gdImageString16" target=_parent class=ISymbol>gdImageString16</a></div></div><div class=SRResult id=SR_gdImageStringFT><div class=IEntry><a href="../files/gdft-c.html#gdImageStringFT" target=_parent class=ISymbol>gdImageStringFT</a></div></div><div class=SRResult id=SR_gdImageStringFTCircle><div class=IEntry><a href="../files/gdfx-c.html#gdImageStringFTCircle" target=_parent class=ISymbol>gdImageStringFTCircle</a></div></div><div class=SRResult id=SR_gdImageStringFTEx><div class=IEntry><a href="../files/gdft-c.html#gdImageStringFTEx" target=_parent class=ISymbol>gdImageStringFTEx</a></div></div><div class=SRResult id=SR_gdImageStringTTF><div class=IEntry><a href="../files/gdft-c.html#gdImageStringTTF" target=_parent class=ISymbol>gdImageStringTTF</a></div></div><div class=SRResult id=SR_gdImageStringUp><div class=IEntry><a href="../files/gd-c.html#gdImageStringUp" target=_parent class=ISymbol>gdImageStringUp</a></div></div><div class=SRResult id=SR_gdImageStringUp16><div class=IEntry><a href="../files/gd-c.html#gdImageStringUp16" target=_parent class=ISymbol>gdImageStringUp16</a></div></div><div class=SRResult id=SR_gdImageTiff><div class=IEntry><a href="../files/gd_tiff-c.html#gdImageTiff" target=_parent class=ISymbol>gdImageTiff</a></div></div><div class=SRResult id=SR_gdImageTiffCtx><div class=IEntry><a href="../files/gd_tiff-c.html#gdImageTiffCtx" target=_parent class=ISymbol>gdImageTiffCtx</a></div></div><div class=SRResult id=SR_gdImageTiffPtr><div class=IEntry><a href="../files/gd_tiff-c.html#gdImageTiffPtr" target=_parent class=ISymbol>gdImageTiffPtr</a></div></div><div class=SRResult id=SR_gdImageTrueColorToPalette><div class=IEntry><a href="../files/gd_topal-c.html#gdImageTrueColorToPalette" target=_parent class=ISymbol>gdImageTrueColorToPalette</a></div></div><div class=SRResult id=SR_gdImageTrueColorToPaletteSetMethod><div class=IEntry><a href="../files/gd_topal-c.html#gdImageTrueColorToPaletteSetMethod" target=_parent class=ISymbol>gdImageTrueColorToPaletteSetMethod</a></div></div><div class=SRResult id=SR_gdImageTrueColorToPaletteSetQuality><div class=IEntry><a href="../files/gd_topal-c.html#gdImageTrueColorToPaletteSetQuality" target=_parent class=ISymbol>gdImageTrueColorToPaletteSetQuality</a></div></div><div class=SRResult id=SR_gdImageWBMP><div class=IEntry><a href="../files/gd_wbmp-c.html#gdImageWBMP" target=_parent class=ISymbol>gdImageWBMP</a></div></div><div class=SRResult id=SR_gdImageWBMPCtx><div class=IEntry><a href="../files/gd_wbmp-c.html#gdImageWBMPCtx" target=_parent class=ISymbol>gdImageWBMPCtx</a></div></div><div class=SRResult id=SR_gdImageWBMPPtr><div class=IEntry><a href="../files/gd_wbmp-c.html#gdImageWBMPPtr" target=_parent class=ISymbol>gdImageWBMPPtr</a></div></div><div class=SRResult id=SR_gdImageWebp><div class=IEntry><a href="../files/gd_webp-c.html#gdImageWebp" target=_parent class=ISymbol>gdImageWebp</a></div></div><div class=SRResult id=SR_gdImageWebpEx><div class=IEntry><a href="../files/gd_webp-c.html#gdImageWebpEx" target=_parent class=ISymbol>gdImageWebpEx</a></div></div><div class=SRResult id=SR_gdImageWebpPtr><div class=IEntry><a href="../files/gd_webp-c.html#gdImageWebpPtr" target=_parent class=ISymbol>gdImageWebpPtr</a></div></div><div class=SRResult id=SR_gdImageWebpPtrEx><div class=IEntry><a href="../files/gd_webp-c.html#gdImageWebpPtrEx" target=_parent class=ISymbol>gdImageWebpPtrEx</a></div></div><div class=SRResult id=SR_gdImageXbmCtx><div class=IEntry><a href="../files/gd_xbm-c.html#gdImageXbmCtx" target=_parent class=ISymbol>gdImageXbmCtx</a></div></div><div class=SRResult id=SR_gdLayerMultiply><div class=IEntry><a href="../files/gd-c.html#gdLayerMultiply" target=_parent class=ISymbol>gdLayerMultiply</a></div></div><div class=SRResult id=SR_gdLayerOverlay><div class=IEntry><a href="../files/gd-c.html#gdLayerOverlay" target=_parent class=ISymbol>gdLayerOverlay</a></div></div><div class=SRResult id=SR_gdMajorVersion><div class=IEntry><a href="../files/gd_version-c.html#gdMajorVersion" target=_parent class=ISymbol>gdMajorVersion</a></div></div><div class=SRResult id=SR_gdMinorVersion><div class=IEntry><a href="../files/gd_version-c.html#gdMinorVersion" target=_parent class=ISymbol>gdMinorVersion</a></div></div><div class=SRResult id=SR_gdNewDynamicCtx><div class=IEntry><a href="../files/gd_io_dp-c.html#gdNewDynamicCtx" target=_parent class=ISymbol>gdNewDynamicCtx</a></div></div><div class=SRResult id=SR_gdNewDynamicCtxEx><div class=IEntry><a href="../files/gd_io_dp-c.html#gdNewDynamicCtxEx" target=_parent class=ISymbol>gdNewDynamicCtxEx</a></div></div><div class=SRResult id=SR_gdNewFileCtx><div class=IEntry><a href="../files/gd_io_file-c.html#gdNewFileCtx" target=_parent class=ISymbol>gdNewFileCtx</a></div></div><div class=SRResult id=SR_gdNewSSCtx><div class=IEntry><a href="../files/gd_io_ss-c.html#gdNewSSCtx" target=_parent class=ISymbol>gdNewSSCtx</a></div></div><div class=SRResult id=SR_gdReleaseVersion><div class=IEntry><a href="../files/gd_version-c.html#gdReleaseVersion" target=_parent class=ISymbol>gdReleaseVersion</a></div></div><div class=SRResult id=SR_gdSetErrorMethod><div class=IEntry><a href="../files/gd-c.html#gdSetErrorMethod" target=_parent class=ISymbol>gdSetErrorMethod</a></div></div><div class=SRResult id=SR_gdSupportsFileType><div class=IEntry><a href="../files/gd_filename-c.html#gdSupportsFileType" target=_parent class=ISymbol>gdSupportsFileType</a></div></div><div class=SRResult id=SR_gdTransformAffineBoundingBox><div class=IEntry><a href="../files/gd_interpolation-c.html#gdTransformAffineBoundingBox" target=_parent class=ISymbol>gdTransformAffineBoundingBox</a></div></div><div class=SRResult id=SR_gdTransformAffineCopy><div class=IEntry><a href="../files/gd_interpolation-c.html#gdTransformAffineCopy" target=_parent class=ISymbol>gdTransformAffineCopy</a></div></div><div class=SRResult id=SR_gdTransformAffineGetImage><div class=IEntry><a href="../files/gd_interpolation-c.html#gdTransformAffineGetImage" target=_parent class=ISymbol>gdTransformAffineGetImage</a></div></div><div class=SRResult id=SR_gdVersionString><div class=IEntry><a href="../files/gd_version-c.html#gdVersionString" target=_parent class=ISymbol>gdVersionString</a></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
    -document.getElementById("Loading").style.display="none";
    -document.getElementById("NoMatches").style.display="none";
    -var searchResults = new SearchResults("searchResults", "HTML");
    -searchResults.Search();
    ---></script></div><script language=JavaScript><!--
    -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralA.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralA.html
    deleted file mode 100644
    index 5cceb6b380a..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralA.html
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    -
    -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="PopupSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
    -if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
    -
    -<!--  Generated by Natural Docs, version 1.51 -->
    -<!--  http://www.naturaldocs.org  -->
    -
    -<!-- saved from url=(0026)http://www.naturaldocs.org -->
    -
    -
    -
    -
    -<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_Affine_spctransformation><div class=IEntry><a href="../files/gd_interpolation-c.html#Affine_transformation" target=_parent class=ISymbol>Affine transformation</a></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
    -document.getElementById("Loading").style.display="none";
    -document.getElementById("NoMatches").style.display="none";
    -var searchResults = new SearchResults("searchResults", "HTML");
    -searchResults.Search();
    ---></script></div><script language=JavaScript><!--
    -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralC.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralC.html
    deleted file mode 100644
    index e4875baaed4..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralC.html
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    -
    -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="PopupSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
    -if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
    -
    -<!--  Generated by Natural Docs, version 1.51 -->
    -<!--  http://www.naturaldocs.org  -->
    -
    -<!-- saved from url=(0026)http://www.naturaldocs.org -->
    -
    -
    -
    -
    -<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_Crop><div class=IEntry><a href="../files/gd-h.html#Crop" target=_parent class=ISymbol>Crop</a></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
    -document.getElementById("Loading").style.display="none";
    -document.getElementById("NoMatches").style.display="none";
    -var searchResults = new SearchResults("searchResults", "HTML");
    -searchResults.Search();
    ---></script></div><script language=JavaScript><!--
    -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralF.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralF.html
    deleted file mode 100644
    index c4a9e28a4be..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralF.html
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    -
    -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="PopupSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
    -if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
    -
    -<!--  Generated by Natural Docs, version 1.51 -->
    -<!--  http://www.naturaldocs.org  -->
    -
    -<!-- saved from url=(0026)http://www.naturaldocs.org -->
    -
    -
    -
    -
    -<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_Functions><div class=IEntry><a href="javascript:searchResults.Toggle('SR_Functions')" class=ISymbol>Functions</a><div class=ISubIndex><a href="../files/gd-c.html#Functions" target=_parent class=IFile>gd.c</a><a href="../files/gd_bmp-c.html#Functions" target=_parent class=IFile>gd_bmp.c</a><a href="../files/gd_crop-c.html#Functions" target=_parent class=IFile>gd_crop.c</a><a href="../files/gd_filename-c.html#Functions" target=_parent class=IFile>gd_filename.c</a><a href="../files/gd_filter-c.html#Functions" target=_parent class=IFile>gd_filter.c</a><a href="../files/gd_gd-c.html#Functions" target=_parent class=IFile>gd_gd.c</a><a href="../files/gd_gd2-c.html#Functions" target=_parent class=IFile>gd_gd2.c</a><a href="../files/gd_gif_in-c.html#Functions" target=_parent class=IFile>gd_gif_in.c</a><a href="../files/gd_gif_out-c.html#Functions" target=_parent class=IFile>gd_gif_out.c</a><a href="../files/gd_interpolation-c.html#Functions" target=_parent class=IFile>gd_interpolation.c</a><a href="../files/gd_io_dp-c.html#Functions" target=_parent class=IFile>gd_io_dp.c</a><a href="../files/gd_jpeg-c.html#Functions" target=_parent class=IFile>gd_jpeg.c</a><a href="../files/gd_matrix-c.html#Functions" target=_parent class=IFile>gd_matrix.c</a><a href="../files/gd_png-c.html#Functions" target=_parent class=IFile>gd_png.c</a><a href="../files/gd_ss-c.html#Functions" target=_parent class=IFile>gd_ss.c</a><a href="../files/gd_tga-c.html#Functions" target=_parent class=IFile>gd_tga.c</a><a href="../files/gd_tiff-c.html#Functions" target=_parent class=IFile>gd_tiff.c</a><a href="../files/gd_topal-c.html#Functions" target=_parent class=IFile>gd_topal.c</a><a href="../files/gd_transform-c.html#Functions" target=_parent class=IFile>gd_transform.c</a><a href="../files/gd_version-c.html#Functions" target=_parent class=IFile>gd_version.c</a><a href="../files/gd_wbmp-c.html#Functions" target=_parent class=IFile>gd_wbmp.c</a><a href="../files/gd_webp-c.html#Functions" target=_parent class=IFile>gd_webp.c</a><a href="../files/gd_xbm-c.html#Functions" target=_parent class=IFile>gd_xbm.c</a><a href="../files/gdft-c.html#Functions" target=_parent class=IFile>gdft.c</a><a href="../files/gdfx-c.html#Functions" target=_parent class=IFile>gdfx.c</a></div></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
    -document.getElementById("Loading").style.display="none";
    -document.getElementById("NoMatches").style.display="none";
    -var searchResults = new SearchResults("searchResults", "HTML");
    -searchResults.Search();
    ---></script></div><script language=JavaScript><!--
    -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralG.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralG.html
    deleted file mode 100644
    index a33521a7895..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralG.html
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    -
    -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="PopupSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
    -if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
    -
    -<!--  Generated by Natural Docs, version 1.51 -->
    -<!--  http://www.naturaldocs.org  -->
    -
    -<!-- saved from url=(0026)http://www.naturaldocs.org -->
    -
    -
    -
    -
    -<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_gd_perc><div class=IEntry><a href="../files/gd-c.html#gd.c" target=_parent class=ISymbol>gd.c</a></div></div><div class=SRResult id=SR_gd_perh><div class=IEntry><a href="../files/gd-h.html#gd.h" target=_parent class=ISymbol>gd.h</a></div></div><div class=SRResult id=SR_GD_undBELL><div class=IEntry><a href="../files/gd-h.html#GD_BELL" target=_parent class=ISymbol>GD_BELL</a></div></div><div class=SRResult id=SR_GD_undBESSEL><div class=IEntry><a href="../files/gd-h.html#GD_BESSEL" target=_parent class=ISymbol>GD_BESSEL</a></div></div><div class=SRResult id=SR_GD_undBICUBIC><div class=IEntry><a href="../files/gd-h.html#GD_BICUBIC" target=_parent class=ISymbol>GD_BICUBIC</a></div></div><div class=SRResult id=SR_GD_undBICUBIC_undFIXED><div class=IEntry><a href="../files/gd-h.html#GD_BICUBIC_FIXED" target=_parent class=ISymbol>GD_BICUBIC_FIXED</a></div></div><div class=SRResult id=SR_GD_undBILINEAR_undFIXED><div class=IEntry><a href="../files/gd-h.html#GD_BILINEAR_FIXED" target=_parent class=ISymbol>GD_BILINEAR_FIXED</a></div></div><div class=SRResult id=SR_GD_undBLACKMAN><div class=IEntry><a href="../files/gd-h.html#GD_BLACKMAN" target=_parent class=ISymbol>GD_BLACKMAN</a></div></div><div class=SRResult id=SR_gd_undbmp_perc><div class=IEntry><a href="../files/gd_bmp-c.html#gd_bmp.c" target=_parent class=ISymbol>gd_bmp.c</a></div></div><div class=SRResult id=SR_GD_undBOX><div class=IEntry><a href="../files/gd-h.html#GD_BOX" target=_parent class=ISymbol>GD_BOX</a></div></div><div class=SRResult id=SR_GD_undBSPLINE><div class=IEntry><a href="../files/gd-h.html#GD_BSPLINE" target=_parent class=ISymbol>GD_BSPLINE</a></div></div><div class=SRResult id=SR_GD_undCATMULLROM><div class=IEntry><a href="../files/gd-h.html#GD_CATMULLROM" target=_parent class=ISymbol>GD_CATMULLROM</a></div></div><div class=SRResult id=SR_gd_undcrop_perc><div class=IEntry><a href="../files/gd_crop-c.html#gd_crop.c" target=_parent class=ISymbol>gd_crop.c</a></div></div><div class=SRResult id=SR_GD_undCROP_undBLACK><div class=IEntry><a href="../files/gd-h.html#GD_CROP_BLACK" target=_parent class=ISymbol>GD_CROP_BLACK</a></div></div><div class=SRResult id=SR_GD_undCROP_undDEFAULT><div class=IEntry><a href="../files/gd-h.html#GD_CROP_DEFAULT" target=_parent class=ISymbol>GD_CROP_DEFAULT</a></div></div><div class=SRResult id=SR_GD_undCROP_undSIDES><div class=IEntry><a href="../files/gd-h.html#GD_CROP_SIDES" target=_parent class=ISymbol>GD_CROP_SIDES</a></div></div><div class=SRResult id=SR_GD_undCROP_undTRANSPARENT><div class=IEntry><a href="../files/gd-h.html#GD_CROP_TRANSPARENT" target=_parent class=ISymbol>GD_CROP_TRANSPARENT</a></div></div><div class=SRResult id=SR_GD_undCROP_undWHITE><div class=IEntry><a href="../files/gd-h.html#GD_CROP_WHITE" target=_parent class=ISymbol>GD_CROP_WHITE</a></div></div><div class=SRResult id=SR_gd_undfilename_perc><div class=IEntry><a href="../files/gd_filename-c.html#gd_filename.c" target=_parent class=ISymbol>gd_filename.c</a></div></div><div class=SRResult id=SR_gd_undfilter_perc><div class=IEntry><a href="../files/gd_filter-c.html#gd_filter.c" target=_parent class=ISymbol>gd_filter.c</a></div></div><div class=SRResult id=SR_GD_undGAUSSIAN><div class=IEntry><a href="../files/gd-h.html#GD_GAUSSIAN" target=_parent class=ISymbol>GD_GAUSSIAN</a></div></div><div class=SRResult id=SR_gd_undgd_perc><div class=IEntry><a href="../files/gd_gd-c.html#gd_gd.c" target=_parent class=ISymbol>gd_gd.c</a></div></div><div class=SRResult id=SR_gd_undgd2_perc><div class=IEntry><a href="../files/gd_gd2-c.html#gd_gd2.c" target=_parent class=ISymbol>gd_gd2.c</a></div></div><div class=SRResult id=SR_GD_undGENERALIZED_undCUBIC><div class=IEntry><a href="../files/gd-h.html#GD_GENERALIZED_CUBIC" target=_parent class=ISymbol>GD_GENERALIZED_CUBIC</a></div></div><div class=SRResult id=SR_gd_undgif_undin_perc><div class=IEntry><a href="../files/gd_gif_in-c.html#gd_gif_in.c" target=_parent class=ISymbol>gd_gif_in.c</a></div></div><div class=SRResult id=SR_gd_undgif_undout_perc><div class=IEntry><a href="../files/gd_gif_out-c.html#gd_gif_out.c" target=_parent class=ISymbol>gd_gif_out.c</a></div></div><div class=SRResult id=SR_GD_undHAMMING><div class=IEntry><a href="../files/gd-h.html#GD_HAMMING" target=_parent class=ISymbol>GD_HAMMING</a></div></div><div class=SRResult id=SR_GD_undHANNING><div class=IEntry><a href="../files/gd-h.html#GD_HANNING" target=_parent class=ISymbol>GD_HANNING</a></div></div><div class=SRResult id=SR_GD_undHERMITE><div class=IEntry><a href="../files/gd-h.html#GD_HERMITE" target=_parent class=ISymbol>GD_HERMITE</a></div></div><div class=SRResult id=SR_gd_undinterpolation_perc><div class=IEntry><a href="../files/gd_interpolation-c.html#gd_interpolation.c" target=_parent class=ISymbol>gd_interpolation.c</a></div></div><div class=SRResult id=SR_gd_undio_perh><div class=IEntry><a href="../files/gd_io-h.html#gd_io.h" target=_parent class=ISymbol>gd_io.h</a></div></div><div class=SRResult id=SR_gd_undio_unddp_perc><div class=IEntry><a href="../files/gd_io_dp-c.html#gd_io_dp.c" target=_parent class=ISymbol>gd_io_dp.c</a></div></div><div class=SRResult id=SR_gd_undjpeg_perc><div class=IEntry><a href="../files/gd_jpeg-c.html#gd_jpeg.c" target=_parent class=ISymbol>gd_jpeg.c</a></div></div><div class=SRResult id=SR_GD_undLINEAR><div class=IEntry><a href="../files/gd-h.html#GD_LINEAR" target=_parent class=ISymbol>GD_LINEAR</a></div></div><div class=SRResult id=SR_GD_undMITCHELL><div class=IEntry><a href="../files/gd-h.html#GD_MITCHELL" target=_parent class=ISymbol>GD_MITCHELL</a></div></div><div class=SRResult id=SR_GD_undNEAREST_undNEIGHBOUR><div class=IEntry><a href="../files/gd-h.html#GD_NEAREST_NEIGHBOUR" target=_parent class=ISymbol>GD_NEAREST_NEIGHBOUR</a></div></div><div class=SRResult id=SR_gd_undpng_perc><div class=IEntry><a href="../files/gd_png-c.html#gd_png.c" target=_parent class=ISymbol>gd_png.c</a></div></div><div class=SRResult id=SR_GD_undPOWER><div class=IEntry><a href="../files/gd-h.html#GD_POWER" target=_parent class=ISymbol>GD_POWER</a></div></div><div class=SRResult id=SR_GD_undQUADRATIC><div class=IEntry><a href="../files/gd-h.html#GD_QUADRATIC" target=_parent class=ISymbol>GD_QUADRATIC</a></div></div><div class=SRResult id=SR_GD_undSINC><div class=IEntry><a href="../files/gd-h.html#GD_SINC" target=_parent class=ISymbol>GD_SINC</a></div></div><div class=SRResult id=SR_gd_undss_perc><div class=IEntry><a href="../files/gd_ss-c.html#gd_ss.c" target=_parent class=ISymbol>gd_ss.c</a></div></div><div class=SRResult id=SR_gd_undtga_perc><div class=IEntry><a href="../files/gd_tga-c.html#gd_tga.c" target=_parent class=ISymbol>gd_tga.c</a></div></div><div class=SRResult id=SR_gd_undtiff_perc><div class=IEntry><a href="../files/gd_tiff-c.html#gd_tiff.c" target=_parent class=ISymbol>gd_tiff.c</a></div></div><div class=SRResult id=SR_gd_undtopal_perc><div class=IEntry><a href="../files/gd_topal-c.html#gd_topal.c" target=_parent class=ISymbol>gd_topal.c</a></div></div><div class=SRResult id=SR_gd_undtransform_perc><div class=IEntry><a href="../files/gd_transform-c.html#gd_transform.c" target=_parent class=ISymbol>gd_transform.c</a></div></div><div class=SRResult id=SR_GD_undTRIANGLE><div class=IEntry><a href="../files/gd-h.html#GD_TRIANGLE" target=_parent class=ISymbol>GD_TRIANGLE</a></div></div><div class=SRResult id=SR_gd_undversion_perc><div class=IEntry><a href="../files/gd_version-c.html#gd_version.c" target=_parent class=ISymbol>gd_version.c</a></div></div><div class=SRResult id=SR_gd_undwbmp_perc><div class=IEntry><a href="../files/gd_wbmp-c.html#gd_wbmp.c" target=_parent class=ISymbol>gd_wbmp.c</a></div></div><div class=SRResult id=SR_gd_undwebp_perc><div class=IEntry><a href="../files/gd_webp-c.html#gd_webp.c" target=_parent class=ISymbol>gd_webp.c</a></div></div><div class=SRResult id=SR_GD_undWEIGHTED4><div class=IEntry><a href="../files/gd-h.html#GD_WEIGHTED4" target=_parent class=ISymbol>GD_WEIGHTED4</a></div></div><div class=SRResult id=SR_gd_undxbm_perc><div class=IEntry><a href="../files/gd_xbm-c.html#gd_xbm.c" target=_parent class=ISymbol>gd_xbm.c</a></div></div><div class=SRResult id=SR_gdAffineApplyToPointF><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineApplyToPointF" target=_parent class=ISymbol>gdAffineApplyToPointF</a></div></div><div class=SRResult id=SR_gdAffineConcat><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineConcat" target=_parent class=ISymbol>gdAffineConcat</a></div></div><div class=SRResult id=SR_gdAffineEqual><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineEqual" target=_parent class=ISymbol>gdAffineEqual</a></div></div><div class=SRResult id=SR_gdAffineFlip><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineFlip" target=_parent class=ISymbol>gdAffineFlip</a></div></div><div class=SRResult id=SR_gdAffineIdentity><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineIdentity" target=_parent class=ISymbol>gdAffineIdentity</a></div></div><div class=SRResult id=SR_gdAffineInvert><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineInvert" target=_parent class=ISymbol>gdAffineInvert</a></div></div><div class=SRResult id=SR_gdAffineRectilinear><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineRectilinear" target=_parent class=ISymbol>gdAffineRectilinear</a></div></div><div class=SRResult id=SR_gdAffineRotate><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineRotate" target=_parent class=ISymbol>gdAffineRotate</a></div></div><div class=SRResult id=SR_gdAffineScale><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineScale" target=_parent class=ISymbol>gdAffineScale</a></div></div><div class=SRResult id=SR_gdAffineShearHorizontal><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineShearHorizontal" target=_parent class=ISymbol>gdAffineShearHorizontal</a></div></div><div class=SRResult id=SR_gdAffineShearVertical><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineShearVertical" target=_parent class=ISymbol>gdAffineShearVertical</a></div></div><div class=SRResult id=SR_gdAffineTranslate><div class=IEntry><a href="../files/gd_matrix-c.html#gdAffineTranslate" target=_parent class=ISymbol>gdAffineTranslate</a></div></div><div class=SRResult id=SR_gdAlphaBlend><div class=IEntry><a href="../files/gd-c.html#gdAlphaBlend" target=_parent class=ISymbol>gdAlphaBlend</a></div></div><div class=SRResult id=SR_gdClearErrorMethod><div class=IEntry><a href="../files/gd-c.html#gdClearErrorMethod" target=_parent class=ISymbol>gdClearErrorMethod</a></div></div><div class=SRResult id=SR_gdColorMapLookup><div class=IEntry><a href="../files/gd_color_map-c.html#gdColorMapLookup" target=_parent class=ISymbol>gdColorMapLookup</a></div></div><div class=SRResult id=SR_gdCropMode><div class=IEntry><a href="../files/gd-h.html#gdCropMode" target=_parent class=ISymbol>gdCropMode</a></div></div><div class=SRResult id=SR_gdDisposalNone><div class=IEntry><a href="../files/gd-h.html#gdDisposalNone" target=_parent class=ISymbol>gdDisposalNone</a></div></div><div class=SRResult id=SR_gdDisposalRestoreBackground><div class=IEntry><a href="../files/gd-h.html#gdDisposalRestoreBackground" target=_parent class=ISymbol>gdDisposalRestoreBackground</a></div></div><div class=SRResult id=SR_gdDisposalRestorePrevious><div class=IEntry><a href="../files/gd-h.html#gdDisposalRestorePrevious" target=_parent class=ISymbol>gdDisposalRestorePrevious</a></div></div><div class=SRResult id=SR_gdDisposalUnknown><div class=IEntry><a href="../files/gd-h.html#gdDisposalUnknown" target=_parent class=ISymbol>gdDisposalUnknown</a></div></div><div class=SRResult id=SR_gdDPExtractData><div class=IEntry><a href="../files/gd_io_dp-c.html#gdDPExtractData" target=_parent class=ISymbol>gdDPExtractData</a></div></div><div class=SRResult id=SR_gdExtraVersion><div class=IEntry><a href="../files/gd_version-c.html#gdExtraVersion" target=_parent class=ISymbol>gdExtraVersion</a></div></div><div class=SRResult id=SR_gdFont><div class=IEntry><a href="../files/gd-h.html#gdFont" target=_parent class=ISymbol>gdFont</a></div></div><div class=SRResult id=SR_gdFontCacheSetup><div class=IEntry><a href="../files/gdft-c.html#gdFontCacheSetup" target=_parent class=ISymbol>gdFontCacheSetup</a></div></div><div class=SRResult id=SR_gdFontCacheShutdown><div class=IEntry><a href="../files/gdft-c.html#gdFontCacheShutdown" target=_parent class=ISymbol>gdFontCacheShutdown</a></div></div><div class=SRResult id=SR_gdFontGetGiant><div class=IEntry><a href="../files/gdfontg-c.html#gdFontGetGiant" target=_parent class=ISymbol>gdFontGetGiant</a></div></div><div class=SRResult id=SR_gdFontGetLarge><div class=IEntry><a href="../files/gdfontl-c.html#gdFontGetLarge" target=_parent class=ISymbol>gdFontGetLarge</a></div></div><div class=SRResult id=SR_gdFontGetMediumBold><div class=IEntry><a href="../files/gdfontmb-c.html#gdFontGetMediumBold" target=_parent class=ISymbol>gdFontGetMediumBold</a></div></div><div class=SRResult id=SR_gdFontGetSmall><div class=IEntry><a href="../files/gdfonts-c.html#gdFontGetSmall" target=_parent class=ISymbol>gdFontGetSmall</a></div></div><div class=SRResult id=SR_gdFontGetTiny><div class=IEntry><a href="../files/gdfontt-c.html#gdFontGetTiny" target=_parent class=ISymbol>gdFontGetTiny</a></div></div><div class=SRResult id=SR_gdFontPtr><div class=IEntry><a href="../files/gd-h.html#gdFontPtr" target=_parent class=ISymbol>gdFontPtr</a></div></div><div class=SRResult id=SR_gdFree><div class=IEntry><a href="../files/gdhelpers-c.html#gdFree" target=_parent class=ISymbol>gdFree</a></div></div><div class=SRResult id=SR_gdFreeFontCache><div class=IEntry><a href="../files/gdft-c.html#gdFreeFontCache" target=_parent class=ISymbol>gdFreeFontCache</a></div></div><div class=SRResult id=SR_gdft_perc><div class=IEntry><a href="../files/gdft-c.html#gdft.c" target=_parent class=ISymbol>gdft.c</a></div></div><div class=SRResult id=SR_gdFTStringExtra><div class=IEntry><a href="../files/gd-h.html#gdFTStringExtra" target=_parent class=ISymbol>gdFTStringExtra</a></div></div><div class=SRResult id=SR_gdFTStringExtraPtr><div class=IEntry><a href="../files/gd-h.html#gdFTStringExtraPtr" target=_parent class=ISymbol>gdFTStringExtraPtr</a></div></div><div class=SRResult id=SR_gdFTUseFontConfig><div class=IEntry><a href="../files/gdft-c.html#gdFTUseFontConfig" target=_parent class=ISymbol>gdFTUseFontConfig</a></div></div><div class=SRResult id=SR_gdfx_perc><div class=IEntry><a href="../files/gdfx-c.html#gdfx.c" target=_parent class=ISymbol>gdfx.c</a></div></div><div class=SRResult id=SR_gdImage><div class=IEntry><a href="../files/gd-h.html#gdImage" target=_parent class=ISymbol>gdImage</a></div></div><div class=SRResult id=SR_gdImageAABlend><div class=IEntry><a href="../files/gd-c.html#gdImageAABlend" target=_parent class=ISymbol>gdImageAABlend</a></div></div><div class=SRResult id=SR_gdImageAlphaBlending><div class=IEntry><a href="../files/gd-c.html#gdImageAlphaBlending" target=_parent class=ISymbol>gdImageAlphaBlending</a></div></div><div class=SRResult id=SR_gdImageArc><div class=IEntry><a href="../files/gd-c.html#gdImageArc" target=_parent class=ISymbol>gdImageArc</a></div></div><div class=SRResult id=SR_gdImageBmp><div class=IEntry><a href="../files/gd_bmp-c.html#gdImageBmp" target=_parent class=ISymbol>gdImageBmp</a></div></div><div class=SRResult id=SR_gdImageBmpCtx><div class=IEntry><a href="../files/gd_bmp-c.html#gdImageBmpCtx" target=_parent class=ISymbol>gdImageBmpCtx</a></div></div><div class=SRResult id=SR_gdImageBmpPtr><div class=IEntry><a href="../files/gd_bmp-c.html#gdImageBmpPtr" target=_parent class=ISymbol>gdImageBmpPtr</a></div></div><div class=SRResult id=SR_gdImageBoundsSafe><div class=IEntry><a href="../files/gd-c.html#gdImageBoundsSafe" target=_parent class=ISymbol>gdImageBoundsSafe</a></div></div><div class=SRResult id=SR_gdImageBrightness><div class=IEntry><a href="../files/gd_filter-c.html#gdImageBrightness" target=_parent class=ISymbol>gdImageBrightness</a></div></div><div class=SRResult id=SR_gdImageChar><div class=IEntry><a href="../files/gd-c.html#gdImageChar" target=_parent class=ISymbol>gdImageChar</a></div></div><div class=SRResult id=SR_gdImageCharUp><div class=IEntry><a href="../files/gd-c.html#gdImageCharUp" target=_parent class=ISymbol>gdImageCharUp</a></div></div><div class=SRResult id=SR_gdImageClone><div class=IEntry><a href="../files/gd-c.html#gdImageClone" target=_parent class=ISymbol>gdImageClone</a></div></div><div class=SRResult id=SR_gdImageColor><div class=IEntry><a href="../files/gd_filter-c.html#gdImageColor" target=_parent class=ISymbol>gdImageColor</a></div></div><div class=SRResult id=SR_gdImageColorAllocate><div class=IEntry><a href="../files/gd-c.html#gdImageColorAllocate" target=_parent class=ISymbol>gdImageColorAllocate</a></div></div><div class=SRResult id=SR_gdImageColorAllocateAlpha><div class=IEntry><a href="../files/gd-c.html#gdImageColorAllocateAlpha" target=_parent class=ISymbol>gdImageColorAllocateAlpha</a></div></div><div class=SRResult id=SR_gdImageColorClosest><div class=IEntry><a href="../files/gd-c.html#gdImageColorClosest" target=_parent class=ISymbol>gdImageColorClosest</a></div></div><div class=SRResult id=SR_gdImageColorClosestAlpha><div class=IEntry><a href="../files/gd-c.html#gdImageColorClosestAlpha" target=_parent class=ISymbol>gdImageColorClosestAlpha</a></div></div><div class=SRResult id=SR_gdImageColorClosestHWB><div class=IEntry><a href="../files/gd-c.html#gdImageColorClosestHWB" target=_parent class=ISymbol>gdImageColorClosestHWB</a></div></div><div class=SRResult id=SR_gdImageColorDeallocate><div class=IEntry><a href="../files/gd-c.html#gdImageColorDeallocate" target=_parent class=ISymbol>gdImageColorDeallocate</a></div></div><div class=SRResult id=SR_gdImageColorExact><div class=IEntry><a href="../files/gd-c.html#gdImageColorExact" target=_parent class=ISymbol>gdImageColorExact</a></div></div><div class=SRResult id=SR_gdImageColorExactAlpha><div class=IEntry><a href="../files/gd-c.html#gdImageColorExactAlpha" target=_parent class=ISymbol>gdImageColorExactAlpha</a></div></div><div class=SRResult id=SR_gdImageColorMatch><div class=IEntry><a href="../files/gd_color_match-c.html#gdImageColorMatch" target=_parent class=ISymbol>gdImageColorMatch</a></div></div><div class=SRResult id=SR_gdImageColorReplace><div class=IEntry><a href="../files/gd-c.html#gdImageColorReplace" target=_parent class=ISymbol>gdImageColorReplace</a></div></div><div class=SRResult id=SR_gdImageColorReplaceArray><div class=IEntry><a href="../files/gd-c.html#gdImageColorReplaceArray" target=_parent class=ISymbol>gdImageColorReplaceArray</a></div></div><div class=SRResult id=SR_gdImageColorReplaceCallback><div class=IEntry><a href="../files/gd-c.html#gdImageColorReplaceCallback" target=_parent class=ISymbol>gdImageColorReplaceCallback</a></div></div><div class=SRResult id=SR_gdImageColorReplaceThreshold><div class=IEntry><a href="../files/gd-c.html#gdImageColorReplaceThreshold" target=_parent class=ISymbol>gdImageColorReplaceThreshold</a></div></div><div class=SRResult id=SR_gdImageColorResolve><div class=IEntry><a href="../files/gd-c.html#gdImageColorResolve" target=_parent class=ISymbol>gdImageColorResolve</a></div></div><div class=SRResult id=SR_gdImageColorResolveAlpha><div class=IEntry><a href="../files/gd-c.html#gdImageColorResolveAlpha" target=_parent class=ISymbol>gdImageColorResolveAlpha</a></div></div><div class=SRResult id=SR_gdImageColorTransparent><div class=IEntry><a href="../files/gd-c.html#gdImageColorTransparent" target=_parent class=ISymbol>gdImageColorTransparent</a></div></div><div class=SRResult id=SR_gdImageCompare><div class=IEntry><a href="../files/gd-c.html#gdImageCompare" target=_parent class=ISymbol>gdImageCompare</a></div></div><div class=SRResult id=SR_gdImageContrast><div class=IEntry><a href="../files/gd_filter-c.html#gdImageContrast" target=_parent class=ISymbol>gdImageContrast</a></div></div><div class=SRResult id=SR_gdImageConvolution><div class=IEntry><a href="../files/gd_filter-c.html#gdImageConvolution" target=_parent class=ISymbol>gdImageConvolution</a></div></div><div class=SRResult id=SR_gdImageCopy><div class=IEntry><a href="../files/gd-c.html#gdImageCopy" target=_parent class=ISymbol>gdImageCopy</a></div></div><div class=SRResult id=SR_gdImageCopyGaussianBlurred><div class=IEntry><a href="../files/gd_filter-c.html#gdImageCopyGaussianBlurred" target=_parent class=ISymbol>gdImageCopyGaussianBlurred</a></div></div><div class=SRResult id=SR_gdImageCopyMerge><div class=IEntry><a href="../files/gd-c.html#gdImageCopyMerge" target=_parent class=ISymbol>gdImageCopyMerge</a></div></div><div class=SRResult id=SR_gdImageCopyMergeGray><div class=IEntry><a href="../files/gd-c.html#gdImageCopyMergeGray" target=_parent class=ISymbol>gdImageCopyMergeGray</a></div></div><div class=SRResult id=SR_gdImageCopyResampled><div class=IEntry><a href="../files/gd-c.html#gdImageCopyResampled" target=_parent class=ISymbol>gdImageCopyResampled</a></div></div><div class=SRResult id=SR_gdImageCopyResized><div class=IEntry><a href="../files/gd-c.html#gdImageCopyResized" target=_parent class=ISymbol>gdImageCopyResized</a></div></div><div class=SRResult id=SR_gdImageCopyRotated><div class=IEntry><a href="../files/gd-c.html#gdImageCopyRotated" target=_parent class=ISymbol>gdImageCopyRotated</a></div></div><div class=SRResult id=SR_gdImageCreate><div class=IEntry><a href="../files/gd-c.html#gdImageCreate" target=_parent class=ISymbol>gdImageCreate</a></div></div><div class=SRResult id=SR_gdImageCreateFromBmp><div class=IEntry><a href="../files/gd_bmp-c.html#gdImageCreateFromBmp" target=_parent class=ISymbol>gdImageCreateFromBmp</a></div></div><div class=SRResult id=SR_gdImageCreateFromBmpCtx><div class=IEntry><a href="../files/gd_bmp-c.html#gdImageCreateFromBmpCtx" target=_parent class=ISymbol>gdImageCreateFromBmpCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromBmpPtr><div class=IEntry><a href="../files/gd_bmp-c.html#gdImageCreateFromBmpPtr" target=_parent class=ISymbol>gdImageCreateFromBmpPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromFile><div class=IEntry><a href="../files/gd_filename-c.html#gdImageCreateFromFile" target=_parent class=ISymbol>gdImageCreateFromFile</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd><div class=IEntry><a href="../files/gd_gd-c.html#gdImageCreateFromGd" target=_parent class=ISymbol>gdImageCreateFromGd</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd2><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageCreateFromGd2" target=_parent class=ISymbol>gdImageCreateFromGd2</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd2Ctx><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageCreateFromGd2Ctx" target=_parent class=ISymbol>gdImageCreateFromGd2Ctx</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd2Part><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageCreateFromGd2Part" target=_parent class=ISymbol>gdImageCreateFromGd2Part</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd2PartCtx><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageCreateFromGd2PartCtx" target=_parent class=ISymbol>gdImageCreateFromGd2PartCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd2PartPtr><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageCreateFromGd2PartPtr" target=_parent class=ISymbol>gdImageCreateFromGd2PartPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromGd2Ptr><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageCreateFromGd2Ptr" target=_parent class=ISymbol>gdImageCreateFromGd2Ptr</a></div></div><div class=SRResult id=SR_gdImageCreateFromGdCtx><div class=IEntry><a href="../files/gd_gd-c.html#gdImageCreateFromGdCtx" target=_parent class=ISymbol>gdImageCreateFromGdCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromGdPtr><div class=IEntry><a href="../files/gd_gd-c.html#gdImageCreateFromGdPtr" target=_parent class=ISymbol>gdImageCreateFromGdPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromGif><div class=IEntry><a href="../files/gd_gif_in-c.html#gdImageCreateFromGif" target=_parent class=ISymbol>gdImageCreateFromGif</a></div></div><div class=SRResult id=SR_gdImageCreateFromGifCtx><div class=IEntry><a href="../files/gd_gif_in-c.html#gdImageCreateFromGifCtx" target=_parent class=ISymbol>gdImageCreateFromGifCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromGifPtr><div class=IEntry><a href="../files/gd_gif_in-c.html#gdImageCreateFromGifPtr" target=_parent class=ISymbol>gdImageCreateFromGifPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromJpeg><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageCreateFromJpeg" target=_parent class=ISymbol>gdImageCreateFromJpeg</a></div></div><div class=SRResult id=SR_gdImageCreateFromJpegCtx><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageCreateFromJpegCtx" target=_parent class=ISymbol>gdImageCreateFromJpegCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromJpegCtxEx><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageCreateFromJpegCtxEx" target=_parent class=ISymbol>gdImageCreateFromJpegCtxEx</a></div></div><div class=SRResult id=SR_gdImageCreateFromJpegEx><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageCreateFromJpegEx" target=_parent class=ISymbol>gdImageCreateFromJpegEx</a></div></div><div class=SRResult id=SR_gdImageCreateFromJpegPtr><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageCreateFromJpegPtr" target=_parent class=ISymbol>gdImageCreateFromJpegPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromJpegPtrEx><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageCreateFromJpegPtrEx" target=_parent class=ISymbol>gdImageCreateFromJpegPtrEx</a></div></div><div class=SRResult id=SR_gdImageCreateFromPng><div class=IEntry><a href="../files/gd_png-c.html#gdImageCreateFromPng" target=_parent class=ISymbol>gdImageCreateFromPng</a></div></div><div class=SRResult id=SR_gdImageCreateFromPngCtx><div class=IEntry><a href="../files/gd_png-c.html#gdImageCreateFromPngCtx" target=_parent class=ISymbol>gdImageCreateFromPngCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromPngPtr><div class=IEntry><a href="../files/gd_png-c.html#gdImageCreateFromPngPtr" target=_parent class=ISymbol>gdImageCreateFromPngPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromPngSource><div class=IEntry><a href="../files/gd_ss-c.html#gdImageCreateFromPngSource" target=_parent class=ISymbol>gdImageCreateFromPngSource</a></div></div><div class=SRResult id=SR_gdImageCreateFromTga><div class=IEntry><a href="../files/gd_tga-c.html#gdImageCreateFromTga" target=_parent class=ISymbol>gdImageCreateFromTga</a></div></div><div class=SRResult id=SR_gdImageCreateFromTgaCtx><div class=IEntry><a href="../files/gd_tga-c.html#gdImageCreateFromTgaCtx" target=_parent class=ISymbol>gdImageCreateFromTgaCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromTgaPtr><div class=IEntry><a href="../files/gd_tga-c.html#gdImageCreateFromTgaPtr" target=_parent class=ISymbol>gdImageCreateFromTgaPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromTIFF><div class=IEntry><a href="../files/gd_tiff-c.html#gdImageCreateFromTIFF" target=_parent class=ISymbol>gdImageCreateFromTIFF</a></div></div><div class=SRResult id=SR_gdImageCreateFromTiffCtx><div class=IEntry><a href="../files/gd_tiff-c.html#gdImageCreateFromTiffCtx" target=_parent class=ISymbol>gdImageCreateFromTiffCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromTiffPtr><div class=IEntry><a href="../files/gd_tiff-c.html#gdImageCreateFromTiffPtr" target=_parent class=ISymbol>gdImageCreateFromTiffPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromWBMP><div class=IEntry><a href="../files/gd_wbmp-c.html#gdImageCreateFromWBMP" target=_parent class=ISymbol>gdImageCreateFromWBMP</a></div></div><div class=SRResult id=SR_gdImageCreateFromWBMPCtx><div class=IEntry><a href="../files/gd_wbmp-c.html#gdImageCreateFromWBMPCtx" target=_parent class=ISymbol>gdImageCreateFromWBMPCtx</a></div></div><div class=SRResult id=SR_gdImageCreateFromWBMPPtr><div class=IEntry><a href="../files/gd_wbmp-c.html#gdImageCreateFromWBMPPtr" target=_parent class=ISymbol>gdImageCreateFromWBMPPtr</a></div></div><div class=SRResult id=SR_gdImageCreateFromXbm><div class=IEntry><a href="../files/gd_xbm-c.html#gdImageCreateFromXbm" target=_parent class=ISymbol>gdImageCreateFromXbm</a></div></div><div class=SRResult id=SR_gdImageCreateFromXpm><div class=IEntry><a href="../files/gdxpm-c.html#gdImageCreateFromXpm" target=_parent class=ISymbol>gdImageCreateFromXpm</a></div></div><div class=SRResult id=SR_gdImageCreatePaletteFromTrueColor><div class=IEntry><a href="../files/gd_topal-c.html#gdImageCreatePaletteFromTrueColor" target=_parent class=ISymbol>gdImageCreatePaletteFromTrueColor</a></div></div><div class=SRResult id=SR_gdImageCreateTrueColor><div class=IEntry><a href="../files/gd-c.html#gdImageCreateTrueColor" target=_parent class=ISymbol>gdImageCreateTrueColor</a></div></div><div class=SRResult id=SR_gdImageCrop><div class=IEntry><a href="../files/gd_crop-c.html#gdImageCrop" target=_parent class=ISymbol>gdImageCrop</a></div></div><div class=SRResult id=SR_gdImageCropAuto><div class=IEntry><a href="../files/gd_crop-c.html#gdImageCropAuto" target=_parent class=ISymbol>gdImageCropAuto</a></div></div><div class=SRResult id=SR_gdImageCropThreshold><div class=IEntry><a href="../files/gd_crop-c.html#gdImageCropThreshold" target=_parent class=ISymbol>gdImageCropThreshold</a></div></div><div class=SRResult id=SR_gdImageDashedLine><div class=IEntry><a href="../files/gd-c.html#gdImageDashedLine" target=_parent class=ISymbol>gdImageDashedLine</a></div></div><div class=SRResult id=SR_gdImageDestroy><div class=IEntry><a href="../files/gd-c.html#gdImageDestroy" target=_parent class=ISymbol>gdImageDestroy</a></div></div><div class=SRResult id=SR_gdImageEdgeDetectQuick><div class=IEntry><a href="../files/gd_filter-c.html#gdImageEdgeDetectQuick" target=_parent class=ISymbol>gdImageEdgeDetectQuick</a></div></div><div class=SRResult id=SR_gdImageEllipse><div class=IEntry><a href="../files/gd-c.html#gdImageEllipse" target=_parent class=ISymbol>gdImageEllipse</a></div></div><div class=SRResult id=SR_gdImageEmboss><div class=IEntry><a href="../files/gd_filter-c.html#gdImageEmboss" target=_parent class=ISymbol>gdImageEmboss</a></div></div><div class=SRResult id=SR_gdImageFile><div class=IEntry><a href="../files/gd_filename-c.html#gdImageFile" target=_parent class=ISymbol>gdImageFile</a></div></div><div class=SRResult id=SR_gdImageFill><div class=IEntry><a href="../files/gd-c.html#gdImageFill" target=_parent class=ISymbol>gdImageFill</a></div></div><div class=SRResult id=SR_gdImageFilledArc><div class=IEntry><a href="../files/gd-c.html#gdImageFilledArc" target=_parent class=ISymbol>gdImageFilledArc</a></div></div><div class=SRResult id=SR_gdImageFilledEllipse><div class=IEntry><a href="../files/gd-c.html#gdImageFilledEllipse" target=_parent class=ISymbol>gdImageFilledEllipse</a></div></div><div class=SRResult id=SR_gdImageFilledPolygon><div class=IEntry><a href="../files/gd-c.html#gdImageFilledPolygon" target=_parent class=ISymbol>gdImageFilledPolygon</a></div></div><div class=SRResult id=SR_gdImageFilledRectangle><div class=IEntry><a href="../files/gd-c.html#gdImageFilledRectangle" target=_parent class=ISymbol>gdImageFilledRectangle</a></div></div><div class=SRResult id=SR_gdImageFillToBorder><div class=IEntry><a href="../files/gd-c.html#gdImageFillToBorder" target=_parent class=ISymbol>gdImageFillToBorder</a></div></div><div class=SRResult id=SR_gdImageFlipBoth><div class=IEntry><a href="../files/gd_transform-c.html#gdImageFlipBoth" target=_parent class=ISymbol>gdImageFlipBoth</a></div></div><div class=SRResult id=SR_gdImageFlipHorizontal><div class=IEntry><a href="../files/gd_transform-c.html#gdImageFlipHorizontal" target=_parent class=ISymbol>gdImageFlipHorizontal</a></div></div><div class=SRResult id=SR_gdImageFlipVertical><div class=IEntry><a href="../files/gd_transform-c.html#gdImageFlipVertical" target=_parent class=ISymbol>gdImageFlipVertical</a></div></div><div class=SRResult id=SR_gdImageGaussianBlur><div class=IEntry><a href="../files/gd_filter-c.html#gdImageGaussianBlur" target=_parent class=ISymbol>gdImageGaussianBlur</a></div></div><div class=SRResult id=SR_gdImageGd><div class=IEntry><a href="../files/gd_gd-c.html#gdImageGd" target=_parent class=ISymbol>gdImageGd</a></div></div><div class=SRResult id=SR_gdImageGd2><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageGd2" target=_parent class=ISymbol>gdImageGd2</a></div></div><div class=SRResult id=SR_gdImageGd2Ptr><div class=IEntry><a href="../files/gd_gd2-c.html#gdImageGd2Ptr" target=_parent class=ISymbol>gdImageGd2Ptr</a></div></div><div class=SRResult id=SR_gdImageGdPtr><div class=IEntry><a href="../files/gd_gd-c.html#gdImageGdPtr" target=_parent class=ISymbol>gdImageGdPtr</a></div></div><div class=SRResult id=SR_gdImageGetClip><div class=IEntry><a href="../files/gd-c.html#gdImageGetClip" target=_parent class=ISymbol>gdImageGetClip</a></div></div><div class=SRResult id=SR_gdImageGetInterpolationMethod><div class=IEntry><a href="../files/gd_interpolation-c.html#gdImageGetInterpolationMethod" target=_parent class=ISymbol>gdImageGetInterpolationMethod</a></div></div><div class=SRResult id=SR_gdImageGetPixel><div class=IEntry><a href="../files/gd-c.html#gdImageGetPixel" target=_parent class=ISymbol>gdImageGetPixel</a></div></div><div class=SRResult id=SR_gdImageGetTrueColorPixel><div class=IEntry><a href="../files/gd-c.html#gdImageGetTrueColorPixel" target=_parent class=ISymbol>gdImageGetTrueColorPixel</a></div></div><div class=SRResult id=SR_gdImageGif><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGif" target=_parent class=ISymbol>gdImageGif</a></div></div><div class=SRResult id=SR_gdImageGifAnim><div class=IEntry><a href="../files/gd-h.html#gdImageGifAnim" target=_parent class=ISymbol>gdImageGifAnim</a></div></div><div class=SRResult id=SR_gdImageGifAnimAdd><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimAdd" target=_parent class=ISymbol>gdImageGifAnimAdd</a></div></div><div class=SRResult id=SR_gdImageGifAnimAddCtx><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimAddCtx" target=_parent class=ISymbol>gdImageGifAnimAddCtx</a></div></div><div class=SRResult id=SR_gdImageGifAnimAddPtr><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimAddPtr" target=_parent class=ISymbol>gdImageGifAnimAddPtr</a></div></div><div class=SRResult id=SR_gdImageGifAnimBegin><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimBegin" target=_parent class=ISymbol>gdImageGifAnimBegin</a></div></div><div class=SRResult id=SR_gdImageGifAnimBeginCtx><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimBeginCtx" target=_parent class=ISymbol>gdImageGifAnimBeginCtx</a></div></div><div class=SRResult id=SR_gdImageGifAnimBeginPtr><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimBeginPtr" target=_parent class=ISymbol>gdImageGifAnimBeginPtr</a></div></div><div class=SRResult id=SR_gdImageGifAnimEnd><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimEnd" target=_parent class=ISymbol>gdImageGifAnimEnd</a></div></div><div class=SRResult id=SR_gdImageGifAnimEndCtx><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimEndCtx" target=_parent class=ISymbol>gdImageGifAnimEndCtx</a></div></div><div class=SRResult id=SR_gdImageGifAnimEndPtr><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifAnimEndPtr" target=_parent class=ISymbol>gdImageGifAnimEndPtr</a></div></div><div class=SRResult id=SR_gdImageGifCtx><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifCtx" target=_parent class=ISymbol>gdImageGifCtx</a></div></div><div class=SRResult id=SR_gdImageGifPtr><div class=IEntry><a href="../files/gd_gif_out-c.html#gdImageGifPtr" target=_parent class=ISymbol>gdImageGifPtr</a></div></div><div class=SRResult id=SR_gdImageGrayScale><div class=IEntry><a href="../files/gd_filter-c.html#gdImageGrayScale" target=_parent class=ISymbol>gdImageGrayScale</a></div></div><div class=SRResult id=SR_gdImageInterlace><div class=IEntry><a href="../files/gd-c.html#gdImageInterlace" target=_parent class=ISymbol>gdImageInterlace</a></div></div><div class=SRResult id=SR_gdImageJpeg><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageJpeg" target=_parent class=ISymbol>gdImageJpeg</a></div></div><div class=SRResult id=SR_gdImageJpegCtx><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageJpegCtx" target=_parent class=ISymbol>gdImageJpegCtx</a></div></div><div class=SRResult id=SR_gdImageJpegPtr><div class=IEntry><a href="../files/gd_jpeg-c.html#gdImageJpegPtr" target=_parent class=ISymbol>gdImageJpegPtr</a></div></div><div class=SRResult id=SR_gdImageLine><div class=IEntry><a href="../files/gd-c.html#gdImageLine" target=_parent class=ISymbol>gdImageLine</a></div></div><div class=SRResult id=SR_gdImageMeanRemoval><div class=IEntry><a href="../files/gd_filter-c.html#gdImageMeanRemoval" target=_parent class=ISymbol>gdImageMeanRemoval</a></div></div><div class=SRResult id=SR_gdImageNegate><div class=IEntry><a href="../files/gd_filter-c.html#gdImageNegate" target=_parent class=ISymbol>gdImageNegate</a></div></div><div class=SRResult id=SR_gdImageNeuQuant><div class=IEntry><a href="../files/gd_nnquant-c.html#gdImageNeuQuant" target=_parent class=ISymbol>gdImageNeuQuant</a></div></div><div class=SRResult id=SR_gdImageOpenPolygon><div class=IEntry><a href="../files/gd-c.html#gdImageOpenPolygon" target=_parent class=ISymbol>gdImageOpenPolygon</a></div></div><div class=SRResult id=SR_gdImagePaletteCopy><div class=IEntry><a href="../files/gd-c.html#gdImagePaletteCopy" target=_parent class=ISymbol>gdImagePaletteCopy</a></div></div><div class=SRResult id=SR_gdImagePaletteToTrueColor><div class=IEntry><a href="../files/gd-c.html#gdImagePaletteToTrueColor" target=_parent class=ISymbol>gdImagePaletteToTrueColor</a></div></div><div class=SRResult id=SR_gdImagePixelate><div class=IEntry><a href="../files/gd_filter-c.html#gdImagePixelate" target=_parent class=ISymbol>gdImagePixelate</a></div></div><div class=SRResult id=SR_gdImagePng><div class=IEntry><a href="../files/gd_png-c.html#gdImagePng" target=_parent class=ISymbol>gdImagePng</a></div></div><div class=SRResult id=SR_gdImagePngCtx><div class=IEntry><a href="../files/gd_png-c.html#gdImagePngCtx" target=_parent class=ISymbol>gdImagePngCtx</a></div></div><div class=SRResult id=SR_gdImagePngCtxEx><div class=IEntry><a href="../files/gd_png-c.html#gdImagePngCtxEx" target=_parent class=ISymbol>gdImagePngCtxEx</a></div></div><div class=SRResult id=SR_gdImagePngEx><div class=IEntry><a href="../files/gd_png-c.html#gdImagePngEx" target=_parent class=ISymbol>gdImagePngEx</a></div></div><div class=SRResult id=SR_gdImagePngPtr><div class=IEntry><a href="../files/gd_png-c.html#gdImagePngPtr" target=_parent class=ISymbol>gdImagePngPtr</a></div></div><div class=SRResult id=SR_gdImagePngPtrEx><div class=IEntry><a href="../files/gd_png-c.html#gdImagePngPtrEx" target=_parent class=ISymbol>gdImagePngPtrEx</a></div></div><div class=SRResult id=SR_gdImagePngToSink><div class=IEntry><a href="../files/gd_ss-c.html#gdImagePngToSink" target=_parent class=ISymbol>gdImagePngToSink</a></div></div><div class=SRResult id=SR_gdImagePolygon><div class=IEntry><a href="../files/gd-c.html#gdImagePolygon" target=_parent class=ISymbol>gdImagePolygon</a></div></div><div class=SRResult id=SR_gdImagePtr><div class=IEntry><a href="../files/gd-h.html#gdImagePtr" target=_parent class=ISymbol>gdImagePtr</a></div></div><div class=SRResult id=SR_gdImageRectangle><div class=IEntry><a href="../files/gd-c.html#gdImageRectangle" target=_parent class=ISymbol>gdImageRectangle</a></div></div><div class=SRResult id=SR_gdImageRotateInterpolated><div class=IEntry><a href="../files/gd_interpolation-c.html#gdImageRotateInterpolated" target=_parent class=ISymbol>gdImageRotateInterpolated</a></div></div><div class=SRResult id=SR_gdImageSaveAlpha><div class=IEntry><a href="../files/gd-c.html#gdImageSaveAlpha" target=_parent class=ISymbol>gdImageSaveAlpha</a></div></div><div class=SRResult id=SR_gdImageScale><div class=IEntry><a href="../files/gd_interpolation-c.html#gdImageScale" target=_parent class=ISymbol>gdImageScale</a></div></div><div class=SRResult id=SR_gdImageScatter><div class=IEntry><a href="../files/gd_filter-c.html#gdImageScatter" target=_parent class=ISymbol>gdImageScatter</a></div></div><div class=SRResult id=SR_gdImageScatterColor><div class=IEntry><a href="../files/gd_filter-c.html#gdImageScatterColor" target=_parent class=ISymbol>gdImageScatterColor</a></div></div><div class=SRResult id=SR_gdImageScatterEx><div class=IEntry><a href="../files/gd_filter-c.html#gdImageScatterEx" target=_parent class=ISymbol>gdImageScatterEx</a></div></div><div class=SRResult id=SR_gdImageSelectiveBlur><div class=IEntry><a href="../files/gd_filter-c.html#gdImageSelectiveBlur" target=_parent class=ISymbol>gdImageSelectiveBlur</a></div></div><div class=SRResult id=SR_gdImageSetAntiAliased><div class=IEntry><a href="../files/gd-c.html#gdImageSetAntiAliased" target=_parent class=ISymbol>gdImageSetAntiAliased</a></div></div><div class=SRResult id=SR_gdImageSetAntiAliasedDontBlend><div class=IEntry><a href="../files/gd-c.html#gdImageSetAntiAliasedDontBlend" target=_parent class=ISymbol>gdImageSetAntiAliasedDontBlend</a></div></div><div class=SRResult id=SR_gdImageSetBrush><div class=IEntry><a href="../files/gd-c.html#gdImageSetBrush" target=_parent class=ISymbol>gdImageSetBrush</a></div></div><div class=SRResult id=SR_gdImageSetClip><div class=IEntry><a href="../files/gd-c.html#gdImageSetClip" target=_parent class=ISymbol>gdImageSetClip</a></div></div><div class=SRResult id=SR_gdImageSetInterpolationMethod><div class=IEntry><a href="../files/gd_interpolation-c.html#gdImageSetInterpolationMethod" target=_parent class=ISymbol>gdImageSetInterpolationMethod</a></div></div><div class=SRResult id=SR_gdImageSetPixel><div class=IEntry><a href="../files/gd-c.html#gdImageSetPixel" target=_parent class=ISymbol>gdImageSetPixel</a></div></div><div class=SRResult id=SR_gdImageSetResolution><div class=IEntry><a href="../files/gd-c.html#gdImageSetResolution" target=_parent class=ISymbol>gdImageSetResolution</a></div></div><div class=SRResult id=SR_gdImageSetStyle><div class=IEntry><a href="../files/gd-c.html#gdImageSetStyle" target=_parent class=ISymbol>gdImageSetStyle</a></div></div><div class=SRResult id=SR_gdImageSetThickness><div class=IEntry><a href="../files/gd-c.html#gdImageSetThickness" target=_parent class=ISymbol>gdImageSetThickness</a></div></div><div class=SRResult id=SR_gdImageSetTile><div class=IEntry><a href="../files/gd-c.html#gdImageSetTile" target=_parent class=ISymbol>gdImageSetTile</a></div></div><div class=SRResult id=SR_gdImageSharpen><div class=IEntry><a href="../files/gdfx-c.html#gdImageSharpen" target=_parent class=ISymbol>gdImageSharpen</a></div></div><div class=SRResult id=SR_gdImageSmooth><div class=IEntry><a href="../files/gd_filter-c.html#gdImageSmooth" target=_parent class=ISymbol>gdImageSmooth</a></div></div><div class=SRResult id=SR_gdImageSquareToCircle><div class=IEntry><a href="../files/gdfx-c.html#gdImageSquareToCircle" target=_parent class=ISymbol>gdImageSquareToCircle</a></div></div><div class=SRResult id=SR_gdImageString><div class=IEntry><a href="../files/gd-c.html#gdImageString" target=_parent class=ISymbol>gdImageString</a></div></div><div class=SRResult id=SR_gdImageString16><div class=IEntry><a href="../files/gd-c.html#gdImageString16" target=_parent class=ISymbol>gdImageString16</a></div></div><div class=SRResult id=SR_gdImageStringFT><div class=IEntry><a href="../files/gdft-c.html#gdImageStringFT" target=_parent class=ISymbol>gdImageStringFT</a></div></div><div class=SRResult id=SR_gdImageStringFTCircle><div class=IEntry><a href="../files/gdfx-c.html#gdImageStringFTCircle" target=_parent class=ISymbol>gdImageStringFTCircle</a></div></div><div class=SRResult id=SR_gdImageStringFTEx><div class=IEntry><a href="../files/gdft-c.html#gdImageStringFTEx" target=_parent class=ISymbol>gdImageStringFTEx</a></div></div><div class=SRResult id=SR_gdImageStringTTF><div class=IEntry><a href="../files/gdft-c.html#gdImageStringTTF" target=_parent class=ISymbol>gdImageStringTTF</a></div></div><div class=SRResult id=SR_gdImageStringUp><div class=IEntry><a href="../files/gd-c.html#gdImageStringUp" target=_parent class=ISymbol>gdImageStringUp</a></div></div><div class=SRResult id=SR_gdImageStringUp16><div class=IEntry><a href="../files/gd-c.html#gdImageStringUp16" target=_parent class=ISymbol>gdImageStringUp16</a></div></div><div class=SRResult id=SR_gdImageTiff><div class=IEntry><a href="../files/gd_tiff-c.html#gdImageTiff" target=_parent class=ISymbol>gdImageTiff</a></div></div><div class=SRResult id=SR_gdImageTiffCtx><div class=IEntry><a href="../files/gd_tiff-c.html#gdImageTiffCtx" target=_parent class=ISymbol>gdImageTiffCtx</a></div></div><div class=SRResult id=SR_gdImageTiffPtr><div class=IEntry><a href="../files/gd_tiff-c.html#gdImageTiffPtr" target=_parent class=ISymbol>gdImageTiffPtr</a></div></div><div class=SRResult id=SR_gdImageTrueColorToPalette><div class=IEntry><a href="../files/gd_topal-c.html#gdImageTrueColorToPalette" target=_parent class=ISymbol>gdImageTrueColorToPalette</a></div></div><div class=SRResult id=SR_gdImageTrueColorToPaletteSetMethod><div class=IEntry><a href="../files/gd_topal-c.html#gdImageTrueColorToPaletteSetMethod" target=_parent class=ISymbol>gdImageTrueColorToPaletteSetMethod</a></div></div><div class=SRResult id=SR_gdImageTrueColorToPaletteSetQuality><div class=IEntry><a href="../files/gd_topal-c.html#gdImageTrueColorToPaletteSetQuality" target=_parent class=ISymbol>gdImageTrueColorToPaletteSetQuality</a></div></div><div class=SRResult id=SR_gdImageWBMP><div class=IEntry><a href="../files/gd_wbmp-c.html#gdImageWBMP" target=_parent class=ISymbol>gdImageWBMP</a></div></div><div class=SRResult id=SR_gdImageWBMPCtx><div class=IEntry><a href="../files/gd_wbmp-c.html#gdImageWBMPCtx" target=_parent class=ISymbol>gdImageWBMPCtx</a></div></div><div class=SRResult id=SR_gdImageWBMPPtr><div class=IEntry><a href="../files/gd_wbmp-c.html#gdImageWBMPPtr" target=_parent class=ISymbol>gdImageWBMPPtr</a></div></div><div class=SRResult id=SR_gdImageWebp><div class=IEntry><a href="../files/gd_webp-c.html#gdImageWebp" target=_parent class=ISymbol>gdImageWebp</a></div></div><div class=SRResult id=SR_gdImageWebpEx><div class=IEntry><a href="../files/gd_webp-c.html#gdImageWebpEx" target=_parent class=ISymbol>gdImageWebpEx</a></div></div><div class=SRResult id=SR_gdImageWebpPtr><div class=IEntry><a href="../files/gd_webp-c.html#gdImageWebpPtr" target=_parent class=ISymbol>gdImageWebpPtr</a></div></div><div class=SRResult id=SR_gdImageWebpPtrEx><div class=IEntry><a href="../files/gd_webp-c.html#gdImageWebpPtrEx" target=_parent class=ISymbol>gdImageWebpPtrEx</a></div></div><div class=SRResult id=SR_gdImageXbmCtx><div class=IEntry><a href="../files/gd_xbm-c.html#gdImageXbmCtx" target=_parent class=ISymbol>gdImageXbmCtx</a></div></div><div class=SRResult id=SR_gdInterpolationMethod><div class=IEntry><a href="../files/gd-h.html#gdInterpolationMethod" target=_parent class=ISymbol>gdInterpolationMethod</a></div></div><div class=SRResult id=SR_gdIOCtx><div class=IEntry><a href="../files/gd_io-h.html#gdIOCtx" target=_parent class=ISymbol>gdIOCtx</a></div></div><div class=SRResult id=SR_gdLayerMultiply><div class=IEntry><a href="../files/gd-c.html#gdLayerMultiply" target=_parent class=ISymbol>gdLayerMultiply</a></div></div><div class=SRResult id=SR_gdLayerOverlay><div class=IEntry><a href="../files/gd-c.html#gdLayerOverlay" target=_parent class=ISymbol>gdLayerOverlay</a></div></div><div class=SRResult id=SR_gdMajorVersion><div class=IEntry><a href="../files/gd_version-c.html#gdMajorVersion" target=_parent class=ISymbol>gdMajorVersion</a></div></div><div class=SRResult id=SR_gdMinorVersion><div class=IEntry><a href="../files/gd_version-c.html#gdMinorVersion" target=_parent class=ISymbol>gdMinorVersion</a></div></div><div class=SRResult id=SR_gdNewDynamicCtx><div class=IEntry><a href="../files/gd_io_dp-c.html#gdNewDynamicCtx" target=_parent class=ISymbol>gdNewDynamicCtx</a></div></div><div class=SRResult id=SR_gdNewDynamicCtxEx><div class=IEntry><a href="../files/gd_io_dp-c.html#gdNewDynamicCtxEx" target=_parent class=ISymbol>gdNewDynamicCtxEx</a></div></div><div class=SRResult id=SR_gdNewFileCtx><div class=IEntry><a href="../files/gd_io_file-c.html#gdNewFileCtx" target=_parent class=ISymbol>gdNewFileCtx</a></div></div><div class=SRResult id=SR_gdNewSSCtx><div class=IEntry><a href="../files/gd_io_ss-c.html#gdNewSSCtx" target=_parent class=ISymbol>gdNewSSCtx</a></div></div><div class=SRResult id=SR_gdPoint><div class=IEntry><a href="../files/gd-h.html#gdPoint" target=_parent class=ISymbol>gdPoint</a></div></div><div class=SRResult id=SR_gdPointF><div class=IEntry><a href="../files/gd-h.html#gdPointF" target=_parent class=ISymbol>gdPointF</a></div></div><div class=SRResult id=SR_gdPointFPtr><div class=IEntry><a href="../files/gd-h.html#gdPointFPtr" target=_parent class=ISymbol>gdPointFPtr</a></div></div><div class=SRResult id=SR_gdPointPtr><div class=IEntry><a href="../files/gd-h.html#gdPointPtr" target=_parent class=ISymbol>gdPointPtr</a></div></div><div class=SRResult id=SR_gdReleaseVersion><div class=IEntry><a href="../files/gd_version-c.html#gdReleaseVersion" target=_parent class=ISymbol>gdReleaseVersion</a></div></div><div class=SRResult id=SR_gdSetErrorMethod><div class=IEntry><a href="../files/gd-c.html#gdSetErrorMethod" target=_parent class=ISymbol>gdSetErrorMethod</a></div></div><div class=SRResult id=SR_gdSink><div class=IEntry><a href="../files/gd-h.html#gdSink" target=_parent class=ISymbol>gdSink</a></div></div><div class=SRResult id=SR_gdSinkPtr><div class=IEntry><a href="../files/gd-h.html#gdSinkPtr" target=_parent class=ISymbol>gdSinkPtr</a></div></div><div class=SRResult id=SR_gdSource><div class=IEntry><a href="../files/gd-h.html#gdSource" target=_parent class=ISymbol>gdSource</a></div></div><div class=SRResult id=SR_gdSourcePtr><div class=IEntry><a href="../files/gd-h.html#gdSourcePtr" target=_parent class=ISymbol>gdSourcePtr</a></div></div><div class=SRResult id=SR_gdSupportsFileType><div class=IEntry><a href="../files/gd_filename-c.html#gdSupportsFileType" target=_parent class=ISymbol>gdSupportsFileType</a></div></div><div class=SRResult id=SR_gdTransformAffineBoundingBox><div class=IEntry><a href="../files/gd_interpolation-c.html#gdTransformAffineBoundingBox" target=_parent class=ISymbol>gdTransformAffineBoundingBox</a></div></div><div class=SRResult id=SR_gdTransformAffineCopy><div class=IEntry><a href="../files/gd_interpolation-c.html#gdTransformAffineCopy" target=_parent class=ISymbol>gdTransformAffineCopy</a></div></div><div class=SRResult id=SR_gdTransformAffineGetImage><div class=IEntry><a href="../files/gd_interpolation-c.html#gdTransformAffineGetImage" target=_parent class=ISymbol>gdTransformAffineGetImage</a></div></div><div class=SRResult id=SR_gdVersionString><div class=IEntry><a href="../files/gd_version-c.html#gdVersionString" target=_parent class=ISymbol>gdVersionString</a></div></div><div class=SRResult id=SR_GifAnim><div class=IEntry><a href="../files/gd-h.html#GifAnim" target=_parent class=ISymbol>GifAnim</a></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
    -document.getElementById("Loading").style.display="none";
    -document.getElementById("NoMatches").style.display="none";
    -var searchResults = new SearchResults("searchResults", "HTML");
    -searchResults.Search();
    ---></script></div><script language=JavaScript><!--
    -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralL.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralL.html
    deleted file mode 100644
    index fb31b79d32d..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralL.html
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    -
    -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="PopupSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
    -if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
    -
    -<!--  Generated by Natural Docs, version 1.51 -->
    -<!--  http://www.naturaldocs.org  -->
    -
    -<!-- saved from url=(0026)http://www.naturaldocs.org -->
    -
    -
    -
    -
    -<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_License><div class=IEntry><a href="../files/license-txt.html#License" target=_parent class=ISymbol>License</a></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
    -document.getElementById("Loading").style.display="none";
    -document.getElementById("NoMatches").style.display="none";
    -var searchResults = new SearchResults("searchResults", "HTML");
    -searchResults.Search();
    ---></script></div><script language=JavaScript><!--
    -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralM.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralM.html
    deleted file mode 100644
    index 057e2bb660b..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralM.html
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    -
    -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="PopupSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
    -if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
    -
    -<!--  Generated by Natural Docs, version 1.51 -->
    -<!--  http://www.naturaldocs.org  -->
    -
    -<!-- saved from url=(0026)http://www.naturaldocs.org -->
    -
    -
    -
    -
    -<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_Matrix><div class=IEntry><a href="../files/gd_matrix-c.html#Matrix" target=_parent class=ISymbol>Matrix</a></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
    -document.getElementById("Loading").style.display="none";
    -document.getElementById("NoMatches").style.display="none";
    -var searchResults = new SearchResults("searchResults", "HTML");
    -searchResults.Search();
    ---></script></div><script language=JavaScript><!--
    -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralNumbers.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralNumbers.html
    deleted file mode 100644
    index 0bb2ff07a01..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralNumbers.html
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    -
    -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="PopupSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
    -if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
    -
    -<!--  Generated by Natural Docs, version 1.51 -->
    -<!--  http://www.naturaldocs.org  -->
    -
    -<!-- saved from url=(0026)http://www.naturaldocs.org -->
    -
    -
    -
    -
    -<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_3><div class=IEntry><a href="../files/preamble-txt.html#About_LibGD_2.2.3" target=_parent class=ISymbol>3</a>, <span class=IParent>About LibGD 2::<wbr>2</span></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
    -document.getElementById("Loading").style.display="none";
    -document.getElementById("NoMatches").style.display="none";
    -var searchResults = new SearchResults("searchResults", "HTML");
    -searchResults.Search();
    ---></script></div><script language=JavaScript><!--
    -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralT.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralT.html
    deleted file mode 100644
    index 45b4bec096e..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/GeneralT.html
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    -
    -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="PopupSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
    -if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
    -
    -<!--  Generated by Natural Docs, version 1.51 -->
    -<!--  http://www.naturaldocs.org  -->
    -
    -<!-- saved from url=(0026)http://www.naturaldocs.org -->
    -
    -
    -
    -
    -<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_Transform><div class=IEntry><a href="javascript:searchResults.Toggle('SR_Transform')" class=ISymbol>Transform</a><div class=ISubIndex><a href="../files/gd-h.html#Transform" target=_parent class=IFile>gd.h</a><a href="../files/gd_interpolation-c.html#Transform" target=_parent class=IFile>gd_interpolation.c</a></div></div></div><div class=SRResult id=SR_Types><div class=IEntry><a href="javascript:searchResults.Toggle('SR_Types')" class=ISymbol>Types</a><div class=ISubIndex><a href="../files/gd-h.html#Types" target=_parent class=IFile>gd.h</a><a href="../files/gd_io-h.html#Types" target=_parent class=IFile>gd_io.h</a></div></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
    -document.getElementById("Loading").style.display="none";
    -document.getElementById("NoMatches").style.display="none";
    -var searchResults = new SearchResults("searchResults", "HTML");
    -searchResults.Search();
    ---></script></div><script language=JavaScript><!--
    -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/NoResults.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/NoResults.html
    deleted file mode 100644
    index 5ce7717677f..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/NoResults.html
    +++ /dev/null
    @@ -1,15 +0,0 @@
    -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    -
    -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="PopupSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
    -if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
    -
    -<!--  Generated by Natural Docs, version 1.51 -->
    -<!--  http://www.naturaldocs.org  -->
    -
    -<!-- saved from url=(0026)http://www.naturaldocs.org -->
    -
    -
    -
    -
    -<div id=Index><div class=SRStatus id=NoMatches>No Matches</div></div><script language=JavaScript><!--
    -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/TypesG.html b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/TypesG.html
    deleted file mode 100644
    index 7f794f89329..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/search/TypesG.html
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
    -
    -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="PopupSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
    -if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
    -
    -<!--  Generated by Natural Docs, version 1.51 -->
    -<!--  http://www.naturaldocs.org  -->
    -
    -<!-- saved from url=(0026)http://www.naturaldocs.org -->
    -
    -
    -
    -
    -<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_gdFont><div class=IEntry><a href="../files/gd-h.html#gdFont" target=_parent class=ISymbol>gdFont</a></div></div><div class=SRResult id=SR_gdFontPtr><div class=IEntry><a href="../files/gd-h.html#gdFontPtr" target=_parent class=ISymbol>gdFontPtr</a></div></div><div class=SRResult id=SR_gdFTStringExtra><div class=IEntry><a href="../files/gd-h.html#gdFTStringExtra" target=_parent class=ISymbol>gdFTStringExtra</a></div></div><div class=SRResult id=SR_gdFTStringExtraPtr><div class=IEntry><a href="../files/gd-h.html#gdFTStringExtraPtr" target=_parent class=ISymbol>gdFTStringExtraPtr</a></div></div><div class=SRResult id=SR_gdImage><div class=IEntry><a href="../files/gd-h.html#gdImage" target=_parent class=ISymbol>gdImage</a></div></div><div class=SRResult id=SR_gdImagePtr><div class=IEntry><a href="../files/gd-h.html#gdImagePtr" target=_parent class=ISymbol>gdImagePtr</a></div></div><div class=SRResult id=SR_gdIOCtx><div class=IEntry><a href="../files/gd_io-h.html#gdIOCtx" target=_parent class=ISymbol>gdIOCtx</a></div></div><div class=SRResult id=SR_gdPoint><div class=IEntry><a href="../files/gd-h.html#gdPoint" target=_parent class=ISymbol>gdPoint</a></div></div><div class=SRResult id=SR_gdPointF><div class=IEntry><a href="../files/gd-h.html#gdPointF" target=_parent class=ISymbol>gdPointF</a></div></div><div class=SRResult id=SR_gdPointFPtr><div class=IEntry><a href="../files/gd-h.html#gdPointFPtr" target=_parent class=ISymbol>gdPointFPtr</a></div></div><div class=SRResult id=SR_gdPointPtr><div class=IEntry><a href="../files/gd-h.html#gdPointPtr" target=_parent class=ISymbol>gdPointPtr</a></div></div><div class=SRResult id=SR_gdSink><div class=IEntry><a href="../files/gd-h.html#gdSink" target=_parent class=ISymbol>gdSink</a></div></div><div class=SRResult id=SR_gdSinkPtr><div class=IEntry><a href="../files/gd-h.html#gdSinkPtr" target=_parent class=ISymbol>gdSinkPtr</a></div></div><div class=SRResult id=SR_gdSource><div class=IEntry><a href="../files/gd-h.html#gdSource" target=_parent class=ISymbol>gdSource</a></div></div><div class=SRResult id=SR_gdSourcePtr><div class=IEntry><a href="../files/gd-h.html#gdSourcePtr" target=_parent class=ISymbol>gdSourcePtr</a></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
    -document.getElementById("Loading").style.display="none";
    -document.getElementById("NoMatches").style.display="none";
    -var searchResults = new SearchResults("searchResults", "HTML");
    -searchResults.Search();
    ---></script></div><script language=JavaScript><!--
    -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/styles/main.css b/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/styles/main.css
    deleted file mode 100644
    index 511703fc455..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/html/styles/main.css
    +++ /dev/null
    @@ -1,828 +0,0 @@
    -/*
    -   IMPORTANT: If you're editing this file in the output directory of one of
    -   your projects, your changes will be overwritten the next time you run
    -   Natural Docs.  Instead, copy this file to your project directory, make your
    -   changes, and you can use it with -s.  Even better would be to make a CSS
    -   file in your project directory with only your changes, which you can then
    -   use with -s [original style] [your changes].
    -
    -   On the other hand, if you're editing this file in the Natural Docs styles
    -   directory, the changes will automatically be applied to all your projects
    -   that use this style the next time Natural Docs is run on them.
    -
    -   This file is part of Natural Docs, which is Copyright © 2003-2010 Greg Valure.
    -   Natural Docs is licensed under version 3 of the GNU Affero General Public
    -   License (AGPL).  Refer to License.txt for the complete details.
    -
    -   This file may be distributed with documentation files generated by Natural Docs.
    -   Such documentation is not covered by Natural Docs' copyright and licensing,
    -   and may have its own copyright and distribution terms as decided by its author.
    -*/
    -
    -body {
    -    font: 10pt Verdana, Arial, sans-serif;
    -    color: #000000;
    -    margin: 0; padding: 0;
    -    }
    -
    -.ContentPage,
    -.IndexPage,
    -.FramedMenuPage {
    -    background-color: #E8E8E8;
    -    }
    -.FramedContentPage,
    -.FramedIndexPage,
    -.FramedSearchResultsPage,
    -.PopupSearchResultsPage {
    -    background-color: #FFFFFF;
    -    }
    -
    -
    -a:link,
    -a:visited { color: #900000; text-decoration: none }
    -a:hover { color: #900000; text-decoration: underline }
    -a:active { color: #FF0000; text-decoration: underline }
    -
    -td {
    -    vertical-align: top }
    -
    -img { border: 0;  }
    -
    -
    -/*
    -    Comment out this line to use web-style paragraphs (blank line between
    -    paragraphs, no indent) instead of print-style paragraphs (no blank line,
    -    indented.)
    -*/
    -p {
    -    text-indent: 5ex; margin: 0 }
    -
    -
    -/*  Opera doesn't break with just wbr, but will if you add this.  */
    -.Opera wbr:after {
    -	content: "\00200B";
    -	}
    -
    -
    -/*  Blockquotes are used as containers for things that may need to scroll.  */
    -blockquote {
    -    padding: 0;
    -    margin: 0;
    -    overflow: auto;
    -    }
    -
    -
    -.Firefox1 blockquote {
    -    padding-bottom: .5em;
    -    }
    -
    -/*  Turn off scrolling when printing.  */
    -@media print {
    -    blockquote {
    -        overflow: visible;
    -        }
    -    .IE blockquote {
    -        width: auto;
    -        }
    -    }
    -
    -
    -
    -#Menu {
    -    font-size: 9pt;
    -    padding: 10px 0 0 0;
    -    }
    -.ContentPage #Menu,
    -.IndexPage #Menu {
    -    position: absolute;
    -    top: 0;
    -    left: 0;
    -    width: 31ex;
    -    overflow: hidden;
    -    }
    -.ContentPage .Firefox #Menu,
    -.IndexPage .Firefox #Menu {
    -    width: 27ex;
    -    }
    -
    -
    -    .MTitle {
    -        font-size: 16pt; font-weight: bold; font-variant: small-caps;
    -        text-align: center;
    -        padding: 5px 10px 15px 10px;
    -        border-bottom: 1px dotted #000000;
    -        margin-bottom: 15px }
    -
    -    .MSubTitle {
    -        font-size: 9pt; font-weight: normal; font-variant: normal;
    -        margin-top: 1ex; margin-bottom: 5px }
    -
    -
    -    .MEntry a:link,
    -    .MEntry a:hover,
    -    .MEntry a:visited { color: #606060; margin-right: 0 }
    -    .MEntry a:active { color: #A00000; margin-right: 0 }
    -
    -
    -    .MGroup {
    -        font-variant: small-caps; font-weight: bold;
    -        margin: 1em 0 1em 10px;
    -        }
    -
    -    .MGroupContent {
    -        font-variant: normal; font-weight: normal }
    -
    -    .MGroup a:link,
    -    .MGroup a:hover,
    -    .MGroup a:visited { color: #545454; margin-right: 10px }
    -    .MGroup a:active { color: #A00000; margin-right: 10px }
    -
    -
    -    .MFile,
    -    .MText,
    -    .MLink,
    -    .MIndex {
    -        padding: 1px 17px 2px 10px;
    -        margin: .25em 0 .25em 0;
    -        }
    -
    -    .MText {
    -        font-size: 8pt; font-style: italic }
    -
    -    .MLink {
    -        font-style: italic }
    -
    -    #MSelected {
    -        color: #000000; background-color: #FFFFFF;
    -        /*  Replace padding with border.  */
    -        padding: 0 10px 0 10px;
    -        border-width: 1px 2px 2px 0; border-style: solid; border-color: #000000;
    -        margin-right: 5px;
    -        }
    -
    -    /*  Close off the left side when its in a group.  */
    -    .MGroup #MSelected {
    -        padding-left: 9px; border-left-width: 1px }
    -
    -    /*  A treat for Mozilla users.  Blatantly non-standard.  Will be replaced with CSS 3 attributes when finalized/supported.  */
    -    .Firefox #MSelected {
    -        -moz-border-radius-topright: 10px;
    -        -moz-border-radius-bottomright: 10px }
    -    .Firefox .MGroup #MSelected {
    -        -moz-border-radius-topleft: 10px;
    -        -moz-border-radius-bottomleft: 10px }
    -
    -
    -    #MSearchPanel {
    -        padding: 0px 6px;
    -        margin: .25em 0;
    -        }
    -
    -
    -    #MSearchField {
    -        font: italic 9pt Verdana, sans-serif;
    -        color: #606060;
    -        background-color: #E8E8E8;
    -        border: none;
    -        padding: 2px 4px;
    -        width: 100%;
    -        }
    -    /* Only Opera gets it right. */
    -    .Firefox #MSearchField,
    -    .IE #MSearchField,
    -    .Safari #MSearchField {
    -        width: 94%;
    -        }
    -    .Opera9 #MSearchField,
    -    .Konqueror #MSearchField {
    -        width: 97%;
    -        }
    -    .FramedMenuPage .Firefox #MSearchField,
    -    .FramedMenuPage .Safari #MSearchField,
    -    .FramedMenuPage .Konqueror #MSearchField {
    -        width: 98%;
    -        }
    -
    -    /* Firefox doesn't do this right in frames without #MSearchPanel added on.
    -        It's presence doesn't hurt anything other browsers. */
    -    #MSearchPanel.MSearchPanelInactive:hover #MSearchField {
    -        background-color: #FFFFFF;
    -        border: 1px solid #C0C0C0;
    -        padding: 1px 3px;
    -        }
    -    .MSearchPanelActive #MSearchField {
    -        background-color: #FFFFFF;
    -        border: 1px solid #C0C0C0;
    -        font-style: normal;
    -        padding: 1px 3px;
    -        }
    -
    -    #MSearchType {
    -        visibility: hidden;
    -        font: 8pt Verdana, sans-serif;
    -        width: 98%;
    -        padding: 0;
    -        border: 1px solid #C0C0C0;
    -        }
    -    .MSearchPanelActive #MSearchType,
    -    /*  As mentioned above, Firefox doesn't do this right in frames without #MSearchPanel added on. */
    -    #MSearchPanel.MSearchPanelInactive:hover #MSearchType,
    -    #MSearchType:focus {
    -        visibility: visible;
    -        color: #606060;
    -        }
    -    #MSearchType option#MSearchEverything {
    -        font-weight: bold;
    -        }
    -
    -    .Opera8 .MSearchPanelInactive:hover,
    -    .Opera8 .MSearchPanelActive {
    -        margin-left: -1px;
    -        }
    -
    -
    -    iframe#MSearchResults {
    -        width: 60ex;
    -        height: 15em;
    -        }
    -    #MSearchResultsWindow {
    -        display: none;
    -        position: absolute;
    -        left: 0; top: 0;
    -        border: 1px solid #000000;
    -        background-color: #E8E8E8;
    -        }
    -    #MSearchResultsWindowClose {
    -        font-weight: bold;
    -        font-size: 8pt;
    -        display: block;
    -        padding: 2px 5px;
    -        }
    -    #MSearchResultsWindowClose:link,
    -    #MSearchResultsWindowClose:visited {
    -        color: #000000;
    -        text-decoration: none;
    -        }
    -    #MSearchResultsWindowClose:active,
    -    #MSearchResultsWindowClose:hover {
    -        color: #800000;
    -        text-decoration: none;
    -        background-color: #F4F4F4;
    -        }
    -
    -
    -
    -
    -#Content {
    -    padding-bottom: 15px;
    -    }
    -
    -.ContentPage #Content {
    -    border-width: 0 0 1px 1px;
    -    border-style: solid;
    -    border-color: #000000;
    -    background-color: #FFFFFF;
    -    font-size: 9pt;  /* To make 31ex match the menu's 31ex. */
    -    margin-left: 31ex;
    -    }
    -.ContentPage .Firefox #Content {
    -    margin-left: 27ex;
    -    }
    -
    -
    -
    -    .CTopic {
    -        font-size: 10pt;
    -        margin-bottom: 3em;
    -        }
    -
    -
    -    .CTitle {
    -        font-size: 12pt; font-weight: bold;
    -        border-width: 0 0 1px 0; border-style: solid; border-color: #A0A0A0;
    -        margin: 0 15px .5em 15px }
    -
    -    .CGroup .CTitle {
    -        font-size: 16pt; font-variant: small-caps;
    -        padding-left: 15px; padding-right: 15px;
    -        border-width: 0 0 2px 0; border-color: #000000;
    -        margin-left: 0; margin-right: 0 }
    -
    -    .CClass .CTitle,
    -    .CInterface .CTitle,
    -    .CDatabase .CTitle,
    -    .CDatabaseTable .CTitle,
    -    .CSection .CTitle {
    -        font-size: 18pt;
    -        color: #FFFFFF; background-color: #A0A0A0;
    -        padding: 10px 15px 10px 15px;
    -        border-width: 2px 0; border-color: #000000;
    -        margin-left: 0; margin-right: 0 }
    -
    -    #MainTopic .CTitle {
    -        font-size: 20pt;
    -        color: #FFFFFF; background-color: #7070C0;
    -        padding: 10px 15px 10px 15px;
    -        border-width: 0 0 3px 0; border-color: #000000;
    -        margin-left: 0; margin-right: 0 }
    -
    -    .CBody {
    -        margin-left: 15px; margin-right: 15px }
    -
    -
    -    .CToolTip {
    -        position: absolute; visibility: hidden;
    -        left: 0; top: 0;
    -        background-color: #FFFFE0;
    -        padding: 5px;
    -        border-width: 1px 2px 2px 1px; border-style: solid; border-color: #000000;
    -        font-size: 8pt;
    -        }
    -
    -    .Opera .CToolTip {
    -        max-width: 98%;
    -        }
    -
    -    /*  Scrollbars would be useless.  */
    -    .CToolTip blockquote {
    -        overflow: hidden;
    -        }
    -    .IE6 .CToolTip blockquote {
    -        overflow: visible;
    -        }
    -
    -    .CHeading {
    -        font-weight: bold; font-size: 10pt;
    -        margin: 1.5em 0 .5em 0;
    -        }
    -
    -    .CBody pre {
    -        font: 10pt "Courier New", Courier, monospace;
    -	    background-color: #FCFCFC;
    -	    margin: 1em 35px;
    -	    padding: 10px 15px 10px 10px;
    -	    border-color: #E0E0E0 #E0E0E0 #E0E0E0 #E4E4E4;
    -	    border-width: 1px 1px 1px 6px;
    -	    border-style: dashed dashed dashed solid;
    -        }
    -
    -    .CBody ul {
    -        /*  I don't know why CBody's margin doesn't apply, but it's consistent across browsers so whatever.
    -             Reapply it here as padding.  */
    -        padding-left: 15px; padding-right: 15px;
    -        margin: .5em 5ex .5em 5ex;
    -        }
    -
    -    .CDescriptionList {
    -        margin: .5em 5ex 0 5ex }
    -
    -        .CDLEntry {
    -            font: 10pt "Courier New", Courier, monospace; color: #808080;
    -            padding-bottom: .25em;
    -            white-space: nowrap }
    -
    -        .CDLDescription {
    -            font-size: 10pt;  /*  For browsers that don't inherit correctly, like Opera 5.  */
    -            padding-bottom: .5em; padding-left: 5ex }
    -
    -
    -    .CTopic img {
    -        text-align: center;
    -        display: block;
    -        margin: 1em auto;
    -        }
    -    .CImageCaption {
    -        font-variant: small-caps;
    -        font-size: 8pt;
    -        color: #808080;
    -        text-align: center;
    -        position: relative;
    -        top: 1em;
    -        }
    -
    -    .CImageLink {
    -        color: #808080;
    -        font-style: italic;
    -        }
    -    a.CImageLink:link,
    -    a.CImageLink:visited,
    -    a.CImageLink:hover { color: #808080 }
    -
    -
    -
    -
    -
    -.Prototype {
    -    font: 10pt "Courier New", Courier, monospace;
    -    padding: 5px 3ex;
    -    border-width: 1px; border-style: solid;
    -    margin: 0 5ex 1.5em 5ex;
    -    }
    -
    -    .Prototype td {
    -        font-size: 10pt;
    -        }
    -
    -    .PDefaultValue,
    -    .PDefaultValuePrefix,
    -    .PTypePrefix {
    -        color: #8F8F8F;
    -        }
    -    .PTypePrefix {
    -        text-align: right;
    -        }
    -    .PAfterParameters {
    -        vertical-align: bottom;
    -        }
    -
    -    .IE .Prototype table {
    -        padding: 0;
    -        }
    -
    -    .CFunction .Prototype {
    -        background-color: #F4F4F4; border-color: #D0D0D0 }
    -    .CProperty .Prototype {
    -        background-color: #F4F4FF; border-color: #C0C0E8 }
    -    .CVariable .Prototype {
    -        background-color: #FFFFF0; border-color: #E0E0A0 }
    -
    -    .CClass .Prototype {
    -        border-width: 1px 2px 2px 1px; border-style: solid; border-color: #A0A0A0;
    -        background-color: #F4F4F4;
    -        }
    -    .CInterface .Prototype {
    -        border-width: 1px 2px 2px 1px; border-style: solid; border-color: #A0A0D0;
    -        background-color: #F4F4FF;
    -        }
    -
    -    .CDatabaseIndex .Prototype,
    -    .CConstant .Prototype {
    -        background-color: #D0D0D0; border-color: #000000 }
    -    .CType .Prototype,
    -    .CEnumeration .Prototype {
    -        background-color: #FAF0F0; border-color: #E0B0B0;
    -        }
    -    .CDatabaseTrigger .Prototype,
    -    .CEvent .Prototype,
    -    .CDelegate .Prototype {
    -        background-color: #F0FCF0; border-color: #B8E4B8 }
    -
    -    .CToolTip .Prototype {
    -        margin: 0 0 .5em 0;
    -        white-space: nowrap;
    -        }
    -
    -
    -
    -
    -
    -.Summary {
    -    margin: 1.5em 5ex 0 5ex }
    -
    -    .STitle {
    -        font-size: 12pt; font-weight: bold;
    -        margin-bottom: .5em }
    -
    -
    -    .SBorder {
    -        background-color: #FFFFF0;
    -        padding: 15px;
    -        border: 1px solid #C0C060 }
    -
    -    /* In a frame IE 6 will make them too long unless you set the width to 100%.  Without frames it will be correct without a width
    -        or slightly too long (but not enough to scroll) with a width.  This arbitrary weirdness simply astounds me.  IE 7 has the same
    -        problem with frames, haven't tested it without.  */
    -    .FramedContentPage .IE .SBorder {
    -        width: 100% }
    -
    -    /*  A treat for Mozilla users.  Blatantly non-standard.  Will be replaced with CSS 3 attributes when finalized/supported.  */
    -    .Firefox .SBorder {
    -        -moz-border-radius: 20px }
    -
    -
    -    .STable {
    -        font-size: 9pt; width: 100% }
    -
    -    .SEntry {
    -        width: 30% }
    -    .SDescription {
    -        width: 70% }
    -
    -
    -    .SMarked {
    -        background-color: #F8F8D8 }
    -
    -    .SDescription { padding-left: 2ex }
    -    .SIndent1 .SEntry { padding-left: 1.5ex }   .SIndent1 .SDescription { padding-left: 3.5ex }
    -    .SIndent2 .SEntry { padding-left: 3.0ex }   .SIndent2 .SDescription { padding-left: 5.0ex }
    -    .SIndent3 .SEntry { padding-left: 4.5ex }   .SIndent3 .SDescription { padding-left: 6.5ex }
    -    .SIndent4 .SEntry { padding-left: 6.0ex }   .SIndent4 .SDescription { padding-left: 8.0ex }
    -    .SIndent5 .SEntry { padding-left: 7.5ex }   .SIndent5 .SDescription { padding-left: 9.5ex }
    -
    -    .SDescription a { color: #800000}
    -    .SDescription a:active { color: #A00000 }
    -
    -    .SGroup td {
    -        padding-top: .5em; padding-bottom: .25em }
    -
    -    .SGroup .SEntry {
    -        font-weight: bold; font-variant: small-caps }
    -
    -    .SGroup .SEntry a { color: #800000 }
    -    .SGroup .SEntry a:active { color: #F00000 }
    -
    -
    -    .SMain td,
    -    .SClass td,
    -    .SDatabase td,
    -    .SDatabaseTable td,
    -    .SSection td {
    -        font-size: 10pt;
    -        padding-bottom: .25em }
    -
    -    .SClass td,
    -    .SDatabase td,
    -    .SDatabaseTable td,
    -    .SSection td {
    -        padding-top: 1em }
    -
    -    .SMain .SEntry,
    -    .SClass .SEntry,
    -    .SDatabase .SEntry,
    -    .SDatabaseTable .SEntry,
    -    .SSection .SEntry {
    -        font-weight: bold;
    -        }
    -
    -    .SMain .SEntry a,
    -    .SClass .SEntry a,
    -    .SDatabase .SEntry a,
    -    .SDatabaseTable .SEntry a,
    -    .SSection .SEntry a { color: #000000 }
    -
    -    .SMain .SEntry a:active,
    -    .SClass .SEntry a:active,
    -    .SDatabase .SEntry a:active,
    -    .SDatabaseTable .SEntry a:active,
    -    .SSection .SEntry a:active { color: #A00000 }
    -
    -
    -
    -
    -
    -.ClassHierarchy {
    -    margin: 0 15px 1em 15px }
    -
    -    .CHEntry {
    -        border-width: 1px 2px 2px 1px; border-style: solid; border-color: #A0A0A0;
    -        margin-bottom: 3px;
    -        padding: 2px 2ex;
    -        font-size: 10pt;
    -        background-color: #F4F4F4; color: #606060;
    -        }
    -
    -    .Firefox .CHEntry {
    -        -moz-border-radius: 4px;
    -        }
    -
    -    .CHCurrent .CHEntry {
    -        font-weight: bold;
    -        border-color: #000000;
    -        color: #000000;
    -        }
    -
    -    .CHChildNote .CHEntry {
    -        font-style: italic;
    -        font-size: 8pt;
    -        }
    -
    -    .CHIndent {
    -        margin-left: 3ex;
    -        }
    -
    -    .CHEntry a:link,
    -    .CHEntry a:visited,
    -    .CHEntry a:hover {
    -        color: #606060;
    -        }
    -    .CHEntry a:active {
    -        color: #800000;
    -        }
    -
    -
    -
    -
    -
    -#Index {
    -    background-color: #FFFFFF;
    -    }
    -
    -/*  As opposed to .PopupSearchResultsPage #Index  */
    -.IndexPage #Index,
    -.FramedIndexPage #Index,
    -.FramedSearchResultsPage #Index {
    -    padding: 15px;
    -    }
    -
    -.IndexPage #Index {
    -    border-width: 0 0 1px 1px;
    -    border-style: solid;
    -    border-color: #000000;
    -    font-size: 9pt;  /* To make 27ex match the menu's 27ex. */
    -    margin-left: 27ex;
    -    }
    -
    -
    -    .IPageTitle {
    -        font-size: 20pt; font-weight: bold;
    -        color: #FFFFFF; background-color: #7070C0;
    -        padding: 10px 15px 10px 15px;
    -        border-width: 0 0 3px 0; border-color: #000000; border-style: solid;
    -        margin: -15px -15px 0 -15px }
    -
    -    .FramedSearchResultsPage .IPageTitle {
    -        margin-bottom: 15px;
    -        }
    -
    -    .INavigationBar {
    -        font-size: 10pt;
    -        text-align: center;
    -        background-color: #FFFFF0;
    -        padding: 5px;
    -        border-bottom: solid 1px black;
    -        margin: 0 -15px 15px -15px;
    -        }
    -
    -    .INavigationBar a {
    -        font-weight: bold }
    -
    -    .IHeading {
    -        font-size: 16pt; font-weight: bold;
    -        padding: 2.5em 0 .5em 0;
    -        text-align: center;
    -        width: 3.5ex;
    -        }
    -    #IFirstHeading {
    -        padding-top: 0;
    -        }
    -
    -    .IEntry {
    -        font-size: 10pt;
    -        padding-left: 1ex;
    -        }
    -    .PopupSearchResultsPage .IEntry {
    -        font-size: 8pt;
    -        padding: 1px 5px;
    -        }
    -    .PopupSearchResultsPage .Opera9 .IEntry,
    -    .FramedSearchResultsPage .Opera9 .IEntry {
    -        text-align: left;
    -        }
    -    .FramedSearchResultsPage .IEntry {
    -        padding: 0;
    -        }
    -
    -    .ISubIndex {
    -        padding-left: 3ex; padding-bottom: .5em }
    -    .PopupSearchResultsPage .ISubIndex {
    -        display: none;
    -        }
    -
    -    /*  While it may cause some entries to look like links when they aren't, I found it's much easier to read the
    -         index if everything's the same color.  */
    -    .ISymbol {
    -        font-weight: bold; color: #900000  }
    -
    -    .IndexPage .ISymbolPrefix,
    -    .FramedIndexPage .ISymbolPrefix {
    -        font-size: 10pt;
    -        text-align: right;
    -        color: #C47C7C;
    -        background-color: #F8F8F8;
    -        border-right: 3px solid #E0E0E0;
    -        border-left: 1px solid #E0E0E0;
    -        padding: 0 1px 0 2px;
    -        }
    -    .PopupSearchResultsPage .ISymbolPrefix,
    -    .FramedSearchResultsPage .ISymbolPrefix {
    -        color: #900000;
    -        }
    -    .PopupSearchResultsPage .ISymbolPrefix {
    -        font-size: 8pt;
    -        }
    -
    -    .IndexPage #IFirstSymbolPrefix,
    -    .FramedIndexPage #IFirstSymbolPrefix {
    -        border-top: 1px solid #E0E0E0;
    -        }
    -    .IndexPage #ILastSymbolPrefix,
    -    .FramedIndexPage #ILastSymbolPrefix {
    -        border-bottom: 1px solid #E0E0E0;
    -        }
    -    .IndexPage #IOnlySymbolPrefix,
    -    .FramedIndexPage #IOnlySymbolPrefix {
    -        border-top: 1px solid #E0E0E0;
    -        border-bottom: 1px solid #E0E0E0;
    -        }
    -
    -    a.IParent,
    -    a.IFile {
    -        display: block;
    -        }
    -
    -    .PopupSearchResultsPage .SRStatus {
    -        padding: 2px 5px;
    -        font-size: 8pt;
    -        font-style: italic;
    -        }
    -    .FramedSearchResultsPage .SRStatus {
    -        font-size: 10pt;
    -        font-style: italic;
    -        }
    -
    -    .SRResult {
    -        display: none;
    -        }
    -
    -
    -
    -#Footer {
    -    font-size: 8pt;
    -    color: #989898;
    -    text-align: right;
    -    }
    -
    -#Footer p {
    -    text-indent: 0;
    -    margin-bottom: .5em;
    -    }
    -
    -.ContentPage #Footer,
    -.IndexPage #Footer {
    -    text-align: right;
    -    margin: 2px;
    -    }
    -
    -.FramedMenuPage #Footer {
    -    text-align: center;
    -    margin: 5em 10px 10px 10px;
    -    padding-top: 1em;
    -    border-top: 1px solid #C8C8C8;
    -    }
    -
    -    #Footer a:link,
    -    #Footer a:hover,
    -    #Footer a:visited { color: #989898 }
    -    #Footer a:active { color: #A00000 }
    -
    -
    -
    -.prettyprint .kwd { color: #800000; }  /* keywords */
    -
    -    .prettyprint.PDefaultValue .kwd,
    -    .prettyprint.PDefaultValuePrefix .kwd,
    -    .prettyprint.PTypePrefix .kwd {
    -        color: #C88F8F;
    -        }
    -
    -.prettyprint .com { color: #008000; }  /* comments */
    -
    -    .prettyprint.PDefaultValue .com,
    -    .prettyprint.PDefaultValuePrefix .com,
    -    .prettyprint.PTypePrefix .com {
    -        color: #8FC88F;
    -        }
    -
    -.prettyprint .str { color: #0000B0; }  /* strings */
    -.prettyprint .lit { color: #0000B0; }  /* literals */
    -
    -    .prettyprint.PDefaultValue .str,
    -    .prettyprint.PDefaultValuePrefix .str,
    -    .prettyprint.PTypePrefix .str,
    -    .prettyprint.PDefaultValue .lit,
    -    .prettyprint.PDefaultValuePrefix .lit,
    -    .prettyprint.PTypePrefix .lit {
    -        color: #8F8FC0;
    -        }
    -
    -.prettyprint .typ { color: #000000; }  /* types */
    -.prettyprint .pun { color: #000000; }  /* punctuation */
    -.prettyprint .pln { color: #000000; }  /* punctuation */
    -
    -    .prettyprint.PDefaultValue .typ,
    -    .prettyprint.PDefaultValuePrefix .typ,
    -    .prettyprint.PTypePrefix .typ,
    -    .prettyprint.PDefaultValue .pun,
    -    .prettyprint.PDefaultValuePrefix .pun,
    -    .prettyprint.PTypePrefix .pun,
    -    .prettyprint.PDefaultValue .pln,
    -    .prettyprint.PDefaultValuePrefix .pln,
    -    .prettyprint.PTypePrefix .pln {
    -        color: #8F8F8F;
    -        }
    -
    -.prettyprint .tag { color: #008; }
    -.prettyprint .atn { color: #606; }
    -.prettyprint .atv { color: #080; }
    -.prettyprint .dec { color: #606; }
    -
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/images/edge_detect_quick.jpg b/Build/source/libs/gd/libgd-src/docs/naturaldocs/images/edge_detect_quick.jpg
    new file mode 100644
    index 00000000000..015fd4f562a
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/docs/naturaldocs/images/edge_detect_quick.jpg differ
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/images/emboss.jpg b/Build/source/libs/gd/libgd-src/docs/naturaldocs/images/emboss.jpg
    new file mode 100644
    index 00000000000..b818fd56d74
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/docs/naturaldocs/images/emboss.jpg differ
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/images/mean_removal.jpg b/Build/source/libs/gd/libgd-src/docs/naturaldocs/images/mean_removal.jpg
    new file mode 100644
    index 00000000000..d3f9c1191c8
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/docs/naturaldocs/images/mean_removal.jpg differ
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/images/smooth.jpg b/Build/source/libs/gd/libgd-src/docs/naturaldocs/images/smooth.jpg
    new file mode 100644
    index 00000000000..e6987b8ee49
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/docs/naturaldocs/images/smooth.jpg differ
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/license.txt b/Build/source/libs/gd/libgd-src/docs/naturaldocs/license.txt
    deleted file mode 100644
    index 4164bce4bc7..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/license.txt
    +++ /dev/null
    @@ -1,74 +0,0 @@
    -Title: License
    -
    -Credits and license terms:
    -
    -> In order to resolve any possible confusion regarding the authorship of
    -> gd, the following copyright statement covers all of the authors who
    -> have required such a statement. If you are aware of any oversights in
    -> this copyright notice, please contact Pierre-A. Joye who will be
    -> pleased to correct them.
    ->
    ->    Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
    ->    2002, 2003, 2004 by Cold Spring Harbor Laboratory. Funded under
    ->    Grant P41-RR02188 by the National Institutes of Health.
    ->
    ->    Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
    ->    2004 by Boutell.Com, Inc.
    ->
    ->    Portions relating to GD2 format copyright 1999, 2000, 2001, 2002,
    ->    2003, 2004 Philip Warner.
    ->
    ->    Portions relating to PNG copyright 1999, 2000, 2001, 2002, 2003,
    ->    2004 Greg Roelofs.
    ->
    ->    Portions relating to gdttf.c copyright 1999, 2000, 2001, 2002,
    ->    2003, 2004 John Ellson (ellson@graphviz.org).
    ->
    ->    Portions relating to gdft.c copyright 2001, 2002, 2003, 2004 John
    ->    Ellson (ellson@graphviz.org).
    ->
    ->    Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
    ->    Pierre-Alain Joye (pierre@libgd.org).
    ->
    ->    Portions relating to JPEG and to color quantization copyright
    ->    2000, 2001, 2002, 2003, 2004, Doug Becker and copyright (C) 1994,
    ->    1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Thomas
    ->    G. Lane. This software is based in part on the work of the
    ->    Independent JPEG Group. See the file README-JPEG.TXT for more
    ->    information.
    ->
    ->    Portions relating to GIF compression copyright 1989 by Jef
    ->    Poskanzer and David Rowley, with modifications for thread safety
    ->    by Thomas Boutell.
    ->
    ->    Portions relating to GIF decompression copyright 1990, 1991, 1993
    ->    by David Koblas, with modifications for thread safety by Thomas
    ->    Boutell.
    ->
    ->    Portions relating to WBMP copyright 2000, 2001, 2002, 2003, 2004
    ->    Maurice Szmurlo and Johan Van den Brande.
    ->
    ->    Portions relating to GIF animations copyright 2004 Jaakko Hyvätti
    ->    (jaakko.hyvatti@iki.fi)
    ->
    -> Permission has been granted to copy, distribute and modify gd in
    -> any context without fee, including a commercial application,
    -> provided that this notice is present in user-accessible supporting
    -> documentation.
    ->
    -> This does not affect your ownership of the derived work itself,
    -> and the intent is to assure proper credit for the authors of gd,
    -> not to interfere with your productive use of gd. If you have
    -> questions, ask. "Derived works" includes all programs that utilize
    -> the library. Credit must be given in user-accessible
    -> documentation.
    ->
    -> This software is provided "AS IS." The copyright holders disclaim
    -> all warranties, either express or implied, including but not
    -> limited to implied warranties of merchantability and fitness for a
    -> particular purpose, with respect to this code and accompanying
    -> documentation.
    ->
    -> Although their code does not appear in the current release, the
    -> authors also wish to thank Hutchison Avenue Software Corporation
    -> for their prior contributions.
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/.gitignore b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/.gitignore
    new file mode 100644
    index 00000000000..b2a97404820
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/.gitignore
    @@ -0,0 +1,2 @@
    +Languages.txt
    +Topics.txt
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ClassHierarchy.nd b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ClassHierarchy.nd
    deleted file mode 100644
    index 9bf4c341903..00000000000
    Binary files a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ClassHierarchy.nd and /dev/null differ
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ConfigFileInfo.nd b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ConfigFileInfo.nd
    deleted file mode 100644
    index d0e533439f6..00000000000
    Binary files a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ConfigFileInfo.nd and /dev/null differ
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/FileInfo.nd b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/FileInfo.nd
    deleted file mode 100644
    index fbd8f6f918c..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/FileInfo.nd
    +++ /dev/null
    @@ -1,96 +0,0 @@
    -1.51
    -C/C++
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_rotate.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_rotate.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/wbmp.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/wbmp.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_io_stream.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_io_stream.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_color_map_test.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_color_map_test.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd2time.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd2time.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/entities.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/entities.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_io_ss.c	1469089233	1	gdNewSSCtx
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfontl.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfontl.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/config.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/config.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdft.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdft.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfontg.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfontg.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_errors.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_errors.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdxpm.c	1469089233	1	gdImageCreateFromXpm
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfonts.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfonts.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_transform.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_transform.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_io_dp.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_io_dp.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd2togif.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd2togif.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfontl.c	1469089233	1	gdFontGetLarge
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/testac.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/testac.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_gd2.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_gd2.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd2topng.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd2topng.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_version.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_version.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/license.txt	1469089233	1	License
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/fontsizetest.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/fontsizetest.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/bmp.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/bmp.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_nnquant.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_nnquant.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfontt.c	1469089233	1	gdFontGetTiny
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfonts.c	1469089233	1	gdFontGetSmall
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdtopng.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdtopng.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_jpeg.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_jpeg.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_intern.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_intern.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_color.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_color.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/snprintf.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/snprintf.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd.h	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/pngtogd.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/pngtogd.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_matrix.c	1469089233	1	Matrix
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_webp.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_webp.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdparttopng.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdparttopng.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/preamble.txt	1469089233	1	About LibGD 2.2.3
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdhelpers.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdhelpers.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfontt.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfontt.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdhelpers.c	1469089233	1	gdFree
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/testtr.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/testtr.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/fontconfigtest.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/fontconfigtest.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdkanji.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdkanji.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_color_map.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_color_map.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/pngtogd2.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/pngtogd2.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_color.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_color.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_nnquant.c	1469089233	1	gdImageNeuQuant
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_interpolation.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_interpolation.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/fontwheeltest.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/fontwheeltest.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdpp.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdpp.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_io_file.c	1469089233	1	gdNewFileCtx
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfx.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfx.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_wbmp.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_wbmp.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_gif_out.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_gif_out.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_color_match.c	1469089233	1	gdImageColorMatch
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdcache.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdcache.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_gif_in.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_gif_in.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_filter.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_filter.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/annotate.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/annotate.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdtables.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdtables.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfontg.c	1469089233	1	gdFontGetGiant
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gddemo.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gddemo.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdcache.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdcache.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_ss.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_ss.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_tga.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_tga.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd2copypal.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd2copypal.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_topal.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_topal.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_io.h	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_io.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/jisx0208.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/jisx0208.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdcmpgif.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdcmpgif.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_crop.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_crop.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_gd.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_gd.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/wbmp.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/wbmp.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_filename.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_filename.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_tiff.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_tiff.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/giftogd2.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/giftogd2.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfontmb.c	1469089233	1	gdFontGetMediumBold
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_bmp.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_bmp.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfontmb.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfontmb.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdtest.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdtest.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_png.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_png.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/circletexttest.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/circletexttest.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfx.h	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdfx.h
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/webpng.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/webpng.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gifanimtest.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gifanimtest.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_io.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_io.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_color_map.c	1469089233	1	gdColorMapLookup
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gdtestft.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gdtestft.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_tga.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_tga.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_xbm.c	1469089233	1	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_xbm.c
    -/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_security.c	1469089233	0	/home/pierre/project/libgd/docs/naturaldocs/tmp/gd_security.c
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ImageFileInfo.nd b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ImageFileInfo.nd
    deleted file mode 100644
    index b6cb43bc50d..00000000000
    Binary files a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ImageFileInfo.nd and /dev/null differ
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ImageReferenceTable.nd b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ImageReferenceTable.nd
    deleted file mode 100644
    index b6cb43bc50d..00000000000
    Binary files a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/ImageReferenceTable.nd and /dev/null differ
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/IndexInfo.nd b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/IndexInfo.nd
    deleted file mode 100644
    index e6a97241975..00000000000
    Binary files a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/IndexInfo.nd and /dev/null differ
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/PreviousMenuState.nd b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/PreviousMenuState.nd
    deleted file mode 100644
    index 0330e17a382..00000000000
    Binary files a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/PreviousMenuState.nd and /dev/null differ
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/PreviousSettings.nd b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/PreviousSettings.nd
    deleted file mode 100644
    index 0a6ffce7bf5..00000000000
    Binary files a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/PreviousSettings.nd and /dev/null differ
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/SymbolTable.nd b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/SymbolTable.nd
    deleted file mode 100644
    index 20a121e502c..00000000000
    Binary files a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Data/SymbolTable.nd and /dev/null differ
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Languages.txt b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Languages.txt
    deleted file mode 100644
    index 85d5fde477b..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Languages.txt
    +++ /dev/null
    @@ -1,113 +0,0 @@
    -Format: 1.51
    -
    -# This is the Natural Docs languages file for this project.  If you change
    -# anything here, it will apply to THIS PROJECT ONLY.  If you'd like to change
    -# something for all your projects, edit the Languages.txt in Natural Docs'
    -# Config directory instead.
    -
    -
    -# You can prevent certain file extensions from being scanned like this:
    -# Ignore Extensions: [extension] [extension] ...
    -
    -
    -#-------------------------------------------------------------------------------
    -# SYNTAX:
    -#
    -# Unlike other Natural Docs configuration files, in this file all comments
    -# MUST be alone on a line.  Some languages deal with the # character, so you
    -# cannot put comments on the same line as content.
    -#
    -# Also, all lists are separated with spaces, not commas, again because some
    -# languages may need to use them.
    -#
    -# Language: [name]
    -# Alter Language: [name]
    -#    Defines a new language or alters an existing one.  Its name can use any
    -#    characters.  If any of the properties below have an add/replace form, you
    -#    must use that when using Alter Language.
    -#
    -#    The language Shebang Script is special.  It's entry is only used for
    -#    extensions, and files with those extensions have their shebang (#!) lines
    -#    read to determine the real language of the file.  Extensionless files are
    -#    always treated this way.
    -#
    -#    The language Text File is also special.  It's treated as one big comment
    -#    so you can put Natural Docs content in them without special symbols.  Also,
    -#    if you don't specify a package separator, ignored prefixes, or enum value
    -#    behavior, it will copy those settings from the language that is used most
    -#    in the source tree.
    -#
    -# Extensions: [extension] [extension] ...
    -# [Add/Replace] Extensions: [extension] [extension] ...
    -#    Defines the file extensions of the language's source files.  You can
    -#    redefine extensions found in the main languages file.  You can use * to
    -#    mean any undefined extension.
    -#
    -# Shebang Strings: [string] [string] ...
    -# [Add/Replace] Shebang Strings: [string] [string] ...
    -#    Defines a list of strings that can appear in the shebang (#!) line to
    -#    designate that it's part of the language.  You can redefine strings found
    -#    in the main languages file.
    -#
    -# Ignore Prefixes in Index: [prefix] [prefix] ...
    -# [Add/Replace] Ignored Prefixes in Index: [prefix] [prefix] ...
    -#
    -# Ignore [Topic Type] Prefixes in Index: [prefix] [prefix] ...
    -# [Add/Replace] Ignored [Topic Type] Prefixes in Index: [prefix] [prefix] ...
    -#    Specifies prefixes that should be ignored when sorting symbols in an
    -#    index.  Can be specified in general or for a specific topic type.
    -#
    -#------------------------------------------------------------------------------
    -# For basic language support only:
    -#
    -# Line Comments: [symbol] [symbol] ...
    -#    Defines a space-separated list of symbols that are used for line comments,
    -#    if any.
    -#
    -# Block Comments: [opening sym] [closing sym] [opening sym] [closing sym] ...
    -#    Defines a space-separated list of symbol pairs that are used for block
    -#    comments, if any.
    -#
    -# Package Separator: [symbol]
    -#    Defines the default package separator symbol.  The default is a dot.
    -#
    -# [Topic Type] Prototype Enders: [symbol] [symbol] ...
    -#    When defined, Natural Docs will attempt to get a prototype from the code
    -#    immediately following the topic type.  It stops when it reaches one of
    -#    these symbols.  Use \n for line breaks.
    -#
    -# Line Extender: [symbol]
    -#    Defines the symbol that allows a prototype to span multiple lines if
    -#    normally a line break would end it.
    -#
    -# Enum Values: [global|under type|under parent]
    -#    Defines how enum values are referenced.  The default is global.
    -#    global       - Values are always global, referenced as 'value'.
    -#    under type   - Values are under the enum type, referenced as
    -#               'package.enum.value'.
    -#    under parent - Values are under the enum's parent, referenced as
    -#               'package.value'.
    -#
    -# Perl Package: [perl package]
    -#    Specifies the Perl package used to fine-tune the language behavior in ways
    -#    too complex to do in this file.
    -#
    -#------------------------------------------------------------------------------
    -# For full language support only:
    -#
    -# Full Language Support: [perl package]
    -#    Specifies the Perl package that has the parsing routines necessary for full
    -#    language support.
    -#
    -#-------------------------------------------------------------------------------
    -
    -# The following languages are defined in the main file, if you'd like to alter
    -# them:
    -#
    -#    Text File, Shebang Script, C/C++, C#, Java, JavaScript, Perl, Python,
    -#    PHP, SQL, Visual Basic, Pascal, Assembly, Ada, Tcl, Ruby, Makefile,
    -#    ActionScript, ColdFusion, R, Fortran
    -
    -# If you add a language that you think would be useful to other developers
    -# and should be included in Natural Docs by default, please e-mail it to
    -# languages [at] naturaldocs [dot] org.
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Menu.txt b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Menu.txt
    index 8837a961a73..f12369ea948 100644
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Menu.txt
    +++ b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Menu.txt
    @@ -1,4 +1,4 @@
    -Format: 1.51
    +Format: 1.52
     
     
     # You can add a title and sub-title to your menu like this:
    @@ -46,48 +46,57 @@ Format: 1.51
     # --------------------------------------------------------------------------
     
     
    -File: About LibGD 2.2.3  (preamble.txt)
    +File: About LibGD 2.3.0-dev  (no auto-title, preamble.txt)
    +
    +Group: Image Formats  {
    +
    +   File: BMP IO  (no auto-title, gd_bmp.c)
    +   File: GD IO  (no auto-title, gd_gd.c)
    +   File: GD2 IO  (no auto-title, gd_gd2.c)
    +   File: GIF Input  (no auto-title, gd_gif_in.c)
    +   File: GIF Output  (no auto-title, gd_gif_out.c)
    +   File: JPEG IO  (no auto-title, gd_jpeg.c)
    +   File: PNG IO  (no auto-title, gd_png.c)
    +   File: TGA Input  (no auto-title, gd_tga.c)
    +   File: TIFF IO  (no auto-title, gd_tiff.c)
    +   File: WBMP IO  (no auto-title, gd_wbmp.c)
    +   File: WebP IO  (no auto-title, gd_webp.c)
    +   File: XBM IO  (no auto-title, gd_xbm.c)
    +   File: XPM Input  (no auto-title, gdxpm.c)
    +   }  # Group: Image Formats
    +
     File: gd.c  (gd.c)
     File: gd.h  (gd.h)
    -File: gd_bmp.c  (gd_bmp.c)
     File: gd_crop.c  (gd_crop.c)
     File: gd_filename.c  (gd_filename.c)
     File: gd_filter.c  (gd_filter.c)
    -File: gd_gd.c  (gd_gd.c)
    -File: gd_gd2.c  (gd_gd2.c)
    -File: gd_gif_in.c  (gd_gif_in.c)
    -File: gd_gif_out.c  (gd_gif_out.c)
     File: gd_interpolation.c  (gd_interpolation.c)
     File: gd_io.h  (gd_io.h)
     File: gd_io_dp.c  (gd_io_dp.c)
    -File: gd_jpeg.c  (gd_jpeg.c)
    -File: gd_png.c  (gd_png.c)
     File: gd_ss.c  (gd_ss.c)
    -File: gd_tga.c  (gd_tga.c)
    -File: gd_tiff.c  (gd_tiff.c)
     File: gd_topal.c  (gd_topal.c)
     File: gd_transform.c  (gd_transform.c)
     File: gd_version.c  (gd_version.c)
    -File: gd_wbmp.c  (gd_wbmp.c)
    -File: gd_webp.c  (gd_webp.c)
    -File: gd_xbm.c  (gd_xbm.c)
     File: gdColorMapLookup  (gd_color_map.c)
    -File: gdFontGetGiant  (gdfontg.c)
    -File: gdFontGetLarge  (gdfontl.c)
    -File: gdFontGetMediumBold  (gdfontmb.c)
    -File: gdFontGetSmall  (gdfonts.c)
    -File: gdFontGetTiny  (gdfontt.c)
     File: gdFree  (gdhelpers.c)
     File: gdft.c  (gdft.c)
     File: gdfx.c  (gdfx.c)
     File: gdImageColorMatch  (gd_color_match.c)
    -File: gdImageCreateFromXpm  (gdxpm.c)
     File: gdImageNeuQuant  (gd_nnquant.c)
     File: gdNewFileCtx  (gd_io_file.c)
     File: gdNewSSCtx  (gd_io_ss.c)
     File: License  (license.txt)
     File: Matrix  (gd_matrix.c)
     
    +Group: Built-in Fonts  {
    +
    +   File: Giant Font  (no auto-title, gdfontg.c)
    +   File: Large Font  (no auto-title, gdfontl.c)
    +   File: Medium Bold Font  (no auto-title, gdfontmb.c)
    +   File: Small Font  (no auto-title, gdfonts.c)
    +   File: Tiny Font  (no auto-title, gdfontt.c)
    +   }  # Group: Built-in Fonts
    +
     Group: Index  {
     
        Constant Index: Constants
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Topics.txt b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Topics.txt
    deleted file mode 100644
    index 21530908d76..00000000000
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/Topics.txt
    +++ /dev/null
    @@ -1,81 +0,0 @@
    -Format: 1.51
    -
    -# This is the Natural Docs topics file for this project.  If you change anything
    -# here, it will apply to THIS PROJECT ONLY.  If you'd like to change something
    -# for all your projects, edit the Topics.txt in Natural Docs' Config directory
    -# instead.
    -
    -
    -# If you'd like to prevent keywords from being recognized by Natural Docs, you
    -# can do it like this:
    -# Ignore Keywords: [keyword], [keyword], ...
    -#
    -# Or you can use the list syntax like how they are defined:
    -# Ignore Keywords:
    -#    [keyword]
    -#    [keyword], [plural keyword]
    -#    ...
    -
    -
    -#-------------------------------------------------------------------------------
    -# SYNTAX:
    -#
    -# Topic Type: [name]
    -# Alter Topic Type: [name]
    -#    Creates a new topic type or alters one from the main file.  Each type gets
    -#    its own index and behavior settings.  Its name can have letters, numbers,
    -#    spaces, and these charaters: - / . '
    -#
    -# Plural: [name]
    -#    Sets the plural name of the topic type, if different.
    -#
    -# Keywords:
    -#    [keyword]
    -#    [keyword], [plural keyword]
    -#    ...
    -#    Defines or adds to the list of keywords for the topic type.  They may only
    -#    contain letters, numbers, and spaces and are not case sensitive.  Plural
    -#    keywords are used for list topics.  You can redefine keywords found in the
    -#    main topics file.
    -#
    -# Index: [yes|no]
    -#    Whether the topics get their own index.  Defaults to yes.  Everything is
    -#    included in the general index regardless of this setting.
    -#
    -# Scope: [normal|start|end|always global]
    -#    How the topics affects scope.  Defaults to normal.
    -#    normal        - Topics stay within the current scope.
    -#    start         - Topics start a new scope for all the topics beneath it,
    -#                    like class topics.
    -#    end           - Topics reset the scope back to global for all the topics
    -#                    beneath it.
    -#    always global - Topics are defined as global, but do not change the scope
    -#                    for any other topics.
    -#
    -# Class Hierarchy: [yes|no]
    -#    Whether the topics are part of the class hierarchy.  Defaults to no.
    -#
    -# Page Title If First: [yes|no]
    -#    Whether the topic's title becomes the page title if it's the first one in
    -#    a file.  Defaults to no.
    -#
    -# Break Lists: [yes|no]
    -#    Whether list topics should be broken into individual topics in the output.
    -#    Defaults to no.
    -#
    -# Can Group With: [type], [type], ...
    -#    Defines a list of topic types that this one can possibly be grouped with.
    -#    Defaults to none.
    -#-------------------------------------------------------------------------------
    -
    -# The following topics are defined in the main file, if you'd like to alter
    -# their behavior or add keywords:
    -#
    -#    Generic, Class, Interface, Section, File, Group, Function, Variable,
    -#    Property, Type, Constant, Enumeration, Event, Delegate, Macro,
    -#    Database, Database Table, Database View, Database Index, Database
    -#    Cursor, Database Trigger, Cookie, Build Target
    -
    -# If you add something that you think would be useful to other developers
    -# and should be included in Natural Docs by default, please e-mail it to
    -# topics [at] naturaldocs [dot] org.
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/libgd.css b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/libgd.css
    new file mode 100644
    index 00000000000..ff83144c574
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/docs/naturaldocs/project/libgd.css
    @@ -0,0 +1,9 @@
    +/*
    +Custom styles for the generated HTML, which are supposed to override the default
    +styles
    +*/
    +
    +p {
    +    text-indent: 0;
    +    margin-bottom: 1em;
    +}
    diff --git a/Build/source/libs/gd/libgd-src/docs/naturaldocs/run_docs.sh b/Build/source/libs/gd/libgd-src/docs/naturaldocs/run_docs.sh
    index 40fec7762a6..dce3072101f 100755
    --- a/Build/source/libs/gd/libgd-src/docs/naturaldocs/run_docs.sh
    +++ b/Build/source/libs/gd/libgd-src/docs/naturaldocs/run_docs.sh
    @@ -60,15 +60,17 @@ mkdir tmp
     perl nobgd.pl ../../src/ tmp/
     
     # Add the external docs.
    -cp license.txt tmp/
    +echo "Title: License" | cat - ../../COPYING > tmp/license.txt
     sed -e "s/@VERSION@/$VERSION/g" preamble.txt > tmp/preamble.txt
     # ^^^ hack to get the version number in the docs.
     
     # Run naturaldocs to create the manual.
     $(nd) --rebuild --rebuild-output --documented-only \
         -i tmp/ \
    +    -img images/ \
         -o html html  \
    -    --project project/
    +    --project project/ \
    +    -s Default libgd
     
     # And cleanup the temp files.
     rm -rf Data tmp
    diff --git a/Build/source/libs/gd/libgd-src/examples/Makefile b/Build/source/libs/gd/libgd-src/examples/Makefile
    deleted file mode 100644
    index a21960ebd79..00000000000
    --- a/Build/source/libs/gd/libgd-src/examples/Makefile
    +++ /dev/null
    @@ -1,498 +0,0 @@
    -# CMAKE generated file: DO NOT EDIT!
    -# Generated by "Unix Makefiles" Generator, CMake Version 3.0
    -
    -# Default target executed when no arguments are given to make.
    -default_target: all
    -.PHONY : default_target
    -
    -# Allow only one "make -f Makefile2" at a time, but pass parallelism.
    -.NOTPARALLEL:
    -.PHONY : .NOTPARALLEL
    -
    -#=============================================================================
    -# Special targets provided by cmake.
    -
    -# Disable implicit rules so canonical targets will work.
    -.SUFFIXES:
    -
    -# Remove some rules from gmake that .SUFFIXES does not remove.
    -SUFFIXES =
    -
    -.SUFFIXES: .hpux_make_needs_suffix_list
    -
    -# Suppress display of executed commands.
    -$(VERBOSE).SILENT:
    -
    -# A target that is always out of date.
    -cmake_force:
    -.PHONY : cmake_force
    -
    -#=============================================================================
    -# Set environment variables for the build.
    -
    -# The shell in which to execute make rules.
    -SHELL = /bin/sh
    -
    -# The CMake executable.
    -CMAKE_COMMAND = /usr/bin/cmake
    -
    -# The command to remove a file.
    -RM = /usr/bin/cmake -E remove -f
    -
    -# Escaping for special characters.
    -EQUALS = =
    -
    -# The top-level source directory on which CMake was run.
    -CMAKE_SOURCE_DIR = /home/pierre/project/libgd
    -
    -# The top-level build directory on which CMake was run.
    -CMAKE_BINARY_DIR = /home/pierre/project/libgd
    -
    -#=============================================================================
    -# Targets provided globally by CMake.
    -
    -# Special rule for the target edit_cache
    -edit_cache:
    -	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
    -	/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
    -.PHONY : edit_cache
    -
    -# Special rule for the target edit_cache
    -edit_cache/fast: edit_cache
    -.PHONY : edit_cache/fast
    -
    -# Special rule for the target install
    -install: preinstall
    -	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
    -	/usr/bin/cmake -P cmake_install.cmake
    -.PHONY : install
    -
    -# Special rule for the target install
    -install/fast: preinstall/fast
    -	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
    -	/usr/bin/cmake -P cmake_install.cmake
    -.PHONY : install/fast
    -
    -# Special rule for the target install/local
    -install/local: preinstall
    -	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
    -	/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
    -.PHONY : install/local
    -
    -# Special rule for the target install/local
    -install/local/fast: install/local
    -.PHONY : install/local/fast
    -
    -# Special rule for the target install/strip
    -install/strip: preinstall
    -	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
    -	/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
    -.PHONY : install/strip
    -
    -# Special rule for the target install/strip
    -install/strip/fast: install/strip
    -.PHONY : install/strip/fast
    -
    -# Special rule for the target list_install_components
    -list_install_components:
    -	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
    -.PHONY : list_install_components
    -
    -# Special rule for the target list_install_components
    -list_install_components/fast: list_install_components
    -.PHONY : list_install_components/fast
    -
    -# Special rule for the target package
    -package: preinstall
    -	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..."
    -	cd /home/pierre/project/libgd && /usr/bin/cpack --config ./CPackConfig.cmake
    -.PHONY : package
    -
    -# Special rule for the target package
    -package/fast: package
    -.PHONY : package/fast
    -
    -# Special rule for the target package_source
    -package_source:
    -	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..."
    -	cd /home/pierre/project/libgd && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/pierre/project/libgd/CPackSourceConfig.cmake
    -.PHONY : package_source
    -
    -# Special rule for the target package_source
    -package_source/fast: package_source
    -.PHONY : package_source/fast
    -
    -# Special rule for the target rebuild_cache
    -rebuild_cache:
    -	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
    -	/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
    -.PHONY : rebuild_cache
    -
    -# Special rule for the target rebuild_cache
    -rebuild_cache/fast: rebuild_cache
    -.PHONY : rebuild_cache/fast
    -
    -# Special rule for the target test
    -test:
    -	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..."
    -	/usr/bin/ctest --force-new-ctest-process $(ARGS)
    -.PHONY : test
    -
    -# Special rule for the target test
    -test/fast: test
    -.PHONY : test/fast
    -
    -# The main all target
    -all: cmake_check_build_system
    -	cd /home/pierre/project/libgd && $(CMAKE_COMMAND) -E cmake_progress_start /home/pierre/project/libgd/CMakeFiles /home/pierre/project/libgd/examples/CMakeFiles/progress.marks
    -	cd /home/pierre/project/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/all
    -	$(CMAKE_COMMAND) -E cmake_progress_start /home/pierre/project/libgd/CMakeFiles 0
    -.PHONY : all
    -
    -# The main clean target
    -clean:
    -	cd /home/pierre/project/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/clean
    -.PHONY : clean
    -
    -# The main clean target
    -clean/fast: clean
    -.PHONY : clean/fast
    -
    -# Prepare targets for installation.
    -preinstall: all
    -	cd /home/pierre/project/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/preinstall
    -.PHONY : preinstall
    -
    -# Prepare targets for installation.
    -preinstall/fast:
    -	cd /home/pierre/project/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/preinstall
    -.PHONY : preinstall/fast
    -
    -# clear depends
    -depend:
    -	cd /home/pierre/project/libgd && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
    -.PHONY : depend
    -
    -# Convenience name for target.
    -examples/CMakeFiles/arc.dir/rule:
    -	cd /home/pierre/project/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/arc.dir/rule
    -.PHONY : examples/CMakeFiles/arc.dir/rule
    -
    -# Convenience name for target.
    -arc: examples/CMakeFiles/arc.dir/rule
    -.PHONY : arc
    -
    -# fast build rule for target.
    -arc/fast:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/arc.dir/build.make examples/CMakeFiles/arc.dir/build
    -.PHONY : arc/fast
    -
    -# Convenience name for target.
    -examples/CMakeFiles/copyrotated.dir/rule:
    -	cd /home/pierre/project/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/copyrotated.dir/rule
    -.PHONY : examples/CMakeFiles/copyrotated.dir/rule
    -
    -# Convenience name for target.
    -copyrotated: examples/CMakeFiles/copyrotated.dir/rule
    -.PHONY : copyrotated
    -
    -# fast build rule for target.
    -copyrotated/fast:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/copyrotated.dir/build.make examples/CMakeFiles/copyrotated.dir/build
    -.PHONY : copyrotated/fast
    -
    -# Convenience name for target.
    -examples/CMakeFiles/crop.dir/rule:
    -	cd /home/pierre/project/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/crop.dir/rule
    -.PHONY : examples/CMakeFiles/crop.dir/rule
    -
    -# Convenience name for target.
    -crop: examples/CMakeFiles/crop.dir/rule
    -.PHONY : crop
    -
    -# fast build rule for target.
    -crop/fast:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/crop.dir/build.make examples/CMakeFiles/crop.dir/build
    -.PHONY : crop/fast
    -
    -# Convenience name for target.
    -examples/CMakeFiles/flip.dir/rule:
    -	cd /home/pierre/project/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/flip.dir/rule
    -.PHONY : examples/CMakeFiles/flip.dir/rule
    -
    -# Convenience name for target.
    -flip: examples/CMakeFiles/flip.dir/rule
    -.PHONY : flip
    -
    -# fast build rule for target.
    -flip/fast:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/flip.dir/build.make examples/CMakeFiles/flip.dir/build
    -.PHONY : flip/fast
    -
    -# Convenience name for target.
    -examples/CMakeFiles/gif.dir/rule:
    -	cd /home/pierre/project/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/gif.dir/rule
    -.PHONY : examples/CMakeFiles/gif.dir/rule
    -
    -# Convenience name for target.
    -gif: examples/CMakeFiles/gif.dir/rule
    -.PHONY : gif
    -
    -# fast build rule for target.
    -gif/fast:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/gif.dir/build.make examples/CMakeFiles/gif.dir/build
    -.PHONY : gif/fast
    -
    -# Convenience name for target.
    -examples/CMakeFiles/nnquant.dir/rule:
    -	cd /home/pierre/project/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/nnquant.dir/rule
    -.PHONY : examples/CMakeFiles/nnquant.dir/rule
    -
    -# Convenience name for target.
    -nnquant: examples/CMakeFiles/nnquant.dir/rule
    -.PHONY : nnquant
    -
    -# fast build rule for target.
    -nnquant/fast:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/nnquant.dir/build.make examples/CMakeFiles/nnquant.dir/build
    -.PHONY : nnquant/fast
    -
    -# Convenience name for target.
    -examples/CMakeFiles/tgaread.dir/rule:
    -	cd /home/pierre/project/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/tgaread.dir/rule
    -.PHONY : examples/CMakeFiles/tgaread.dir/rule
    -
    -# Convenience name for target.
    -tgaread: examples/CMakeFiles/tgaread.dir/rule
    -.PHONY : tgaread
    -
    -# fast build rule for target.
    -tgaread/fast:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/tgaread.dir/build.make examples/CMakeFiles/tgaread.dir/build
    -.PHONY : tgaread/fast
    -
    -arc.o: arc.c.o
    -.PHONY : arc.o
    -
    -# target to build an object file
    -arc.c.o:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/arc.dir/build.make examples/CMakeFiles/arc.dir/arc.c.o
    -.PHONY : arc.c.o
    -
    -arc.i: arc.c.i
    -.PHONY : arc.i
    -
    -# target to preprocess a source file
    -arc.c.i:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/arc.dir/build.make examples/CMakeFiles/arc.dir/arc.c.i
    -.PHONY : arc.c.i
    -
    -arc.s: arc.c.s
    -.PHONY : arc.s
    -
    -# target to generate assembly for a file
    -arc.c.s:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/arc.dir/build.make examples/CMakeFiles/arc.dir/arc.c.s
    -.PHONY : arc.c.s
    -
    -copyrotated.o: copyrotated.c.o
    -.PHONY : copyrotated.o
    -
    -# target to build an object file
    -copyrotated.c.o:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/copyrotated.dir/build.make examples/CMakeFiles/copyrotated.dir/copyrotated.c.o
    -.PHONY : copyrotated.c.o
    -
    -copyrotated.i: copyrotated.c.i
    -.PHONY : copyrotated.i
    -
    -# target to preprocess a source file
    -copyrotated.c.i:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/copyrotated.dir/build.make examples/CMakeFiles/copyrotated.dir/copyrotated.c.i
    -.PHONY : copyrotated.c.i
    -
    -copyrotated.s: copyrotated.c.s
    -.PHONY : copyrotated.s
    -
    -# target to generate assembly for a file
    -copyrotated.c.s:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/copyrotated.dir/build.make examples/CMakeFiles/copyrotated.dir/copyrotated.c.s
    -.PHONY : copyrotated.c.s
    -
    -crop.o: crop.c.o
    -.PHONY : crop.o
    -
    -# target to build an object file
    -crop.c.o:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/crop.dir/build.make examples/CMakeFiles/crop.dir/crop.c.o
    -.PHONY : crop.c.o
    -
    -crop.i: crop.c.i
    -.PHONY : crop.i
    -
    -# target to preprocess a source file
    -crop.c.i:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/crop.dir/build.make examples/CMakeFiles/crop.dir/crop.c.i
    -.PHONY : crop.c.i
    -
    -crop.s: crop.c.s
    -.PHONY : crop.s
    -
    -# target to generate assembly for a file
    -crop.c.s:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/crop.dir/build.make examples/CMakeFiles/crop.dir/crop.c.s
    -.PHONY : crop.c.s
    -
    -flip.o: flip.c.o
    -.PHONY : flip.o
    -
    -# target to build an object file
    -flip.c.o:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/flip.dir/build.make examples/CMakeFiles/flip.dir/flip.c.o
    -.PHONY : flip.c.o
    -
    -flip.i: flip.c.i
    -.PHONY : flip.i
    -
    -# target to preprocess a source file
    -flip.c.i:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/flip.dir/build.make examples/CMakeFiles/flip.dir/flip.c.i
    -.PHONY : flip.c.i
    -
    -flip.s: flip.c.s
    -.PHONY : flip.s
    -
    -# target to generate assembly for a file
    -flip.c.s:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/flip.dir/build.make examples/CMakeFiles/flip.dir/flip.c.s
    -.PHONY : flip.c.s
    -
    -gif.o: gif.c.o
    -.PHONY : gif.o
    -
    -# target to build an object file
    -gif.c.o:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/gif.dir/build.make examples/CMakeFiles/gif.dir/gif.c.o
    -.PHONY : gif.c.o
    -
    -gif.i: gif.c.i
    -.PHONY : gif.i
    -
    -# target to preprocess a source file
    -gif.c.i:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/gif.dir/build.make examples/CMakeFiles/gif.dir/gif.c.i
    -.PHONY : gif.c.i
    -
    -gif.s: gif.c.s
    -.PHONY : gif.s
    -
    -# target to generate assembly for a file
    -gif.c.s:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/gif.dir/build.make examples/CMakeFiles/gif.dir/gif.c.s
    -.PHONY : gif.c.s
    -
    -nnquant.o: nnquant.c.o
    -.PHONY : nnquant.o
    -
    -# target to build an object file
    -nnquant.c.o:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/nnquant.dir/build.make examples/CMakeFiles/nnquant.dir/nnquant.c.o
    -.PHONY : nnquant.c.o
    -
    -nnquant.i: nnquant.c.i
    -.PHONY : nnquant.i
    -
    -# target to preprocess a source file
    -nnquant.c.i:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/nnquant.dir/build.make examples/CMakeFiles/nnquant.dir/nnquant.c.i
    -.PHONY : nnquant.c.i
    -
    -nnquant.s: nnquant.c.s
    -.PHONY : nnquant.s
    -
    -# target to generate assembly for a file
    -nnquant.c.s:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/nnquant.dir/build.make examples/CMakeFiles/nnquant.dir/nnquant.c.s
    -.PHONY : nnquant.c.s
    -
    -tgaread.o: tgaread.c.o
    -.PHONY : tgaread.o
    -
    -# target to build an object file
    -tgaread.c.o:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/tgaread.dir/build.make examples/CMakeFiles/tgaread.dir/tgaread.c.o
    -.PHONY : tgaread.c.o
    -
    -tgaread.i: tgaread.c.i
    -.PHONY : tgaread.i
    -
    -# target to preprocess a source file
    -tgaread.c.i:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/tgaread.dir/build.make examples/CMakeFiles/tgaread.dir/tgaread.c.i
    -.PHONY : tgaread.c.i
    -
    -tgaread.s: tgaread.c.s
    -.PHONY : tgaread.s
    -
    -# target to generate assembly for a file
    -tgaread.c.s:
    -	cd /home/pierre/project/libgd && $(MAKE) -f examples/CMakeFiles/tgaread.dir/build.make examples/CMakeFiles/tgaread.dir/tgaread.c.s
    -.PHONY : tgaread.c.s
    -
    -# Help Target
    -help:
    -	@echo "The following are some of the valid targets for this Makefile:"
    -	@echo "... all (the default if no target is provided)"
    -	@echo "... clean"
    -	@echo "... depend"
    -	@echo "... arc"
    -	@echo "... copyrotated"
    -	@echo "... crop"
    -	@echo "... edit_cache"
    -	@echo "... flip"
    -	@echo "... gif"
    -	@echo "... install"
    -	@echo "... install/local"
    -	@echo "... install/strip"
    -	@echo "... list_install_components"
    -	@echo "... nnquant"
    -	@echo "... package"
    -	@echo "... package_source"
    -	@echo "... rebuild_cache"
    -	@echo "... test"
    -	@echo "... tgaread"
    -	@echo "... arc.o"
    -	@echo "... arc.i"
    -	@echo "... arc.s"
    -	@echo "... copyrotated.o"
    -	@echo "... copyrotated.i"
    -	@echo "... copyrotated.s"
    -	@echo "... crop.o"
    -	@echo "... crop.i"
    -	@echo "... crop.s"
    -	@echo "... flip.o"
    -	@echo "... flip.i"
    -	@echo "... flip.s"
    -	@echo "... gif.o"
    -	@echo "... gif.i"
    -	@echo "... gif.s"
    -	@echo "... nnquant.o"
    -	@echo "... nnquant.i"
    -	@echo "... nnquant.s"
    -	@echo "... tgaread.o"
    -	@echo "... tgaread.i"
    -	@echo "... tgaread.s"
    -.PHONY : help
    -
    -
    -
    -#=============================================================================
    -# Special targets to cleanup operation of make.
    -
    -# Special rule to run CMake to check the build system integrity.
    -# No rule that depends on this can have commands that come from listfiles
    -# because they might be regenerated.
    -cmake_check_build_system:
    -	cd /home/pierre/project/libgd && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
    -.PHONY : cmake_check_build_system
    -
    diff --git a/Build/source/libs/gd/libgd-src/m4/ax_pthread.m4 b/Build/source/libs/gd/libgd-src/m4/ax_pthread.m4
    index 6d400ed4e8e..4c4051ea376 100644
    --- a/Build/source/libs/gd/libgd-src/m4/ax_pthread.m4
    +++ b/Build/source/libs/gd/libgd-src/m4/ax_pthread.m4
    @@ -19,10 +19,10 @@
     #   is necessary on AIX to use the special cc_r compiler alias.)
     #
     #   NOTE: You are assumed to not only compile your program with these flags,
    -#   but also link it with them as well. e.g. you should link with
    +#   but also to link with them as well. For example, you might link with
     #   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
     #
    -#   If you are only building threads programs, you may wish to use these
    +#   If you are only building threaded programs, you may wish to use these
     #   variables in your default LIBS, CFLAGS, and CC:
     #
     #     LIBS="$PTHREAD_LIBS $LIBS"
    @@ -30,8 +30,8 @@
     #     CC="$PTHREAD_CC"
     #
     #   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
    -#   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
    -#   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
    +#   has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
    +#   that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
     #
     #   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
     #   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
    @@ -82,35 +82,40 @@
     #   modified version of the Autoconf Macro, you may extend this special
     #   exception to the GPL to apply to your modified version as well.
     
    -#serial 20
    +#serial 23
     
     AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
     AC_DEFUN([AX_PTHREAD], [
     AC_REQUIRE([AC_CANONICAL_HOST])
    +AC_REQUIRE([AC_PROG_CC])
    +AC_REQUIRE([AC_PROG_SED])
     AC_LANG_PUSH([C])
     ax_pthread_ok=no
     
     # We used to check for pthread.h first, but this fails if pthread.h
    -# requires special compiler flags (e.g. on True64 or Sequent).
    +# requires special compiler flags (e.g. on Tru64 or Sequent).
     # It gets checked for in the link test anyway.
     
     # First of all, check if the user has set any of the PTHREAD_LIBS,
     # etcetera environment variables, and if threads linking works using
     # them:
    -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
    -        save_CFLAGS="$CFLAGS"
    +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
    +        ax_pthread_save_CC="$CC"
    +        ax_pthread_save_CFLAGS="$CFLAGS"
    +        ax_pthread_save_LIBS="$LIBS"
    +        AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
             CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
    -        save_LIBS="$LIBS"
             LIBS="$PTHREAD_LIBS $LIBS"
    -        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
    -        AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
    -        AC_MSG_RESULT($ax_pthread_ok)
    -        if test x"$ax_pthread_ok" = xno; then
    +        AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
    +        AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
    +        AC_MSG_RESULT([$ax_pthread_ok])
    +        if test "x$ax_pthread_ok" = "xno"; then
                     PTHREAD_LIBS=""
                     PTHREAD_CFLAGS=""
             fi
    -        LIBS="$save_LIBS"
    -        CFLAGS="$save_CFLAGS"
    +        CC="$ax_pthread_save_CC"
    +        CFLAGS="$ax_pthread_save_CFLAGS"
    +        LIBS="$ax_pthread_save_LIBS"
     fi
     
     # We must check for the threads library under a number of different
    @@ -123,7 +128,7 @@ fi
     # which indicates that we try without any flags at all, and "pthread-config"
     # which is a program returning the flags for the Pth emulation library.
     
    -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
    +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
     
     # The ordering *is* (sometimes) important.  Some notes on the
     # individual items follow:
    @@ -132,68 +137,225 @@ ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt
     # none: in case threads are in libc; should be tried before -Kthread and
     #       other compiler flags to prevent continual compiler warnings
     # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
    -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
    -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
    -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
    -# -pthreads: Solaris/gcc
    -# -mthreads: Mingw32/gcc, Lynx/gcc
    +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
    +#           (Note: HP C rejects this with "bad form for `-t' option")
    +# -pthreads: Solaris/gcc (Note: HP C also rejects)
     # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
    -#      doesn't hurt to check since this sometimes defines pthreads too;
    -#      also defines -D_REENTRANT)
    -#      ... -mt is also the pthreads flag for HP/aCC
    +#      doesn't hurt to check since this sometimes defines pthreads and
    +#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
    +#      is present but should not be used directly; and before -mthreads,
    +#      because the compiler interprets this as "-mt" + "-hreads")
    +# -mthreads: Mingw32/gcc, Lynx/gcc
     # pthread: Linux, etcetera
     # --thread-safe: KAI C++
     # pthread-config: use pthread-config program (for GNU Pth library)
     
    -case ${host_os} in
    +case $host_os in
    +
    +        freebsd*)
    +
    +        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
    +        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
    +
    +        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
    +        ;;
    +
    +        hpux*)
    +
    +        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
    +        # multi-threading and also sets -lpthread."
    +
    +        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
    +        ;;
    +
    +        openedition*)
    +
    +        # IBM z/OS requires a feature-test macro to be defined in order to
    +        # enable POSIX threads at all, so give the user a hint if this is
    +        # not set. (We don't define these ourselves, as they can affect
    +        # other portions of the system API in unpredictable ways.)
    +
    +        AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
    +            [
    +#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
    +             AX_PTHREAD_ZOS_MISSING
    +#            endif
    +            ],
    +            [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
    +        ;;
    +
             solaris*)
     
             # On Solaris (at least, for some versions), libc contains stubbed
             # (non-functional) versions of the pthreads routines, so link-based
    -        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
    -        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
    -        # a function called by this macro, so we could check for that, but
    -        # who knows whether they'll stub that too in a future libc.)  So,
    -        # we'll just look for -pthreads and -lpthread first:
    +        # tests will erroneously succeed. (N.B.: The stubs are missing
    +        # pthread_cleanup_push, or rather a function called by this macro,
    +        # so we could check for that, but who knows whether they'll stub
    +        # that too in a future libc.)  So we'll check first for the
    +        # standard Solaris way of linking pthreads (-mt -lpthread).
    +
    +        ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
    +        ;;
    +esac
    +
    +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
    +
    +AS_IF([test "x$GCC" = "xyes"],
    +      [ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"])
    +
    +# The presence of a feature test macro requesting re-entrant function
    +# definitions is, on some systems, a strong hint that pthreads support is
    +# correctly enabled
     
    -        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
    +case $host_os in
    +        darwin* | hpux* | linux* | osf* | solaris*)
    +        ax_pthread_check_macro="_REENTRANT"
             ;;
     
    -        darwin*)
    -        ax_pthread_flags="-pthread $ax_pthread_flags"
    +        aix*)
    +        ax_pthread_check_macro="_THREAD_SAFE"
    +        ;;
    +
    +        *)
    +        ax_pthread_check_macro="--"
             ;;
     esac
    +AS_IF([test "x$ax_pthread_check_macro" = "x--"],
    +      [ax_pthread_check_cond=0],
    +      [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
    +
    +# Are we compiling with Clang?
    +
    +AC_CACHE_CHECK([whether $CC is Clang],
    +    [ax_cv_PTHREAD_CLANG],
    +    [ax_cv_PTHREAD_CLANG=no
    +     # Note that Autoconf sets GCC=yes for Clang as well as GCC
    +     if test "x$GCC" = "xyes"; then
    +        AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
    +            [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
    +#            if defined(__clang__) && defined(__llvm__)
    +             AX_PTHREAD_CC_IS_CLANG
    +#            endif
    +            ],
    +            [ax_cv_PTHREAD_CLANG=yes])
    +     fi
    +    ])
    +ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
    +
    +ax_pthread_clang_warning=no
    +
    +# Clang needs special handling, because older versions handle the -pthread
    +# option in a rather... idiosyncratic way
    +
    +if test "x$ax_pthread_clang" = "xyes"; then
    +
    +        # Clang takes -pthread; it has never supported any other flag
    +
    +        # (Note 1: This will need to be revisited if a system that Clang
    +        # supports has POSIX threads in a separate library.  This tends not
    +        # to be the way of modern systems, but it's conceivable.)
    +
    +        # (Note 2: On some systems, notably Darwin, -pthread is not needed
    +        # to get POSIX threads support; the API is always present and
    +        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
    +        # -pthread does define _REENTRANT, and while the Darwin headers
    +        # ignore this macro, third-party headers might not.)
    +
    +        PTHREAD_CFLAGS="-pthread"
    +        PTHREAD_LIBS=
    +
    +        ax_pthread_ok=yes
    +
    +        # However, older versions of Clang make a point of warning the user
    +        # that, in an invocation where only linking and no compilation is
    +        # taking place, the -pthread option has no effect ("argument unused
    +        # during compilation").  They expect -pthread to be passed in only
    +        # when source code is being compiled.
    +        #
    +        # Problem is, this is at odds with the way Automake and most other
    +        # C build frameworks function, which is that the same flags used in
    +        # compilation (CFLAGS) are also used in linking.  Many systems
    +        # supported by AX_PTHREAD require exactly this for POSIX threads
    +        # support, and in fact it is often not straightforward to specify a
    +        # flag that is used only in the compilation phase and not in
    +        # linking.  Such a scenario is extremely rare in practice.
    +        #
    +        # Even though use of the -pthread flag in linking would only print
    +        # a warning, this can be a nuisance for well-run software projects
    +        # that build with -Werror.  So if the active version of Clang has
    +        # this misfeature, we search for an option to squash it.
    +
    +        AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
    +            [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
    +            [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
    +             # Create an alternate version of $ac_link that compiles and
    +             # links in two steps (.c -> .o, .o -> exe) instead of one
    +             # (.c -> exe), because the warning occurs only in the second
    +             # step
    +             ax_pthread_save_ac_link="$ac_link"
    +             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
    +             ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
    +             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
    +             ax_pthread_save_CFLAGS="$CFLAGS"
    +             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
    +                AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
    +                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
    +                ac_link="$ax_pthread_save_ac_link"
    +                AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
    +                    [ac_link="$ax_pthread_2step_ac_link"
    +                     AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
    +                         [break])
    +                    ])
    +             done
    +             ac_link="$ax_pthread_save_ac_link"
    +             CFLAGS="$ax_pthread_save_CFLAGS"
    +             AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
    +             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
    +            ])
    +
    +        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
    +                no | unknown) ;;
    +                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
    +        esac
     
    -if test x"$ax_pthread_ok" = xno; then
    -for flag in $ax_pthread_flags; do
    +fi # $ax_pthread_clang = yes
     
    -        case $flag in
    +if test "x$ax_pthread_ok" = "xno"; then
    +for ax_pthread_try_flag in $ax_pthread_flags; do
    +
    +        case $ax_pthread_try_flag in
                     none)
                     AC_MSG_CHECKING([whether pthreads work without any flags])
                     ;;
     
    +                -mt,pthread)
    +                AC_MSG_CHECKING([whether pthreads work with -mt -lpthread])
    +                PTHREAD_CFLAGS="-mt"
    +                PTHREAD_LIBS="-lpthread"
    +                ;;
    +
                     -*)
    -                AC_MSG_CHECKING([whether pthreads work with $flag])
    -                PTHREAD_CFLAGS="$flag"
    +                AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
    +                PTHREAD_CFLAGS="$ax_pthread_try_flag"
                     ;;
     
                     pthread-config)
    -                AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
    -                if test x"$ax_pthread_config" = xno; then continue; fi
    +                AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
    +                AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
                     PTHREAD_CFLAGS="`pthread-config --cflags`"
                     PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
                     ;;
     
                     *)
    -                AC_MSG_CHECKING([for the pthreads library -l$flag])
    -                PTHREAD_LIBS="-l$flag"
    +                AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
    +                PTHREAD_LIBS="-l$ax_pthread_try_flag"
                     ;;
             esac
     
    -        save_LIBS="$LIBS"
    -        save_CFLAGS="$CFLAGS"
    -        LIBS="$PTHREAD_LIBS $LIBS"
    +        ax_pthread_save_CFLAGS="$CFLAGS"
    +        ax_pthread_save_LIBS="$LIBS"
             CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
    +        LIBS="$PTHREAD_LIBS $LIBS"
     
             # Check for various functions.  We must include pthread.h,
             # since some functions may be macros.  (On the Sequent, we
    @@ -204,7 +366,11 @@ for flag in $ax_pthread_flags; do
             # pthread_cleanup_push because it is one of the few pthread
             # functions on Solaris that doesn't have a non-functional libc stub.
             # We try pthread_create on general principles.
    +
             AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
    +#                       if $ax_pthread_check_cond
    +#                        error "$ax_pthread_check_macro must be defined"
    +#                       endif
                             static void routine(void *a) { a = 0; }
                             static void *start_routine(void *a) { return a; }],
                            [pthread_t th; pthread_attr_t attr;
    @@ -213,16 +379,14 @@ for flag in $ax_pthread_flags; do
                             pthread_attr_init(&attr);
                             pthread_cleanup_push(routine, 0);
                             pthread_cleanup_pop(0) /* ; */])],
    -                [ax_pthread_ok=yes],
    -                [])
    +            [ax_pthread_ok=yes],
    +            [])
     
    -        LIBS="$save_LIBS"
    -        CFLAGS="$save_CFLAGS"
    +        CFLAGS="$ax_pthread_save_CFLAGS"
    +        LIBS="$ax_pthread_save_LIBS"
     
    -        AC_MSG_RESULT($ax_pthread_ok)
    -        if test "x$ax_pthread_ok" = xyes; then
    -                break;
    -        fi
    +        AC_MSG_RESULT([$ax_pthread_ok])
    +        AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
     
             PTHREAD_LIBS=""
             PTHREAD_CFLAGS=""
    @@ -230,70 +394,74 @@ done
     fi
     
     # Various other checks:
    -if test "x$ax_pthread_ok" = xyes; then
    -        save_LIBS="$LIBS"
    -        LIBS="$PTHREAD_LIBS $LIBS"
    -        save_CFLAGS="$CFLAGS"
    +if test "x$ax_pthread_ok" = "xyes"; then
    +        ax_pthread_save_CFLAGS="$CFLAGS"
    +        ax_pthread_save_LIBS="$LIBS"
             CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
    +        LIBS="$PTHREAD_LIBS $LIBS"
     
             # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
    -        AC_MSG_CHECKING([for joinable pthread attribute])
    -        attr_name=unknown
    -        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
    -            AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
    -                           [int attr = $attr; return attr /* ; */])],
    -                [attr_name=$attr; break],
    -                [])
    -        done
    -        AC_MSG_RESULT($attr_name)
    -        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
    -            AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
    -                               [Define to necessary symbol if this constant
    -                                uses a non-standard name on your system.])
    -        fi
    -
    -        AC_MSG_CHECKING([if more special flags are required for pthreads])
    -        flag=no
    -        case ${host_os} in
    -            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
    -            osf* | hpux*) flag="-D_REENTRANT";;
    -            solaris*)
    -            if test "$GCC" = "yes"; then
    -                flag="-D_REENTRANT"
    -            else
    -                flag="-mt -D_REENTRANT"
    -            fi
    -            ;;
    -        esac
    -        AC_MSG_RESULT(${flag})
    -        if test "x$flag" != xno; then
    -            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
    -        fi
    +        AC_CACHE_CHECK([for joinable pthread attribute],
    +            [ax_cv_PTHREAD_JOINABLE_ATTR],
    +            [ax_cv_PTHREAD_JOINABLE_ATTR=unknown
    +             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
    +                 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
    +                                                 [int attr = $ax_pthread_attr; return attr /* ; */])],
    +                                [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
    +                                [])
    +             done
    +            ])
    +        AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
    +               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
    +               test "x$ax_pthread_joinable_attr_defined" != "xyes"],
    +              [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
    +                                  [$ax_cv_PTHREAD_JOINABLE_ATTR],
    +                                  [Define to necessary symbol if this constant
    +                                   uses a non-standard name on your system.])
    +               ax_pthread_joinable_attr_defined=yes
    +              ])
    +
    +        AC_CACHE_CHECK([whether more special flags are required for pthreads],
    +            [ax_cv_PTHREAD_SPECIAL_FLAGS],
    +            [ax_cv_PTHREAD_SPECIAL_FLAGS=no
    +             case $host_os in
    +             solaris*)
    +             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
    +             ;;
    +             esac
    +            ])
    +        AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
    +               test "x$ax_pthread_special_flags_added" != "xyes"],
    +              [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
    +               ax_pthread_special_flags_added=yes])
     
             AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
    -            ax_cv_PTHREAD_PRIO_INHERIT, [
    -                AC_LINK_IFELSE([
    -                    AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
    -                    [ax_cv_PTHREAD_PRIO_INHERIT=yes],
    -                    [ax_cv_PTHREAD_PRIO_INHERIT=no])
    +            [ax_cv_PTHREAD_PRIO_INHERIT],
    +            [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
    +                                             [[int i = PTHREAD_PRIO_INHERIT;]])],
    +                            [ax_cv_PTHREAD_PRIO_INHERIT=yes],
    +                            [ax_cv_PTHREAD_PRIO_INHERIT=no])
                 ])
    -        AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
    -            AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
    +        AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
    +               test "x$ax_pthread_prio_inherit_defined" != "xyes"],
    +              [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
    +               ax_pthread_prio_inherit_defined=yes
    +              ])
     
    -        LIBS="$save_LIBS"
    -        CFLAGS="$save_CFLAGS"
    +        CFLAGS="$ax_pthread_save_CFLAGS"
    +        LIBS="$ax_pthread_save_LIBS"
     
             # More AIX lossage: compile with *_r variant
    -        if test "x$GCC" != xyes; then
    +        if test "x$GCC" != "xyes"; then
                 case $host_os in
                     aix*)
                     AS_CASE(["x/$CC"],
    -                  [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
    -                  [#handle absolute path differently from PATH based program lookup
    -                   AS_CASE(["x$CC"],
    -                     [x/*],
    -                     [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
    -                     [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
    +                    [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
    +                    [#handle absolute path differently from PATH based program lookup
    +                     AS_CASE(["x$CC"],
    +                         [x/*],
    +                         [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
    +                         [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
                     ;;
                 esac
             fi
    @@ -301,13 +469,13 @@ fi
     
     test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
     
    -AC_SUBST(PTHREAD_LIBS)
    -AC_SUBST(PTHREAD_CFLAGS)
    -AC_SUBST(PTHREAD_CC)
    +AC_SUBST([PTHREAD_LIBS])
    +AC_SUBST([PTHREAD_CFLAGS])
    +AC_SUBST([PTHREAD_CC])
     
     # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
    -if test x"$ax_pthread_ok" = xyes; then
    -        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
    +if test "x$ax_pthread_ok" = "xyes"; then
    +        ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
             :
     else
             ax_pthread_ok=no
    diff --git a/Build/source/libs/gd/libgd-src/src/CMakeLists.txt b/Build/source/libs/gd/libgd-src/src/CMakeLists.txt
    index aec06e8cbad..08fd6991bbe 100644
    --- a/Build/source/libs/gd/libgd-src/src/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/src/CMakeLists.txt
    @@ -8,6 +8,7 @@ SET (LIBGD_SRC_FILES
     	gd_color.h
     	gd_color_map.c
     	gd_color_map.h
    +	gd_color_match.c
     	gd_crop.c
     	gd_filename.c
     	gd_filter.c
    @@ -15,6 +16,7 @@ SET (LIBGD_SRC_FILES
     	gd_gd2.c
     	gd_gif_in.c
     	gd_gif_out.c
    +	gd_intern.h
     	gd_interpolation.c
     	gd_io.c
     	gd_io.h
    @@ -76,20 +78,25 @@ endif(MSVC AND MSVC_VERSION LESS 1900)
     include(GNUInstallDirs)
     
     if (BUILD_SHARED_LIBS)
    -  add_library(${GD_LIB} ${LIBGD_SRC_FILES})
    +	add_library(${GD_LIB} ${LIBGD_SRC_FILES})
    +	set_target_properties(${GD_LIB} PROPERTIES
    +		C_VISIBILITY_PRESET hidden
    +		CXX_VISIBILITY_PRESET hidden
    +	)
     endif()
     
    -add_library(${GD_LIB_STATIC} STATIC  ${LIBGD_SRC_FILES})
    +if (BUILD_STATIC_LIBS)
    +	add_library(${GD_LIB_STATIC} STATIC ${LIBGD_SRC_FILES})
    +	if (UNIX)
    +		set_target_properties(${GD_LIB_STATIC} PROPERTIES OUTPUT_NAME ${GD_LIB})
    +	endif()
    +endif()
     
     if (WIN32 AND NOT MINGW AND NOT MSYS)
       #	SET_TARGET_PROPERTIES(${GD_LIB} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:msvcrt.lib")
       SET_PROPERTY(TARGET ${GD_LIB_STATIC} APPEND PROPERTY COMPILE_DEFINITIONS NONDLL=1)
     ENDIF(WIN32 AND NOT MINGW AND NOT MSYS)
     
    -if(UNIX)
    -  set_target_properties(${GD_LIB_STATIC} PROPERTIES OUTPUT_NAME ${GD_LIB})
    -endif()
    -
     if (MINGW OR MSYS)
     	ADD_DEFINITIONS("-mms-bitfields")
     	set_target_properties(${GD_LIB_STATIC} PROPERTIES OUTPUT_NAME ${GD_LIB})
    @@ -97,11 +104,24 @@ endif (MINGW OR MSYS)
     
     INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_SOURCE_DIR}/src")
     
    +SET(LIBGD_DEP_LIBS
    +	${ZLIB_LIBRARIES}
    +	${FREETYPE_LIBRARIES}
    +	${PNG_LIBRARIES}
    +	${ICONV_LIBRARIES}
    +	${LIQ_LIBRARIES}
    +	${JPEG_LIBRARIES}
    +	${TIFF_LIBRARIES}
    +	${XPM_LIBRARIES}
    +	${FONTCONFIG_LIBRARY}
    +	${WEBP_LIBRARIES}
    +)
     if (BUILD_SHARED_LIBS)
    -  target_link_libraries(${GD_LIB} ${ZLIB_LIBRARIES} ${FREETYPE_LIBRARIES} ${PNG_LIBRARIES} ${ICONV_LIBRARIES} ${LIQ_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${XPM_LIBRARIES} ${FONTCONFIG_LIBRARY} ${WEBP_LIBRARIES})
    +	target_link_libraries(${GD_LIB} ${LIBGD_DEP_LIBS})
    +endif()
    +if (BUILD_STATIC_LIBS)
    +	target_link_libraries(${GD_LIB_STATIC} ${LIBGD_DEP_LIBS})
     endif()
    -
    -target_link_libraries(${GD_LIB_STATIC} ${ZLIB_LIBRARIES} ${FREETYPE_LIBRARIES} ${PNG_LIBRARIES} ${ICONV_LIBRARIES} ${LIQ_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${XPM_LIBRARIES} ${FONTCONFIG_LIBRARY} ${WEBP_LIBRARIES} )
     
     set(GD_PROGRAMS gdcmpgif)
     
    @@ -129,10 +149,12 @@ foreach(program ${GD_PROGRAMS})
         endif()
     endforeach(program)
     
    +set(GD_INSTALL_TARGETS ${GD_PROGRAMS})
     if (BUILD_SHARED_LIBS)
    -  set(GD_INSTALL_TARGETS ${GD_LIB} ${GD_LIB_STATIC} ${GD_PROGRAMS})
    -else()
    -  set(GD_INSTALL_TARGETS ${GD_LIB_STATIC} ${GD_PROGRAMS})
    +	set(GD_INSTALL_TARGETS ${GD_INSTALL_TARGETS} ${GD_LIB})
    +endif()
    +if (BUILD_STATIC_LIBS)
    +	set(GD_INSTALL_TARGETS ${GD_INSTALL_TARGETS} ${GD_LIB_STATIC})
     endif()
     
     install(TARGETS ${GD_INSTALL_TARGETS}
    diff --git a/Build/source/libs/gd/libgd-src/src/Makefile.am b/Build/source/libs/gd/libgd-src/src/Makefile.am
    index 92772b79642..93e8838c366 100644
    --- a/Build/source/libs/gd/libgd-src/src/Makefile.am
    +++ b/Build/source/libs/gd/libgd-src/src/Makefile.am
    @@ -46,10 +46,12 @@ lib_LTLIBRARIES = libgd.la
     libgd_la_SOURCES = \
     	bmp.h \
     	gd.c \
    +	gd.h \
     	gd_bmp.c \
     	gd_color.c \
     	gd_color.h \
     	gd_color_map.c \
    +	gd_color_map.h \
     	gd_color_match.c \
     	gd_crop.c \
     	gd_filename.c \
    @@ -61,6 +63,7 @@ libgd_la_SOURCES = \
     	gd_intern.h \
     	gd_interpolation.c \
     	gd_io.c \
    +	gd_io.h \
     	gd_io_dp.c \
     	gd_io_file.c \
     	gd_io_ss.c \
    @@ -83,13 +86,20 @@ libgd_la_SOURCES = \
     	gd_webp.c \
     	gd_xbm.c \
     	gdcache.c \
    +	gdcache.h \
     	gdfontg.c \
    +	gdfontg.h \
     	gdfontl.c \
    +	gdfontl.h \
     	gdfontmb.c \
    +	gdfontmb.h \
     	gdfonts.c \
    +	gdfonts.h \
     	gdfontt.c \
    +	gdfontt.h \
     	gdft.c \
     	gdfx.c \
    +	gdfx.h \
     	gdhelpers.c \
     	gdhelpers.h \
     	gdkanji.c \
    diff --git a/Build/source/libs/gd/libgd-src/src/circletexttest.c b/Build/source/libs/gd/libgd-src/src/circletexttest.c
    index c1e67ab742f..0f20a34d9b8 100644
    --- a/Build/source/libs/gd/libgd-src/src/circletexttest.c
    +++ b/Build/source/libs/gd/libgd-src/src/circletexttest.c
    @@ -13,7 +13,9 @@ int main(void)
     	return 0;
     #else
     	char *error;
    +#ifdef HAVE_LIBJPEG
     	FILE *in = 0;
    +#endif
     	FILE *out;
     	gdImagePtr im;
     	int radius;
    diff --git a/Build/source/libs/gd/libgd-src/src/config.hin b/Build/source/libs/gd/libgd-src/src/config.hin
    index 5d84fae8c97..d2777209b45 100644
    --- a/Build/source/libs/gd/libgd-src/src/config.hin
    +++ b/Build/source/libs/gd/libgd-src/src/config.hin
    @@ -103,8 +103,7 @@
     /* Define as const if the declaration of iconv() needs const. */
     #undef ICONV_CONST
     
    -/* Define to the sub-directory in which libtool stores uninstalled libraries.
    -   */
    +/* Define to the sub-directory where libtool stores uninstalled libraries. */
     #undef LT_OBJDIR
     
     /* Name of package */
    diff --git a/Build/source/libs/gd/libgd-src/src/gd.c b/Build/source/libs/gd/libgd-src/src/gd.c
    index f0fc40ede11..7f0a258f800 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd.c
    @@ -71,6 +71,10 @@ static const unsigned char gd_toascii[256] = {
     extern const int gdCosT[];
     extern const int gdSinT[];
     
    +/**
    + * Group: Error Handling
    + */
    +
     void gd_stderr_error(int priority, const char *format, va_list args)
     {
     	switch (priority) {
    @@ -139,11 +143,11 @@ BGD_DECLARE(void) gdClearErrorMethod(void)
     static void gdImageBrushApply (gdImagePtr im, int x, int y);
     static void gdImageTileApply (gdImagePtr im, int x, int y);
     
    -/*
    -	Function: gdImageGetTrueColorPixel
    -*/
     BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y);
     
    +/**
    + * Group: Creation and Destruction
    + */
     
     /*
         Function: gdImageCreate
    @@ -162,11 +166,14 @@ BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y);
             A pointer to the new image or NULL if an error occurred.
     
         Example:
    +      (start code)
     
    -        >   gdImagePtr im;
    -        >   im = gdImageCreate(64, 64);
    -        >   // ... Use the image ...
    -        >   gdImageDestroy(im);
    +      gdImagePtr im;
    +      im = gdImageCreate(64, 64);
    +      // ... Use the image ...
    +      gdImageDestroy(im);
    +
    +      (end code)
     
         See Also:
     
    @@ -178,6 +185,10 @@ BGD_DECLARE(gdImagePtr) gdImageCreate (int sx, int sy)
     	int i;
     	gdImagePtr im;
     
    +	if (overflow2(sx, sy)) {
    +		return NULL;
    +	}
    +
     	if (overflow2(sizeof (unsigned char *), sy)) {
     		return NULL;
     	}
    @@ -263,11 +274,14 @@ BGD_DECLARE(gdImagePtr) gdImageCreate (int sx, int sy)
             A pointer to the new image or NULL if an error occurred.
     
         Example:
    +      (start code)
     
    -        > gdImagePtr im;
    -        > im = gdImageCreateTrueColor(64, 64);
    -        > // ... Use the image ...
    -        > gdImageDestroy(im);
    +      gdImagePtr im;
    +      im = gdImageCreateTrueColor(64, 64);
    +      // ... Use the image ...
    +      gdImageDestroy(im);
    +
    +      (end code)
     
         See Also:
     
    @@ -362,12 +376,15 @@ BGD_DECLARE(gdImagePtr) gdImageCreateTrueColor (int sx, int sy)
         Nothing.
     
       Example:
    +    (start code)
    +
    +    gdImagePtr im;
    +    im = gdImageCreate(10, 10);
    +    // ... Use the image ...
    +    // Now destroy it
    +    gdImageDestroy(im);
     
    -    > gdImagePtr im;
    -    > im = gdImageCreate(10, 10);
    -    > // ... Use the image ...
    -    > // Now destroy it
    -    > gdImageDestroy(im);
    +	(end code)
     
     */
     
    @@ -395,17 +412,55 @@ BGD_DECLARE(void) gdImageDestroy (gdImagePtr im)
     	gdFree (im);
     }
     
    -/*
    -	Function: gdImageColorClosest
    -*/
    +/**
    + * Group: Color
    + */
    +
    +/**
    + * Function: gdImageColorClosest
    + * 
    + * Gets the closest color of the image
    + *
    + * This is a simplified variant of <gdImageColorClosestAlpha> where the alpha
    + * channel is always opaque.
    + *
    + * Parameters:
    + *   im - The image.
    + *   r  - The value of the red component.
    + *   g  - The value of the green component.
    + *   b  - The value of the blue component.
    + *
    + * Returns:
    + *   The closest color already available in the palette for palette images;
    + *   the color value of the given components for truecolor images.
    + *
    + * See also:
    + *   - <gdImageColorExact>
    + */
     BGD_DECLARE(int) gdImageColorClosest (gdImagePtr im, int r, int g, int b)
     {
     	return gdImageColorClosestAlpha (im, r, g, b, gdAlphaOpaque);
     }
     
    -/*
    -	Function: gdImageColorClosestAlpha
    -*/
    +/**
    + * Function: gdImageColorClosestAlpha
    + *
    + * Gets the closest color of the image
    + *
    + * Parameters:
    + *   im - The image.
    + *   r  - The value of the red component.
    + *   g  - The value of the green component.
    + *   b  - The value of the blue component.
    + *   a  - The value of the alpha component.
    + *
    + * Returns:
    + *   The closest color already available in the palette for palette images;
    + *   the color value of the given components for truecolor images.
    + *
    + * See also:
    + *   - <gdImageColorExactAlpha>
    + */
     BGD_DECLARE(int) gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a)
     {
     	int i;
    @@ -601,17 +656,54 @@ BGD_DECLARE(int) gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b)
     	return ct;
     }
     
    -/*
    -	Function: gdImageColorExact
    -*/
    +/**
    + * Function: gdImageColorExact
    + *
    + * Gets the exact color of the image
    + *
    + * This is a simplified variant of <gdImageColorExactAlpha> where the alpha
    + * channel is always opaque.
    + *
    + * Parameters:
    + *   im - The image.
    + *   r  - The value of the red component.
    + *   g  - The value of the green component.
    + *   b  - The value of the blue component.
    + *
    + * Returns:
    + *   The exact color already available in the palette for palette images; if
    + *   there is no exact color, -1 is returned.
    + *   For truecolor images the color value of the given components is returned.
    + *
    + * See also:
    + *   - <gdImageColorClosest>
    + */
     BGD_DECLARE(int) gdImageColorExact (gdImagePtr im, int r, int g, int b)
     {
     	return gdImageColorExactAlpha (im, r, g, b, gdAlphaOpaque);
     }
     
    -/*
    -	Function: gdImageColorExactAlpha
    -*/
    +/**
    + * Function: gdImageColorExactAlpha
    + *
    + * Gets the exact color of the image
    + *
    + * Parameters:
    + *   im - The image.
    + *   r  - The value of the red component.
    + *   g  - The value of the green component.
    + *   b  - The value of the blue component.
    + *   a  - The value of the alpha component.
    + *
    + * Returns:
    + *   The exact color already available in the palette for palette images; if
    + *   there is no exact color, -1 is returned.
    + *   For truecolor images the color value of the given components is returned.
    + *
    + * See also:
    + *   - <gdImageColorClosestAlpha>
    + *   - <gdTrueColorAlpha>
    + */
     BGD_DECLARE(int) gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a)
     {
     	int i;
    @@ -630,17 +722,51 @@ BGD_DECLARE(int) gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int
     	return -1;
     }
     
    -/*
    -	Function: gdImageColorAllocate
    -*/
    +/**
    + * Function: gdImageColorAllocate
    + *
    + * Allocates a color
    + *
    + * This is a simplified variant of <gdImageColorAllocateAlpha> where the alpha
    + * channel is always opaque.
    + *
    + * Parameters:
    + *   im - The image.
    + *   r  - The value of the red component.
    + *   g  - The value of the green component.
    + *   b  - The value of the blue component.
    + *
    + * Returns:
    + *   The color value.
    + *
    + * See also:
    + *   - <gdImageColorDeallocate>
    + */
     BGD_DECLARE(int) gdImageColorAllocate (gdImagePtr im, int r, int g, int b)
     {
     	return gdImageColorAllocateAlpha (im, r, g, b, gdAlphaOpaque);
     }
     
    -/*
    -	Function: gdImageColorAllocateAlpha
    -*/
    +/**
    + * Function: gdImageColorAllocateAlpha
    + *
    + * Allocates a color
    + *
    + * This is typically used for palette images, but can be used for truecolor
    + * images as well.
    + *
    + * Parameters:
    + *   im - The image.
    + *   r  - The value of the red component.
    + *   g  - The value of the green component.
    + *   b  - The value of the blue component.
    + *
    + * Returns:
    + *   The color value.
    + *
    + * See also:
    + *   - <gdImageColorDeallocate>
    + */
     BGD_DECLARE(int) gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b, int a)
     {
     	int i;
    @@ -673,9 +799,11 @@ BGD_DECLARE(int) gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b,
     	Function: gdImageColorResolve
     
     	gdImageColorResolve is an alternative for the code fragment
    -	| if ((color=gdImageColorExact(im,R,G,B)) < 0)
    -	|   if ((color=gdImageColorAllocate(im,R,G,B)) < 0)
    -	|     color=gdImageColorClosest(im,R,G,B);
    +	(start code)
    +	if ((color=gdImageColorExact(im,R,G,B)) < 0)
    +	  if ((color=gdImageColorAllocate(im,R,G,B)) < 0)
    +	    color=gdImageColorClosest(im,R,G,B);
    +	(end code)
     	in a single function.    Its advantage is that it is guaranteed to
     	return a color index in one search over the color table.
     */
    @@ -739,9 +867,21 @@ BGD_DECLARE(int) gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, i
     	return op;			/* Return newly allocated color */
     }
     
    -/*
    -	Function: gdImageColorDeallocate
    -*/
    +/**
    + * Function: gdImageColorDeallocate
    + *
    + * Removes a palette entry
    + *
    + * This is a no-op for truecolor images.
    + *
    + * Parameters:
    + *   im    - The image.
    + *   color - The palette index.
    + *
    + * See also:
    + *   - <gdImageColorAllocate>
    + *   - <gdImageColorAllocateAlpha>
    + */
     BGD_DECLARE(void) gdImageColorDeallocate (gdImagePtr im, int color)
     {
     	if (im->trueColor || (color >= gdMaxColors) || (color < 0)) {
    @@ -751,9 +891,18 @@ BGD_DECLARE(void) gdImageColorDeallocate (gdImagePtr im, int color)
     	im->open[color] = 1;
     }
     
    -/*
    -	Function: gdImageColorTransparent
    -*/
    +/**
    + * Function: gdImageColorTransparent
    + *
    + * Sets the transparent color of the image
    + *
    + * Parameter:
    + *   im    - The image.
    + *   color - The color.
    + *
    + * See also:
    + *   - <gdImageGetTransparent>
    + */
     BGD_DECLARE(void) gdImageColorTransparent (gdImagePtr im, int color)
     {
     	if (color < 0) {
    @@ -1084,6 +1233,10 @@ clip_1d (int *x0, int *y0, int *x1, int *y1, int mindim, int maxdim)
     
     /* end of line clipping code */
     
    +/**
    + * Group: Pixels
    + */
    +
     /*
     	Function: gdImageSetPixel
     */
    @@ -1278,9 +1431,21 @@ gdImageTileApply (gdImagePtr im, int x, int y)
     	}
     }
     
    -/*
    -	Function: gdImageGetPixel
    -*/
    +/**
    + * Function: gdImageGetPixel
    + *
    + * Gets a pixel color as stored in the image.
    + *
    + * Parameters:
    + *   im - The image.
    + *   x  - The x-coordinate.
    + *   y  - The y-coordinate.
    + *
    + * See also:
    + *   - <gdImageGetTrueColorPixel>
    + *   - <gdImagePalettePixel>
    + *   - <gdImageTrueColorPixel>
    + */
     BGD_DECLARE(int) gdImageGetPixel (gdImagePtr im, int x, int y)
     {
     	if (gdImageBoundsSafeMacro (im, x, y)) {
    @@ -1294,9 +1459,20 @@ BGD_DECLARE(int) gdImageGetPixel (gdImagePtr im, int x, int y)
     	}
     }
     
    -/*
    -	Function: gdImageGetTrueColorPixel
    -*/
    +/**
    + * Function: gdImageGetTrueColorPixel
    + *
    + * Gets a pixel color always as truecolor value.
    + *
    + * Parameters:
    + *   im - The image.
    + *   x  - The x-coordinate.
    + *   y  - The y-coordinate.
    + *
    + * See also:
    + *   - <gdImageGetPixel>
    + *   - <gdImageTrueColorPixel>
    + */
     BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
     {
     	int p = gdImageGetPixel (im, x, y);
    @@ -1309,6 +1485,10 @@ BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
     	}
     }
     
    +/**
    + * Group: Primitives
    + */
    +
     /*
     	Function: gdImageAABlend
     	
    @@ -1686,9 +1866,25 @@ BGD_DECLARE(int) gdImageBoundsSafe (gdImagePtr im, int x, int y)
     	return gdImageBoundsSafeMacro (im, x, y);
     }
     
    -/*
    -	Function: gdImageChar
    -*/
    +/**
    + * Function: gdImageChar
    + *
    + * Draws a single character.
    + *
    + * Parameters:
    + *  im    - The image to draw onto.
    + *  f     - The raster font.
    + *  x     - The x coordinate of the upper left pixel.
    + *  y     - The y coordinate of the upper left pixel.
    + *  c     - The character.
    + *  color - The color.
    + *
    + * Variants:
    + *  - <gdImageCharUp>
    + *
    + * See also:
    + *  - <gdFontPtr>
    + */
     BGD_DECLARE(void) gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color)
     {
     	int cx, cy;
    @@ -1715,9 +1911,9 @@ BGD_DECLARE(void) gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c,
     	}
     }
     
    -/*
    -	Function: gdImageCharUp
    -*/
    +/**
    + * Function: gdImageCharUp
    + */
     BGD_DECLARE(void) gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color)
     {
     	int cx, cy;
    @@ -1744,9 +1940,28 @@ BGD_DECLARE(void) gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c
     	}
     }
     
    -/*
    -	Function: gdImageString
    -*/
    +/**
    + * Function: gdImageString
    + * 
    + * Draws a character string.
    + *
    + * Parameters:
    + *  im    - The image to draw onto.
    + *  f     - The raster font.
    + *  x     - The x coordinate of the upper left pixel.
    + *  y     - The y coordinate of the upper left pixel.
    + *  c     - The character string.
    + *  color - The color.
    + *
    + * Variants:
    + *  - <gdImageStringUp>
    + *  - <gdImageString16>
    + *  - <gdImageStringUp16>
    + *
    + * See also:
    + *  - <gdFontPtr>
    + *  - <gdImageStringTTF>
    + */
     BGD_DECLARE(void) gdImageString (gdImagePtr im, gdFontPtr f,
     								 int x, int y, unsigned char *s, int color)
     {
    @@ -1759,9 +1974,9 @@ BGD_DECLARE(void) gdImageString (gdImagePtr im, gdFontPtr f,
     	}
     }
     
    -/*
    -	Function: gdImageStringUp
    -*/
    +/**
    + * Function: gdImageStringUp
    + */
     BGD_DECLARE(void) gdImageStringUp (gdImagePtr im, gdFontPtr f,
     								   int x, int y, unsigned char *s, int color)
     {
    @@ -1776,9 +1991,9 @@ BGD_DECLARE(void) gdImageStringUp (gdImagePtr im, gdFontPtr f,
     
     static int strlen16 (unsigned short *s);
     
    -/*
    -	Function: gdImageString16
    -*/
    +/**
    + * Function: gdImageString16
    + */
     BGD_DECLARE(void) gdImageString16 (gdImagePtr im, gdFontPtr f,
     								   int x, int y, unsigned short *s, int color)
     {
    @@ -1791,9 +2006,9 @@ BGD_DECLARE(void) gdImageString16 (gdImagePtr im, gdFontPtr f,
     	}
     }
     
    -/*
    -	Function: gdImageStringUp16
    -*/
    +/**
    + * Function: gdImageStringUp16
    + */
     BGD_DECLARE(void) gdImageStringUp16 (gdImagePtr im, gdFontPtr f,
     									 int x, int y, unsigned short *s, int color)
     {
    @@ -2394,9 +2609,26 @@ skip:
     	gdFree(stack);
     }
     
    -/*
    -	Function: gdImageRectangle
    -*/
    +/**
    + * Function: gdImageRectangle
    + *
    + * Draws a rectangle.
    + *
    + * Parameters:
    + *   im    - The image.
    + *   x1    - The x-coordinate of the upper left corner.
    + *   y1    - The y-coordinate of the upper left corner.
    + *   x2    - The x-coordinate of the lower right corner.
    + *   y2    - The y-coordinate of the lower right corner.
    + *   color - The color.
    + *
    + * Note that x1,y1 and x2,y2 may be swapped, i.e. the former may designate the
    + * lower right corner and the latter the upper left corner. The behavior for
    + * specifying other corners is undefined.
    + *
    + * See also:
    + *   - <gdImageFilledRectangle>
    + */
     BGD_DECLARE(void) gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
     {
     	int thick = im->thick;
    @@ -2406,16 +2638,6 @@ BGD_DECLARE(void) gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y
     		return;
     	}
     
    -	if (x1 == x2 && y1 == y2) {
    -		gdImageSetPixel(im, x1, y1, color);
    -		return;
    -	}
    -
    -	if (x1 == x2 || y1 == y2) {
    -		gdImageLine(im, x1, y1, x2, y2, color);
    -		return;
    -	}
    -
     	if (y2 < y1) {
     		int t;
     		t = y1;
    @@ -2470,10 +2692,14 @@ BGD_DECLARE(void) gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y
     
     		return;
     	} else {
    -		gdImageLine(im, x1, y1, x2, y1, color);
    -		gdImageLine(im, x1, y2, x2, y2, color);
    -		gdImageLine(im, x1, y1 + 1, x1, y2 - 1, color);
    -		gdImageLine(im, x2, y1 + 1, x2, y2 - 1, color);
    +		if (x1 == x2 || y1 == y2) {
    +			gdImageLine(im, x1, y1, x2, y2, color);
    +		} else {
    +			gdImageLine(im, x1, y1, x2, y1, color);
    +			gdImageLine(im, x1, y2, x2, y2, color);
    +			gdImageLine(im, x1, y1 + 1, x1, y2 - 1, color);
    +			gdImageLine(im, x2, y1 + 1, x2, y2 - 1, color);
    +		}
     	}
     }
     
    @@ -2576,9 +2802,23 @@ BGD_DECLARE(void) gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2,
     	_gdImageFilledVRectangle(im, x1, y1, x2, y2, color);
     }
     
    -/*
    -	Function: gdImageClone
    -*/
    +/**
    + * Group: Cloning and Copying
    + */
    +
    +/**
    + * Function: gdImageClone
    + *
    + * Clones an image
    + *
    + * Creates an exact duplicate of the given image.
    + *
    + * Parameters:
    + *   src - The source image.
    + *
    + * Returns:
    + *   The cloned image on success, NULL on failure.
    + */
     BGD_DECLARE(gdImagePtr) gdImageClone (gdImagePtr src) {
     	gdImagePtr dst;
     	register int i, x;
    @@ -2637,7 +2877,7 @@ BGD_DECLARE(gdImagePtr) gdImageClone (gdImagePtr src) {
     	dst->cy2 = src->cy2;
     
     	dst->res_x = src->res_x;
    -	dst->res_y = src->res_x;
    +	dst->res_y = src->res_y;
     
     	dst->paletteQuantizationMethod     = src->paletteQuantizationMethod;
     	dst->paletteQuantizationSpeed      = src->paletteQuantizationSpeed;
    @@ -2674,9 +2914,25 @@ BGD_DECLARE(gdImagePtr) gdImageClone (gdImagePtr src) {
     	return dst;
     }
     
    -/*
    -	Function: gdImageCopy
    -*/
    +/**
    + * Function: gdImageCopy
    + *
    + * Copy an area of an image to another image
    + *
    + * Parameters:
    + *   dst  - The destination image.
    + *   src  - The source image.
    + *   dstX - The x-coordinate of the upper left corner to copy to.
    + *   dstY - The y-coordinate of the upper left corner to copy to.
    + *   srcX - The x-coordinate of the upper left corner to copy from.
    + *   srcY - The y-coordinate of the upper left corner to copy from.
    + *   w    - The width of the area to copy.
    + *   h    - The height of the area to copy.
    + *
    + * See also:
    + *   - <gdImageCopyMerge>
    + *   - <gdImageCopyMergeGray>
    + */
     BGD_DECLARE(void) gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX,
     							   int srcY, int w, int h)
     {
    @@ -2764,12 +3020,32 @@ BGD_DECLARE(void) gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dst
     	}
     }
     
    -/*
    -	Function: gdImageCopyMerge
    -
    -	This function is a substitute for real alpha channel operations,
    -	so it doesn't pay attention to the alpha channel.
    -*/
    +/**
    + * Function: gdImageCopyMerge
    + *
    + * Copy an area of an image to another image ignoring alpha
    + *
    + * The source area will be copied to the destination are by merging the pixels.
    + *
    + * Note:
    + *   This function is a substitute for real alpha channel operations,
    + *   so it doesn't pay attention to the alpha channel.
    + *
    + * Parameters:
    + *   dst  - The destination image.
    + *   src  - The source image.
    + *   dstX - The x-coordinate of the upper left corner to copy to.
    + *   dstY - The y-coordinate of the upper left corner to copy to.
    + *   srcX - The x-coordinate of the upper left corner to copy from.
    + *   srcY - The y-coordinate of the upper left corner to copy from.
    + *   w    - The width of the area to copy.
    + *   h    - The height of the area to copy.
    + *   pct  - The percentage in range 0..100.
    + *
    + * See also:
    + *   - <gdImageCopy>
    + *   - <gdImageCopyMergeGray>
    + */
     BGD_DECLARE(void) gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
     									int srcX, int srcY, int w, int h, int pct)
     {
    @@ -2812,12 +3088,33 @@ BGD_DECLARE(void) gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, in
     	}
     }
     
    -/*
    -	Function: gdImageCopyMergeGray
    -
    -	This function is a substitute for real alpha channel operations,
    -	so it doesn't pay attention to the alpha channel.
    -*/
    +/**
    + * Function: gdImageCopyMergeGray
    + *
    + * Copy an area of an image to another image ignoring alpha
    + *
    + * The source area will be copied to the grayscaled destination area by merging
    + * the pixels.
    + *
    + * Note:
    + *   This function is a substitute for real alpha channel operations,
    + *   so it doesn't pay attention to the alpha channel.
    + * 
    + * Parameters:
    + *   dst  - The destination image.
    + *   src  - The source image.
    + *   dstX - The x-coordinate of the upper left corner to copy to.
    + *   dstY - The y-coordinate of the upper left corner to copy to.
    + *   srcX - The x-coordinate of the upper left corner to copy from.
    + *   srcY - The y-coordinate of the upper left corner to copy from.
    + *   w    - The width of the area to copy.
    + *   h    - The height of the area to copy.
    + *   pct  - The percentage of the source color intensity in range 0..100.
    + *
    + * See also:
    + *   - <gdImageCopy>
    + *   - <gdImageCopyMerge>
    + */
     BGD_DECLARE(void) gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
     										int srcX, int srcY, int w, int h, int pct)
     {
    @@ -2876,9 +3173,30 @@ BGD_DECLARE(void) gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX
     	}
     }
     
    -/*
    -	Function: gdImageCopyResized
    -*/
    +/**
    + * Function: gdImageCopyResized
    + *
    + * Copy a resized area from an image to another image
    + *
    + * If the source and destination area differ in size, the area will be resized
    + * using nearest-neighbor interpolation.
    + * 
    + * Parameters:
    + *   dst  - The destination image.
    + *   src  - The source image.
    + *   dstX - The x-coordinate of the upper left corner to copy to.
    + *   dstY - The y-coordinate of the upper left corner to copy to.
    + *   srcX - The x-coordinate of the upper left corner to copy from.
    + *   srcY - The y-coordinate of the upper left corner to copy from.
    + *   dstW - The width of the area to copy to.
    + *   dstH - The height of the area to copy to.
    + *   srcW - The width of the area to copy from.
    + *   srcH - The height of the area to copy from.
    + *
    + * See also:
    + *   - <gdImageCopyResampled>
    + *   - <gdImageScale>
    + */
     BGD_DECLARE(void) gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
     									  int srcX, int srcY, int dstW, int dstH, int srcW,
     									  int srcH)
    @@ -3007,17 +3325,27 @@ BGD_DECLARE(void) gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX,
     	gdFree (sty);
     }
     
    -/* 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. */
    -
    -/*
    -	Function: gdImageCopyRotated
    -*/
    +/**
    + * Function: gdImageCopyRotated
    + *
    + * Copy a rotated area from an image to another image
    + *
    + * The area is counter-clockwise rotated using nearest-neighbor interpolation.
    + *
    + * Parameters:
    + *   dst   - The destination image.
    + *   src   - The source image.
    + *   dstX  - The x-coordinate of the center of the area to copy to.
    + *   dstY  - The y-coordinate of the center of the area to copy to.
    + *   srcX  - The x-coordinate of the upper left corner to copy from.
    + *   srcY  - The y-coordinate of the upper left corner to copy from.
    + *   srcW  - The width of the area to copy from.
    + *   srcH  - The height of the area to copy from.
    + *   angle - The angle in degrees.
    + *
    + * See also:
    + *   - <gdImageRotateInterpolated>
    + */
     BGD_DECLARE(void) gdImageCopyRotated (gdImagePtr dst,
     									  gdImagePtr src,
     									  double dstX, double dstY,
    @@ -3101,9 +3429,31 @@ BGD_DECLARE(void) gdImageCopyRotated (gdImagePtr dst,
     #define floor2(exp) ((long) exp)
     /*#define floor2(exp) floor(exp)*/
     
    -/*
    -	Function: gdImageCopyResampled
    -*/
    +/**
    + * Function: gdImageCopyResampled
    + *
    + * Copy a resampled area from an image to another image
    + *
    + * If the source and destination area differ in size, the area will be resized
    + * using bilinear interpolation for truecolor images, and nearest-neighbor
    + * interpolation for palette images.
    + * 
    + * Parameters:
    + *   dst  - The destination image.
    + *   src  - The source image.
    + *   dstX - The x-coordinate of the upper left corner to copy to.
    + *   dstY - The y-coordinate of the upper left corner to copy to.
    + *   srcX - The x-coordinate of the upper left corner to copy from.
    + *   srcY - The y-coordinate of the upper left corner to copy from.
    + *   dstW - The width of the area to copy to.
    + *   dstH - The height of the area to copy to.
    + *   srcW - The width of the area to copy from.
    + *   srcH - The height of the area to copy from.
    + *
    + * See also:
    + *   - <gdImageCopyResized>
    + *   - <gdImageScale>
    + */
     BGD_DECLARE(void) gdImageCopyResampled (gdImagePtr dst,
     										gdImagePtr src,
     										int dstX, int dstY,
    @@ -3206,9 +3556,25 @@ BGD_DECLARE(void) gdImageCopyResampled (gdImagePtr dst,
     	}
     }
     
    -/*
    -	Function: gdImagePolygon
    -*/
    +/**
    + * Group: Polygons
    + */
    +
    +/**
    + * Function: gdImagePolygon
    + *
    + * Draws a closed polygon
    + *
    + * Parameters:
    + *   im - The image.
    + *   p  - The vertices as array of <gdPoint>s.
    + *   n  - The number of vertices.
    + *   c  - The color.
    + *
    + * See also:
    + *   - <gdImageOpenPolygon>
    + *   - <gdImageFilledPolygon>
    + */
     BGD_DECLARE(void) gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c)
     {
     	if (n <= 0) {
    @@ -3220,9 +3586,20 @@ BGD_DECLARE(void) gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c)
     	gdImageOpenPolygon (im, p, n, c);
     }
     
    -/*
    -	Function: gdImageOpenPolygon
    -*/
    +/**
    + * Function: gdImageOpenPolygon
    + *
    + * Draws an open polygon
    + *
    + * Parameters:
    + *   im - The image.
    + *   p  - The vertices as array of <gdPoint>s.
    + *   n  - The number of vertices.
    + *   c  - The color
    + *
    + * See also:
    + *   - <gdImagePolygon>
    + */
     BGD_DECLARE(void) gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
     {
     	int i;
    @@ -3250,9 +3627,24 @@ BGD_DECLARE(void) gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
     /* That could help to adjust intersections  to produce a nice */
     /* interior_extrema. */
     
    -/*
    -	Function: gdImageFilledPolygon
    -*/
    +/**
    + * Function: gdImageFilledPolygon
    + *
    + * Draws a filled polygon
    + *
    + * The polygon is filled using the even-odd fillrule what can leave unfilled
    + * regions inside of self-intersecting polygons. This behavior might change in
    + * a future version.
    + *
    + * Parameters:
    + *   im - The image.
    + *   p  - The vertices as array of <gdPoint>s.
    + *   n  - The number of vertices.
    + *   c  - The color
    + *
    + * See also:
    + *   - <gdImagePolygon>
    + */
     BGD_DECLARE(void) gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
     {
     	int i;
    @@ -3394,11 +3786,22 @@ BGD_DECLARE(void) gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int
     	}
     }
     
    +/**
    + * Group: other
    + */
    +
     static void gdImageSetAAPixelColor(gdImagePtr im, int x, int y, int color, int t);
     
    -/*
    -	Function: gdImageSetStyle
    -*/
    +/**
    + * Function: gdImageSetStyle
    + *
    + * Sets the style for following drawing operations
    + *
    + * Parameters:
    + *   im        - The image.
    + *   style     - An array of color values.
    + *   noOfPixel - The number of color values.
    + */
     BGD_DECLARE(void) gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels)
     {
     	if (im->style) {
    @@ -3416,17 +3819,29 @@ BGD_DECLARE(void) gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels)
     	im->stylePos = 0;
     }
     
    -/*
    -	Function: gdImageSetThickness
    -*/
    +/**
    + * Function: gdImageSetThickness
    + *
    + * Sets the thickness for following drawing operations
    + *
    + * Parameters:
    + *   im        - The image.
    + *   thickness - The thickness in pixels.
    + */
     BGD_DECLARE(void) gdImageSetThickness (gdImagePtr im, int thickness)
     {
     	im->thick = thickness;
     }
     
    -/*
    -	Function: gdImageSetBrush
    -*/
    +/**
    + * Function: gdImageSetBrush
    + *
    + * Sets the brush for following drawing operations
    + *
    + * Parameters:
    + *   im    - The image.
    + *   brush - The brush image.
    + */
     BGD_DECLARE(void) gdImageSetBrush (gdImagePtr im, gdImagePtr brush)
     {
     	int i;
    @@ -3464,9 +3879,26 @@ BGD_DECLARE(void) gdImageSetTile (gdImagePtr im, gdImagePtr tile)
     	}
     }
     
    -/*
    -	Function: gdImageSetAntiAliased
    -*/
    +/**
    + * Function: gdImageSetAntiAliased
    + *
    + * Set the color for subsequent anti-aliased drawing
    + *
    + * If <gdAntiAliased> is passed as color to drawing operations that support
    + * anti-aliased drawing (such as <gdImageLine> and <gdImagePolygon>), the actual
    + * color to be used can be set with this function.
    + *
    + * Example: draw an anti-aliased blue line:
    + * | gdImageSetAntiAliased(im, gdTrueColorAlpha(0, 0, gdBlueMax, gdAlphaOpaque));
    + * | gdImageLine(im, 10,10, 20,20, gdAntiAliased);
    + *
    + * Parameters:
    + *   im - The image.
    + *   c  - The color.
    + *
    + * See also:
    + *   - <gdImageSetAntiAliasedDontBlend>
    + */
     BGD_DECLARE(void) gdImageSetAntiAliased (gdImagePtr im, int c)
     {
     	im->AA = 1;
    @@ -3474,9 +3906,20 @@ BGD_DECLARE(void) gdImageSetAntiAliased (gdImagePtr im, int c)
     	im->AA_dont_blend = -1;
     }
     
    -/*
    -	Function: gdImageSetAntiAliasedDontBlend
    -*/
    +/**
    + * Function: gdImageSetAntiAliasedDontBlend
    + *
    + * Set the color and "dont_blend" color for subsequent anti-aliased drawing
    + *
    + * This extended variant of <gdImageSetAntiAliased> allows to also specify a
    + * (background) color that will not be blended in anti-aliased drawing
    + * operations.
    + *
    + * Parameters:
    + *   im         - The image.
    + *   c          - The color.
    + *   dont_blend - Whether to blend.
    + */
     BGD_DECLARE(void) gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont_blend)
     {
     	im->AA = 1;
    @@ -3484,17 +3927,39 @@ BGD_DECLARE(void) gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont
     	im->AA_dont_blend = dont_blend;
     }
     
    -/*
    -	Function: gdImageInterlace
    +/**
    + * Function: gdImageInterlace
    + *
    + * Sets whether an image is interlaced
    + *
    + * This is relevant only when saving the image in a format that supports
    + * interlacing.
    + *
    + * Parameters:
    + *   im           - The image.
    + *   interlaceArg - Whether the image is interlaced.
    + *
    + * See also:
    + *   - <gdImageGetInterlaced>
     */
     BGD_DECLARE(void) gdImageInterlace (gdImagePtr im, int interlaceArg)
     {
     	im->interlace = interlaceArg;
     }
     
    -/*
    -	Function: gdImageCompare
    -*/
    +/**
    + * Function: gdImageCompare
    + *
    + * Compare two images
    + *
    + * Parameters:
    + *   im1 - An image.
    + *   im2 - Another image.
    + *
    + * Returns:
    + *   A bitmask of <Image Comparison> flags where each set flag signals
    + *   which attributes of the images are different.
    + */
     BGD_DECLARE(int) gdImageCompare (gdImagePtr im1, gdImagePtr im2)
     {
     	int x, y;
    @@ -3577,9 +4042,20 @@ BGD_DECLARE(int) gdImageCompare (gdImagePtr im1, gdImagePtr im2)
     	of gdAlphaBlend(), which merges alpha in the
     	destination color much better. */
     
    -/*
    -	Function: gdAlphaBlend
    -*/
    +/**
    + * Function: gdAlphaBlend
    + *
    + * Blend two colors
    + *
    + * Parameters:
    + *   dst - The color to blend onto.
    + *   src - The color to blend.
    + *
    + * See also:
    + *   - <gdImageAlphaBlending>
    + *   - <gdLayerOverlay>
    + *   - <gdLayerMultiply>
    + */
     BGD_DECLARE(int) gdAlphaBlend (int dst, int src)
     {
     	int src_alpha = gdTrueColorGetAlpha(src);
    @@ -3627,9 +4103,20 @@ BGD_DECLARE(int) gdAlphaBlend (int dst, int src)
     
     static int gdAlphaOverlayColor (int src, int dst, int max );
     
    -/*
    -	Function: gdLayerOverlay
    -*/
    +/**
    + * Function: gdLayerOverlay
    + *
    + * Overlay two colors
    + *
    + * Parameters:
    + *   dst - The color to overlay onto.
    + *   src - The color to overlay.
    + *
    + * See also:
    + *   - <gdImageAlphaBlending>
    + *   - <gdAlphaBlend>
    + *   - <gdLayerMultiply>
    + */
     BGD_DECLARE(int) gdLayerOverlay (int dst, int src)
     {
     	int a1, a2;
    @@ -3655,11 +4142,20 @@ static int gdAlphaOverlayColor (int src, int dst, int max )
     	}
     }
     
    -/*
    -	Function: gdLayerMultiply
    -
    -	Apply 'multiply' effect.
    -*/
    +/**
    + * Function: gdLayerMultiply
    + *
    + * Overlay two colors with multiply effect
    + *
    + * Parameters:
    + *   dst - The color to overlay onto.
    + *   src - The color to overlay.
    + *
    + * See also:
    + *   - <gdImageAlphaBlending>
    + *   - <gdAlphaBlend>
    + *   - <gdLayerOverlay>
    + */
     BGD_DECLARE(int) gdLayerMultiply (int dst, int src)
     {
     	int a1, a2, r1, r2, g1, g2, b1, b2;
    @@ -3682,25 +4178,57 @@ BGD_DECLARE(int) gdLayerMultiply (int dst, int src)
     		);
     }
     
    -/*
    -	Function: gdImageAlphaBlending
    -*/
    +/**
    + *	Function: gdImageAlphaBlending
    + *
    + *	Set the effect for subsequent drawing operations
    + *
    + *	Note that the effect is used for truecolor images only.
    + *
    + * Parameters:
    + *   im               - The image.
    + *   alphaBlendingArg - The effect.
    + *
    + * See also:
    + *   - <Effects>
    + */
     BGD_DECLARE(void) gdImageAlphaBlending (gdImagePtr im, int alphaBlendingArg)
     {
     	im->alphaBlendingFlag = alphaBlendingArg;
     }
     
    -/*
    -	Function: gdImageSaveAlpha
    -*/
    +/**
    + * Function: gdImageSaveAlpha
    + *
    + * Sets the save alpha flag
    + *
    + * The save alpha flag specifies whether the alpha channel of the pixels should
    + * be saved. This is supported only for image formats that support full alpha
    + * transparency, e.g. PNG.
    + */
     BGD_DECLARE(void) gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg)
     {
     	im->saveAlphaFlag = saveAlphaArg;
     }
     
    -/*
    -	Function: gdImageSetClip
    -*/
    +/**
    + * Function: gdImageSetClip
    + *
    + * Sets the clipping rectangle
    + *
    + * The clipping rectangle restricts the drawing area for following drawing
    + * operations.
    + *
    + * Parameters:
    + *   im - The image.
    + *   x1 - The x-coordinate of the upper left corner.
    + *   y1 - The y-coordinate of the upper left corner.
    + *   x2 - The x-coordinate of the lower right corner.
    + *   y2 - The y-coordinate of the lower right corner.
    + *
    + * See also:
    + *   - <gdImageGetClip>
    + */
     BGD_DECLARE(void) gdImageSetClip (gdImagePtr im, int x1, int y1, int x2, int y2)
     {
     	if (x1 < 0) {
    @@ -3733,9 +4261,21 @@ BGD_DECLARE(void) gdImageSetClip (gdImagePtr im, int x1, int y1, int x2, int y2)
     	im->cy2 = y2;
     }
     
    -/*
    -	Function: gdImageGetClip
    -*/
    +/**
    + * Function: gdImageGetClip
    + *
    + * Gets the current clipping rectangle
    + *
    + * Parameters:
    + *   im - The image.
    + *   x1P - (out) The x-coordinate of the upper left corner.
    + *   y1P - (out) The y-coordinate of the upper left corner.
    + *   x2P - (out) The x-coordinate of the lower right corner.
    + *   y2P - (out) The y-coordinate of the lower right corner.
    + *
    + * See also:
    + *   - <gdImageSetClip>
    + */
     BGD_DECLARE(void) gdImageGetClip (gdImagePtr im, int *x1P, int *y1P, int *x2P, int *y2P)
     {
     	*x1P = im->cx1;
    @@ -3744,9 +4284,20 @@ BGD_DECLARE(void) gdImageGetClip (gdImagePtr im, int *x1P, int *y1P, int *x2P, i
     	*y2P = im->cy2;
     }
     
    -/*
    -	Function: gdImageSetResolution
    -*/
    +/**
    + * Function: gdImageSetResolution
    + *
    + * Sets the resolution of an image.
    + *
    + * Parameters:
    + *   im    - The image.
    + *   res_x - The horizontal resolution in DPI.
    + *   res_y - The vertical resolution in DPI.
    + *
    + * See also:
    + *   - <gdImageResolutionX>
    + *   - <gdImageResolutionY>
    + */
     BGD_DECLARE(void) gdImageSetResolution(gdImagePtr im, const unsigned int res_x, const unsigned int res_y)
     {
     	if (res_x > 0) im->res_x = res_x;
    @@ -3904,11 +4455,20 @@ static void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int co
     }
     
     
    -/*
    -	Function: gdImagePaletteToTrueColor
    -	
    -	Convert a palette image to true color.
    -*/
    +/**
    + * Function: gdImagePaletteToTrueColor
    + *
    + * Convert a palette image to true color
    + *
    + * Parameters:
    + *   src - The image.
    + *
    + * Returns:
    + *   Non-zero if the conversion succeeded, zero otherwise.
    + *
    + * See also:
    + *   - <gdImageTrueColorToPalette>
    + */
     BGD_DECLARE(int) gdImagePaletteToTrueColor(gdImagePtr src)
     {
     	unsigned int y;
    @@ -3961,6 +4521,12 @@ BGD_DECLARE(int) gdImagePaletteToTrueColor(gdImagePtr src)
     	src->pixels = NULL;
     	src->alphaBlendingFlag = 0;
     	src->saveAlphaFlag = 1;
    +
    +	if (src->transparent >= 0) {
    +		const unsigned char c = src->transparent;
    +		src->transparent =  gdTrueColorAlpha(src->red[c], src->green[c], src->blue[c], src->alpha[c]);
    +	}
    +
     	return 1;
     
     clean_on_error:
    diff --git a/Build/source/libs/gd/libgd-src/src/gd.h b/Build/source/libs/gd/libgd-src/src/gd.h
    index cf60be3ad85..5a525470f84 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd.h
    +++ b/Build/source/libs/gd/libgd-src/src/gd.h
    @@ -13,7 +13,7 @@ extern "C" {
      * trailing comment. */
     #define GD_MAJOR_VERSION    2           /*version605b5d1778*/
     #define GD_MINOR_VERSION    2           /*version605b5d1778*/
    -#define GD_RELEASE_VERSION  3           /*version605b5d1778*/
    +#define GD_RELEASE_VERSION  4           /*version605b5d1778*/
     #define GD_EXTRA_VERSION    ""          /*version605b5d1778*/
     /* End parsable section. */
     
    @@ -66,7 +66,7 @@ extern "C" {
     # define BGD_STDCALL
     # define BGD_EXPORT_DATA_IMPL
     #else
    -# if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY==1
    +# if defined(__GNUC__) || defined(__clang__)
     #  define BGD_EXPORT_DATA_PROT __attribute__ ((visibility ("default")))
     #  define BGD_EXPORT_DATA_IMPL __attribute__ ((visibility ("hidden")))
     # else
    @@ -148,10 +148,85 @@ extern "C" {
     #define gdRedMax 255
     #define gdGreenMax 255
     #define gdBlueMax 255
    +
    +/**
    + * Group: Color Decomposition
    + */
    +
    +/**
    + * Macro: gdTrueColorGetAlpha
    + *
    + * Gets the alpha channel value
    + *
    + * Parameters:
    + *   c - The color
    + *
    + * See also:
    + *   - <gdTrueColorAlpha>
    + */
     #define gdTrueColorGetAlpha(c) (((c) & 0x7F000000) >> 24)
    +
    +/**
    + * Macro: gdTrueColorGetRed
    + *
    + * Gets the red channel value
    + *
    + * Parameters:
    + *   c - The color
    + *
    + * See also:
    + *   - <gdTrueColorAlpha>
    + */
     #define gdTrueColorGetRed(c) (((c) & 0xFF0000) >> 16)
    +
    +/**
    + * Macro: gdTrueColorGetGreen
    + *
    + * Gets the green channel value
    + *
    + * Parameters:
    + *   c - The color
    + *
    + * See also:
    + *   - <gdTrueColorAlpha>
    + */
     #define gdTrueColorGetGreen(c) (((c) & 0x00FF00) >> 8)
    +
    +/**
    + * Macro: gdTrueColorGetBlue
    + *
    + * Gets the blue channel value
    + *
    + * Parameters:
    + *   c - The color
    + *
    + * See also:
    + *   - <gdTrueColorAlpha>
    + */
     #define gdTrueColorGetBlue(c) ((c) & 0x0000FF)
    +
    +/**
    + * Group: Effects
    + *
    + * The layering effect
    + * 
    + * When pixels are drawn the new colors are "mixed" with the background
    + * depending on the effect.
    + *
    + * Note that the effect does not apply to palette images, where pixels
    + * are always replaced.
    + *
    + * Modes:
    + *   gdEffectReplace    - replace pixels
    + *   gdEffectAlphaBlend - blend pixels, see <gdAlphaBlend>
    + *   gdEffectNormal     - default mode; same as gdEffectAlphaBlend
    + *   gdEffectOverlay    - overlay pixels, see <gdLayerOverlay>
    + *   gdEffectMultiply   - overlay pixels with multiply effect, see
    + *                        <gdLayerMultiply>
    + *
    + * See also:
    + *   - <gdImageAlphaBlending>
    + */
     #define gdEffectReplace 0
     #define gdEffectAlphaBlend 1
     #define gdEffectNormal 2
    @@ -174,14 +249,36 @@ extern "C" {
     BGD_DECLARE(int) gdAlphaBlend (int dest, int src);
     BGD_DECLARE(int) gdLayerOverlay (int dest, int src);
     BGD_DECLARE(int) gdLayerMultiply (int dest, int src);
    -	
    +
    +
    +/**
    + * Group: Color Quantization
    + *
    + * Enum: gdPaletteQuantizationMethod
    + *
    + * Constants:
    + *   GD_QUANT_DEFAULT  - GD_QUANT_LIQ if libimagequant is available,
    + *                       GD_QUANT_JQUANT otherwise.
    + *   GD_QUANT_JQUANT   - libjpeg's old median cut. Fast, but only uses 16-bit
    + *                       color.
    + *   GD_QUANT_NEUQUANT - NeuQuant - approximation using Kohonen neural network.
    + *   GD_QUANT_LIQ      - A combination of algorithms used in libimagequant
    + *                       aiming for the highest quality at cost of speed.
    + *
    + * Note that GD_QUANT_JQUANT does not retain the alpha channel, and
    + * GD_QUANT_NEUQUANT does not support dithering.
    + *
    + * See also:
    + *   - <gdImageTrueColorToPaletteSetMethod>
    + */
     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 */
    +	GD_QUANT_JQUANT = 1,
    +	GD_QUANT_NEUQUANT = 2,
    +	GD_QUANT_LIQ = 3
     };
     
    +
     /**
      * Group: Transform
      *
    @@ -211,8 +308,9 @@ enum gdPaletteQuantizationMethod {
      *  GD_LINEAR            - bilinear interpolation
      *
      * See also:
    - *  <gdSetInterpolationMethod>
    - **/
    + *  - <gdImageSetInterpolationMethod>
    + *  - <gdImageGetInterpolationMethod>
    + */
     typedef enum {
     	GD_DEFAULT          = 0,
     	GD_BELL,
    @@ -260,6 +358,9 @@ typedef double (* interpolation_method )(double);
     
        *gdImagePtr* is a pointer to *gdImage*.
     
    +   See also:
    +     <Accessor Macros>
    +
        (Previous versions of this library encouraged directly manipulating
        the contents ofthe struct but we are attempting to move away from
        this practice so the fields are no longer documented here.  If you
    @@ -401,7 +502,7 @@ gdPointF, *gdPointFPtr;
       A font structure, containing the bitmaps of all characters in a
       font.  Used to declare the characteristics of a font. Text-output
       functions expect these as their second argument, following the
    -  <gdImagePtr> argument.  <gdFontSmall> and <gdFontGetLarge> both
    +  <gdImagePtr> argument.  <gdFontGetSmall> and <gdFontGetLarge> both
       return one.
     
       You can provide your own font data by providing such a structure and
    @@ -459,17 +560,39 @@ BGD_DECLARE(void) gdClearErrorMethod(void);
        gdImageSetBrush(). */
     #define gdDashSize 4
     
    -/* Special colors. */
    +/**
    + * Group: Colors
    + *
    + * Colors are always of type int which is supposed to be at least 32 bit large.
    + *
    + * Kinds of colors:
    + *   true colors     - ARGB values where the alpha channel is stored as most
    + *                     significant, and the blue channel as least significant
    + *                     byte. Note that the alpha channel only uses the 7 least
    + *                     significant bits.
    + *                     Don't rely on the internal representation, though, and
    + *                     use <gdTrueColorAlpha> to compose a truecolor value, and
    + *                     <gdTrueColorGetAlpha>, <gdTrueColorGetRed>,
    + *                     <gdTrueColorGetGreen> and <gdTrueColorGetBlue> to access
    + *                     the respective channels.
    + *   palette indexes - The index of a color palette entry (0-255).
    + *   special colors  - As listed in the following section.
    + *
    + * Constants: Special Colors
    + *   gdStyled        - use the current style, see <gdImageSetStyle>
    + *   gdBrushed       - use the current brush, see <gdImageSetBrush>
    + *   gdStyledBrushed - use the current style and brush
    + *   gdTiled         - use the current tile, see <gdImageSetTile>
    + *   gdTransparent   - indicate transparency, what is not the same as the
    + *                     transparent color index; used for lines only
    + *   gdAntiAliased   - draw anti aliased
    + */
     
     #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. */
    @@ -760,6 +883,21 @@ typedef struct {
     }
     gdPoint, *gdPointPtr;
     
    +/**
    + * Typedef: gdRect
    + *
    + * A rectangle in the coordinate space of the image
    + *
    + * Members:
    + *   x      - The x-coordinate of the upper left corner.
    + *   y      - The y-coordinate of the upper left corner.
    + *   width  - The width.
    + *   height - The height.
    + *
    + * Typedef: gdRectPtr
    + *
    + * A pointer to a <gdRect>
    + */
     typedef struct {
     	int x, y;
     	int width, height;
    @@ -801,10 +939,27 @@ BGD_DECLARE(int) gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, i
     			      ((g) << 8) +  \
     			      (b))
     
    -/* Returns a truecolor value with an alpha channel component.
    -   gdAlphaMax (127, **NOT 255**) is transparent, 0 is completely
    -   opaque. */
    -
    +/**
    + * Group: Color Composition
    + *
    + * Macro: gdTrueColorAlpha
    + *
    + * Compose a truecolor value from its components
    + *
    + * Parameters:
    + *   r - The red channel (0-255)
    + *   g - The green channel (0-255)
    + *   b - The blue channel (0-255)
    + *   a - The alpha channel (0-127, where 127 is fully transparent, and 0 is
    + *       completely opaque).
    + *
    + * See also:
    + *   - <gdTrueColorGetAlpha>
    + *   - <gdTrueColorGetRed>
    + *   - <gdTrueColorGetGreen>
    + *   - <gdTrueColorGetBlue>
    + *   - <gdImageColorExactAlpha>
    + */
     #define gdTrueColorAlpha(r, g, b, a) (((a) << 24) + \
     				      ((r) << 16) + \
     				      ((g) << 8) +  \
    @@ -948,7 +1103,8 @@ BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantiza
      *   gdDisposalRestoreBackground    - First allocated color of palette
      *   gdDisposalRestorePrevious      - Restore to before start of frame
      *
    - * See also: <gdImageGifAnimAdd>
    + * See also:
    + *   - <gdImageGifAnimAdd>
      */
     enum {
     	gdDisposalUnknown,
    @@ -977,7 +1133,7 @@ BGD_DECLARE(void *) gdImageGifAnimEndPtr(int *size);
       typedef: gdSinkPtr
     
         *Note:* This interface is *obsolete* and kept only for
    -    *compatibility.  Use <gdIOCtx> instead.
    +    *compatibility*.  Use <gdIOCtx> instead.
     
         Represents a "sink" (destination) to which a PNG can be
         written. Programmers who do not wish to write PNGs to a file can
    @@ -1141,35 +1297,196 @@ BGD_DECLARE(gdImagePtr) gdImageCopyGaussianBlurred(gdImagePtr src, int radius,
                                                        double sigma);
     
     
    -/* Macros to access information about images. */
    +/**
    + * Group: Accessor Macros
    + */
     
    -/* Returns nonzero if the image is a truecolor image,
    -   zero for a palette image. */
    +/**
    + * Macro: gdImageTrueColor
    + *
    + * Whether an image is a truecolor image.
    + *
    + * Parameters:
    + *   im - The image.
    + *
    + * Returns:
    + *   Non-zero if the image is a truecolor image, zero for palette images.
    + */
     #define gdImageTrueColor(im) ((im)->trueColor)
     
    +/**
    + * Macro: gdImageSX
    + *
    + * Gets the width (in pixels) of an image.
    + * 
    + * Parameters:
    + *   im - The image.
    + */
     #define gdImageSX(im) ((im)->sx)
    +
    +/**
    + * Macro: gdImageSY
    + *
    + * Gets the height (in pixels) of an image.
    + *
    + * Parameters:
    + *   im - The image.
    + */
     #define gdImageSY(im) ((im)->sy)
    +
    +/**
    + * Macro: gdImageColorsTotal
    + *
    + * Gets the number of colors in the palette.
    + *
    + * This macro is only valid for palette images.
    + *
    + * Parameters:
    + *   im - The image
    + */
     #define gdImageColorsTotal(im) ((im)->colorsTotal)
    +
    +/**
    + * Macro: gdImageRed
    + *
    + * Gets the red component value of a given color.
    + *
    + * Parameters:
    + *   im - The image.
    + *   c  - The color.
    + */
     #define gdImageRed(im, c) ((im)->trueColor ? gdTrueColorGetRed(c) : \
     			   (im)->red[(c)])
    +
    +/**
    + * Macro: gdImageGreen
    + *
    + * Gets the green component value of a given color.
    + *
    + * Parameters:
    + *   im - The image.
    + *   c  - The color.
    + */
     #define gdImageGreen(im, c) ((im)->trueColor ? gdTrueColorGetGreen(c) : \
     			     (im)->green[(c)])
    +
    +/**
    + * Macro: gdImageBlue
    + *
    + * Gets the blue component value of a given color.
    + *
    + * Parameters:
    + *   im - The image.
    + *   c  - The color.
    + */
     #define gdImageBlue(im, c) ((im)->trueColor ? gdTrueColorGetBlue(c) : \
     			    (im)->blue[(c)])
    +
    +/**
    + * Macro: gdImageAlpha
    + *
    + * Gets the alpha component value of a given color.
    + *
    + * Parameters:
    + *   im - The image.
    + *   c  - The color.
    + */
     #define gdImageAlpha(im, c) ((im)->trueColor ? gdTrueColorGetAlpha(c) : \
     			     (im)->alpha[(c)])
    +
    +/**
    + * Macro: gdImageGetTransparent
    + *
    + * Gets the transparent color of the image.
    + *
    + * Parameters:
    + *   im - The image.
    + *
    + * See also:
    + *   - <gdImageColorTransparent>
    + */
     #define gdImageGetTransparent(im) ((im)->transparent)
    +
    +/**
    + * Macro: gdImageGetInterlaced
    + *
    + * Whether an image is interlaced.
    + *
    + * Parameters:
    + *   im - The image.
    + *
    + * Returns:
    + *   Non-zero for interlaced images, zero otherwise.
    + *
    + * See also:
    + *   - <gdImageInterlace>
    + */
     #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. */
    +/**
    + * Macro: gdImagePalettePixel
    + *
    + * Gets the color of a pixel.
    + *
    + * Calling this macro is only valid for palette images.
    + * No bounds checking is done for the coordinates.
    + *
    + * Parameters:
    + *   im - The image.
    + *   x  - The x-coordinate.
    + *   y  - The y-coordinate.
    + *
    + * See also:
    + *   - <gdImageTrueColorPixel>
    + *   - <gdImageGetPixel>
    + */
     #define gdImagePalettePixel(im, x, y) (im)->pixels[(y)][(x)]
    +
    +/**
    + * Macro: gdImageTrueColorPixel
    + *
    + * Gets the color of a pixel.
    + *
    + * Calling this macro is only valid for truecolor images.
    + * No bounds checking is done for the coordinates.
    + *
    + * Parameters:
    + *   im - The image.
    + *   x  - The x-coordinate.
    + *   y  - The y-coordinate.
    + *
    + * See also:
    + *   - <gdImagePalettePixel>
    + *   - <gdImageGetTrueColorPixel>
    + */
     #define gdImageTrueColorPixel(im, x, y) (im)->tpixels[(y)][(x)]
     
    +/**
    + * Macro: gdImageResolutionX
    + *
    + * Gets the horizontal resolution in DPI.
    + *
    + * Parameters:
    + *   im - The image.
    + *
    + * See also:
    + *   - <gdImageResolutionY>
    + *   - <gdImageSetResolution>
    + */
     #define gdImageResolutionX(im) (im)->res_x
    +
    +/**
    + * Macro: gdImageResolutionY
    + *
    + * Gets the vertical resolution in DPI.
    + *
    + * Parameters:
    + *   im - The image.
    + *
    + * See also:
    + *   - <gdImageResolutionX>
    + *   - <gdImageSetResolution>
    + */
     #define gdImageResolutionY(im) (im)->res_y
     
     /* I/O Support routines. */
    @@ -1226,7 +1543,7 @@ BGD_DECLARE(void) gdImageFlipBoth(gdImagePtr im);
      *  GD_CROP_SIDES - Crop using colors of the 4 corners
      *
      * See also:
    - *  <gdImageAutoCrop>
    + *   - <gdImageCropAuto>
      **/
     enum gdCropMode {
     	GD_CROP_DEFAULT = 0,
    @@ -1279,15 +1596,32 @@ gdTransformAffineCopy(gdImagePtr dst, int x0, int y0, int x1, int y1,
     */
     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 */
    +/**
    + * Group: Image Comparison
    + *
    + * Constants:
    + *   GD_CMP_IMAGE       - Actual image IS different
    + *   GD_CMP_NUM_COLORS  - Number of colors in pallette differ
    + *   GD_CMP_COLOR       - Image colors differ
    + *   GD_CMP_SIZE_X      - Image width differs
    + *   GD_CMP_SIZE_Y      - Image heights differ
    + *   GD_CMP_TRANSPARENT - Transparent color differs
    + *   GD_CMP_BACKGROUND  - Background color differs
    + *   GD_CMP_INTERLACE   - Interlaced setting differs
    + *   GD_CMP_TRUECOLOR   - Truecolor vs palette differs
    + *
    + * See also:
    + *   - <gdImageCompare>
    + */
    +#define GD_CMP_IMAGE		1
    +#define GD_CMP_NUM_COLORS	2
    +#define GD_CMP_COLOR		4
    +#define GD_CMP_SIZE_X		8
    +#define GD_CMP_SIZE_Y		16
    +#define GD_CMP_TRANSPARENT	32
    +#define GD_CMP_BACKGROUND	64
    +#define GD_CMP_INTERLACE	128
    +#define GD_CMP_TRUECOLOR	256
     
     /* resolution affects ttf font rendering, particularly hinting */
     #define GD_RESOLUTION           96      /* pixels per inch */
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_bmp.c b/Build/source/libs/gd/libgd-src/src/gd_bmp.c
    index e1194c54d80..1eb2ebe0a39 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_bmp.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_bmp.c
    @@ -12,6 +12,13 @@
     
     	----------------------------------------------------------------------------
      */
    +
    +/**
    + * File: BMP IO
    + *
    + * Read and write BMP images.
    + */
    +
     /* $Id$ */
     #ifdef HAVE_CONFIG_H
     #include "config.h"
    @@ -62,6 +69,18 @@ static int gdBMPPutInt(gdIOCtx *out, int w)
     
     /*
     	Function: gdImageBmpPtr
    +
    +	Outputs the given image as BMP data, but using a <gdIOCtx> instead
    +	of a file. See <gdImageBmp>.
    +
    +	Parameters:
    +		im			- the image to save.
    +		size 		- Output: size in bytes of the result.
    +		compression - whether to apply RLE or not.
    +
    +	Returns:
    +
    +		A pointer to memory containing the image data or NULL on error.
     */
     BGD_DECLARE(void *) gdImageBmpPtr(gdImagePtr im, int *size, int compression)
     {
    @@ -76,6 +95,31 @@ BGD_DECLARE(void *) gdImageBmpPtr(gdImagePtr im, int *size, int compression)
     
     /*
     	Function: gdImageBmp
    +
    +    <gdImageBmp> outputs the specified image to the specified file in
    +    BMP format. The file must be open for writing. Under MSDOS and all
    +    versions of Windows, it is important to use "wb" as opposed to
    +    simply "w" as the mode when opening the file, and under Unix there
    +    is no penalty for doing so. <gdImageBmp> does not close the file;
    +    your code must do so.
    +
    +    In addition, <gdImageBmp> allows to specify whether RLE compression
    +    should be applied.
    +
    +	Variants:
    +
    +		<gdImageBmpCtx> write via a <gdIOCtx> instead of a file handle.
    +
    +		<gdImageBmpPtr> store the image file to memory.
    +
    +	Parameters:
    +
    +		im			- the image to save.
    +		outFile		- the output FILE* object.
    +		compression - whether to apply RLE or not.
    +
    +	Returns:
    +		nothing
     */
     BGD_DECLARE(void) gdImageBmp(gdImagePtr im, FILE *outFile, int compression)
     {
    @@ -87,6 +131,14 @@ BGD_DECLARE(void) gdImageBmp(gdImagePtr im, FILE *outFile, int compression)
     
     /*
     	Function: gdImageBmpCtx
    +
    +	Outputs the given image as BMP data, but using a <gdIOCtx> instead
    +	of a file. See <gdImageBmp>.
    +
    +	Parameters:
    +		im			- the image to save.
    +		out 		- the <gdIOCtx> to write to.
    +		compression - whether to apply RLE or not.
     */
     BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression)
     {
    @@ -102,7 +154,7 @@ BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression)
     		compression = 0;
     	}
     
    -	if (compression == 1 && !out->seek) {
    +	if (compression && !out->seek) {
     		/* Try to create a temp file where we can seek */
     		if ((tmpfile_for_compression = tmpfile()) == NULL) {
     			compression = 0;
    @@ -350,9 +402,7 @@ static int compress_row(unsigned char *row, int length)
     	}
     
     	if (compressed_run) {
    -		if (rle_type == BMP_RLE_TYPE_RLE) {
    -			compressed_length += build_rle_packet(row, rle_type, compressed_run, uncompressed_row);
    -		}
    +		compressed_length += build_rle_packet(row, rle_type, compressed_run, uncompressed_row);
     	}
     
     	gdFree(uncompressed_start);
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_color.c b/Build/source/libs/gd/libgd-src/src/gd_color.c
    index 6d8a8466b8a..ba0efd823d7 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_color.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_color.c
    @@ -5,6 +5,11 @@
     #include "gd.h"
     #include "gd_color.h"
     
    +/**
    + * The threshold method works relatively well but it can be improved.
    + * Maybe L*a*b* and Delta-E will give better results (and a better
    + * granularity).
    + */
     int gdColorMatch(gdImagePtr im, int col1, int col2, float threshold)
     {
     	const int dr = gdImageRed(im, col1) - gdImageRed(im, col2);
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_crop.c b/Build/source/libs/gd/libgd-src/src/gd_crop.c
    index 6cca8198cf0..1a6a11f73ca 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_crop.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_crop.c
    @@ -1,13 +1,24 @@
    -/* Crop support
    - * manual crop using a gdRect or automatic crop using a background
    - * color (automatic detections or using either the transparent color,
    - * black or white).
    - * An alternative method allows to crop using a given color and a
    - * threshold. It works relatively well but it can be improved.
    - * Maybe L*a*b* and Delta-E will give better results (and a better
    - * granularity).
    +/**
    + * File: Cropping
    + *
    + * Crop an image
    + *
    + * Some functions to crop images, automatically (auto detection of the border
    + * color), using a given color (with or without tolerance) or using a given
    + * rectangle.
    + * 
    + * Example:
    + *   (start code)
    + *   im2 = gdImageAutoCrop(im, GD_CROP_SIDES);
    + *   if (im2) {
    + *       gdImageDestroy(im); // unless you need the original image subsequently
    + *       // do something with the cropped image
    + *   }
    + *   gdImageDestroy(im2);
    + *   (end code)
      */
     
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
    @@ -18,22 +29,54 @@
     
     static int gdGuessBackgroundColorFromCorners(gdImagePtr im, int *color);
     
    -/*
    -	Function: gdImageCrop
    +/**
    + * Function: gdImageCrop
    + *
    + * Crop an image to a given rectangle
    + *
    + * Parameters:
    + *   src  - The image.
    + *   crop - The cropping rectangle, see <gdRect>.
    + *
    + * Returns:
    + *   The newly created cropped image, or NULL on failure.
    + *
    + * See also:
    + *   - <gdImageCropAuto>
    + *   - <gdImageCropThreshold>
      */
     BGD_DECLARE(gdImagePtr) gdImageCrop(gdImagePtr src, const gdRect *crop)
     {
     	gdImagePtr dst;
     
    -	dst = gdImageCreateTrueColor(crop->width, crop->height);
    +	if (gdImageTrueColor(src)) {
    +		dst = gdImageCreateTrueColor(crop->width, crop->height);
    +	} else {
    +		dst = gdImageCreate(crop->width, crop->height);
    +	}
     	if (!dst) return NULL;
     	gdImageCopy(dst, src, 0, 0, crop->x, crop->y, crop->width, crop->height);
     
     	return dst;
     }
     
    -/*
    -	Function: gdImageCropAuto
    +/**
    + * Function: gdImageCropAuto
    + *
    + * Crop an image automatically
    + *
    + * This function detects the cropping area according to the given _mode_.
    + *
    + * Parameters:
    + *   im   - The image.
    + *   mode - The cropping mode, see <gdCropMode>.
    + *
    + * Returns:
    + *   The newly created cropped image, or NULL on failure.
    + *
    + * See also:
    + *   - <gdImageCrop>
    + *   - <gdImageCropThreshold>
      */
     BGD_DECLARE(gdImagePtr) gdImageCropAuto(gdImagePtr im, const unsigned int mode)
     {
    @@ -123,8 +166,26 @@ BGD_DECLARE(gdImagePtr) gdImageCropAuto(gdImagePtr im, const unsigned int mode)
     	return gdImageCrop(im, &crop);
     }
     
    -/*
    -	Function: gdImageCropThreshold
    +/**
    + * Function: gdImageCropThreshold
    + *
    + * Crop an image using a given color
    + *
    + * The _threshold_ defines the tolerance to be used while comparing the image
    + * color and the color to crop. The method used to calculate the color
    + * difference is based on the color distance in the RGB(A) cube.
    + *
    + * Parameters:
    + *   im        - The image.
    + *   color     - The crop color.
    + *   threshold - The crop threshold.
    + * 
    + * Returns:
    + *   The newly created cropped image, or NULL on failure.
    + *
    + * See also:
    + *   - <gdImageCrop>
    + *   - <gdImageCropAuto>
      */
     BGD_DECLARE(gdImagePtr) gdImageCropThreshold(gdImagePtr im, const unsigned int color, const float threshold)
     {
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_filter.c b/Build/source/libs/gd/libgd-src/src/gd_filter.c
    index d3a5918addc..0d52e060f60 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_filter.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_filter.c
    @@ -1,3 +1,8 @@
    +/**
    + * File: Image Filters
    + */
    +
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
    @@ -184,10 +189,16 @@ BGD_DECLARE(int) gdImagePixelate(gdImagePtr im, int block_size, const unsigned i
     	return 1;
     }
     
    -/*
    -	Function: gdImageNegate
    -	
    -	Invert src image.
    +/**
    + * Function: gdImageNegate
    + *
    + * Invert an image
    + *
    + * Parameters:
    + *   src - The image.
    + *
    + * Returns:
    + *   Non-zero on success, zero on failure.
      */
     BGD_DECLARE(int) gdImageNegate(gdImagePtr src)
     {
    @@ -220,10 +231,16 @@ BGD_DECLARE(int) gdImageNegate(gdImagePtr src)
     	return 1;
     }
     
    -/*
    -	Function: gdImageGrayScale
    -	
    -	Convert the image src to a grayscale image.
    +/**
    + * Function: gdImageGrayScale
    + *
    + * Convert an image to grayscale
    + *
    + * Parameters:
    + *   src - The image.
    + *
    + * Returns:
    + *   Non-zero on success, zero on failure.
      */
     BGD_DECLARE(int) gdImageGrayScale(gdImagePtr src)
     {
    @@ -257,10 +274,21 @@ BGD_DECLARE(int) gdImageGrayScale(gdImagePtr src)
     	return 1;
     }
     
    -/*
    -	Function: gdImageBrightness
    -	
    -	Set the brightness level <level> for the image src.
    +/**
    + * Function: gdImageBrightness
    + *
    + * Change the brightness of an image
    + *
    + * Parameters:
    + *   src        - The image.
    + *   brightness - The value to add to the color channels of all pixels.
    + *
    + * Returns:
    + *   Non-zero on success, zero on failure.
    + *
    + * See also:
    + *   - <gdImageContrast>
    + *   - <gdImageColor>
      */
     BGD_DECLARE(int) gdImageBrightness(gdImagePtr src, int brightness)
     {
    @@ -307,8 +335,22 @@ BGD_DECLARE(int) gdImageBrightness(gdImagePtr src, int brightness)
     }
     
     
    -/*
    -	Function: gdImageContrast
    +/**
    + * Function: gdImageContrast
    + *
    + * Change the contrast of an image
    + *
    + * Parameters:
    + *   src      - The image.
    + *   contrast - The contrast adjustment value. Negative values increase, postive
    + *              values decrease the contrast. The larger the absolute value, the
    + *              stronger the effect.
    + *
    + * Returns:
    + *   Non-zero on success, zero on failure.
    + *
    + * See also:
    + *   - <gdImageBrightness>
      */
     BGD_DECLARE(int) gdImageContrast(gdImagePtr src, double contrast)
     {
    @@ -370,8 +412,23 @@ BGD_DECLARE(int) gdImageContrast(gdImagePtr src, double contrast)
     }
     
     
    -/*
    -	Function: gdImageColor
    +/**
    + * Function: gdImageColor
    + *
    + * Change channel values of an image
    + *
    + * Parameters:
    + *   src   - The image.
    + *   red   - The value to add to the red channel of all pixels.
    + *   green - The value to add to the green channel of all pixels.
    + *   blue  - The value to add to the blue channel of all pixels.
    + *   alpha - The value to add to the alpha channel of all pixels.
    + *
    + * Returns:
    + *   Non-zero on success, zero on failure.
    + *
    + * See also:
    + *   - <gdImageBrightness>
      */
     BGD_DECLARE(int) gdImageColor(gdImagePtr src, const int red, const int green, const int blue, const int alpha)
     {
    @@ -415,8 +472,29 @@ BGD_DECLARE(int) gdImageColor(gdImagePtr src, const int red, const int green, co
     	return 1;
     }
     
    -/*
    -	Function: gdImageConvolution
    +/**
    + * Function: gdImageConvolution
    + *
    + * Apply a convolution matrix to an image
    + *
    + * Depending on the matrix a wide range of effects can be accomplished, e.g.
    + * blurring, sharpening, embossing and edge detection.
    + *
    + * Parameters:
    + *   src        - The image.
    + *   filter     - The 3x3 convolution matrix.
    + *   filter_div - The value to divide the convoluted channel values by.
    + *   offset     - The value to add to the convoluted channel values.
    + *
    + * Returns:
    + *   Non-zero on success, zero on failure.
    + *
    + * See also:
    + *   - <gdImageEdgeDetectQuick>
    + *   - <gdImageGaussianBlur>
    + *   - <gdImageEmboss>
    + *   - <gdImageMeanRemoval>
    + *   - <gdImageSmooth>
      */
     BGD_DECLARE(int) gdImageConvolution(gdImagePtr src, float filter[3][3], float filter_div, float offset)
     {
    @@ -599,8 +677,22 @@ BGD_DECLARE(int) gdImageSelectiveBlur( gdImagePtr src)
     	return 1;
     }
     
    -/*
    -	Function: gdImageEdgeDetectQuick
    +/**
    + * Function: gdImageEdgeDetectQuick
    + *
    + * Edge detection of an image
    + *
    + * (see edge_detect_quick.jpg)
    + *
    + * Parameters:
    + *   src - The image.
    + *
    + * Returns:
    + *   Non-zero on success, zero on failure.
    + *
    + * See also:
    + *   - <gdImageMeanRemoval>
    + *   - <gdImageConvolution>
      */
     BGD_DECLARE(int) gdImageEdgeDetectQuick(gdImagePtr src)
     {
    @@ -642,8 +734,21 @@ BGD_DECLARE(int) gdImageGaussianBlur(gdImagePtr im)
     	return gdImageConvolution(im, filter, 16, 0);
     }
     
    -/*
    -	Function: gdImageEmboss
    +/**
    + * Function: gdImageEmboss
    + *
    + * Emboss an image
    + *
    + * (see emboss.jpg)
    + *
    + * Parameters:
    + *   im - The image.
    + *
    + * Returns:
    + *   Non-zero on success, zero on failure.
    + *
    + * See also:
    + *   - <gdImageConvolution>
      */
     BGD_DECLARE(int) gdImageEmboss(gdImagePtr im)
     {
    @@ -659,8 +764,22 @@ BGD_DECLARE(int) gdImageEmboss(gdImagePtr im)
     	return gdImageConvolution(im, filter, 1, 127);
     }
     
    -/*
    -	Function: gdImageMeanRemoval
    +/**
    + * Function: gdImageMeanRemoval
    + *
    + * Mean removal of an image
    + *
    + * (see mean_removal.jpg)
    + *
    + * Parameters:
    + *   im - The image.
    + *
    + * Returns:
    + *   Non-zero on success, zero on failure.
    + *
    + * See also:
    + *   - <gdImageEdgeDetectQuick>
    + *   - <gdImageConvolution>
      */
     BGD_DECLARE(int) gdImageMeanRemoval(gdImagePtr im)
     {
    @@ -671,8 +790,22 @@ BGD_DECLARE(int) gdImageMeanRemoval(gdImagePtr im)
     	return gdImageConvolution(im, filter, 1, 0);
     }
     
    -/*
    -	Function: gdImageSmooth
    +/**
    + * Function: gdImageSmooth
    + *
    + * Smooth an image
    + *
    + * (see smooth.jpg)
    + *
    + * Parameters:
    + *   im     - The image.
    + *   weight - The strength of the smoothing.
    + *
    + * Returns:
    + *   Non-zero on success, zero on failure.
    + *
    + * See also:
    + *   - <gdImageConvolution>
      */
     BGD_DECLARE(int) gdImageSmooth(gdImagePtr im, float weight)
     {
    @@ -838,15 +971,17 @@ applyCoeffs(gdImagePtr src, gdImagePtr dst, double *coeffs, int radius,
         truecolor.
     
       Example:
    +    (start code)
     
    -    > FILE *in;
    -    > gdImagePtr result, src;
    -    > 
    -    > in = fopen("foo.png", "rb");
    -    > src = gdImageCreateFromPng(in);
    -    >
    -    > result = gdImageCopyGaussianBlurred(im, src->sx / 10, -1.0);
    +    FILE *in;
    +    gdImagePtr result, src;
    +     
    +    in = fopen("foo.png", "rb");
    +    src = gdImageCreateFromPng(in);
    +    
    +    result = gdImageCopyGaussianBlurred(im, src->sx / 10, -1.0);
     
    +    (end code)
     */
     
     /* TODO: Look into turning this into a generic seperable filter
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_gd.c b/Build/source/libs/gd/libgd-src/src/gd_gd.c
    index 13defa09e42..a1e9ebf343b 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_gd.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_gd.c
    @@ -1,3 +1,40 @@
    +/**
    + * File: GD IO
    + *
    + * Read and write GD images.
    + *
    + * The GD image format is a proprietary image format of libgd. *It has to be*
    + * *regarded as being obsolete, and should only be used for development and*
    + * *testing purposes.*
    + *
    + * Structure of a GD image file:
    + *  - file header
    + *  - color header (either truecolor or palette)
    + *  - image data
    + *
    + * All numbers are stored in big-endian format.
    + *
    + * File header structure:
    + *  signature     - 1 word ("\xFF\xFE" for truecolor, "\xFF\xFF" for palette)
    + *  width         - 1 word
    + *  height        - 1 word
    + *
    + * Truecolor image color header:
    + *  truecolor   - 1 byte (always "\001")
    + *  transparent - 1 dword (ARGB color)
    + *
    + * Palette image color header:
    + *  truecolor   - 1 byte (always "\0")
    + *  count       - 1 word (the number of used palette colors)
    + *  transparent - 1 dword (ARGB color)
    + *  palette     - 256 dwords (RGBA colors)
    + *
    + * Image data:
    + *  Sequential pixel data; row-major from top to bottom, left to right:
    + *   - 1 byte per pixel for palette images
    + *   - 1 dword (ARGB) per pixel for truecolor images
    + */
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_gd2.c b/Build/source/libs/gd/libgd-src/src/gd_gd2.c
    index 8df93c12f4e..c2904cafa19 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_gd2.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_gd2.c
    @@ -10,6 +10,64 @@
        *
      */
     
    +/**
    + * File: GD2 IO
    + *
    + * Read and write GD2 images.
    + *
    + * The GD2 image format is a proprietary image format of libgd. *It has to be*
    + * *regarded as being obsolete, and should only be used for development and*
    + * *testing purposes.*
    + *
    + * Structure of a GD2 image file:
    + *  - file header
    + *  - chunk headers (only for compressed data)
    + *  - color header (either truecolor or palette)
    + *  - chunks of image data (chunk-row-major, top to bottom, left to right)
    + *
    + * All numbers are stored in big-endian format.
    + *
    + * File header structure:
    + *  signature     - 4 bytes (always "gd2\0")
    + *  version       - 1 word (e.g. "\0\002")
    + *  width         - 1 word
    + *  height        - 1 word
    + *  chunk_size    - 1 word
    + *  format        - 1 word
    + *  x_chunk_count - 1 word
    + *  y_chunk_count - 1 word
    + *
    + * Recognized formats:
    + *  1 - raw palette image data
    + *  2 - compressed palette image data
    + *  3 - raw truecolor image data
    + *  4 - compressed truecolor image data
    + *
    + * Chunk header:
    + *  offset - 1 dword
    + *  size   - 1 dword
    + *
    + * There are x_chunk_count * y_chunk_count chunk headers. 
    + *
    + * Truecolor image color header:
    + *  truecolor   - 1 byte (always "\001")
    + *  transparent - 1 dword (ARGB color)
    + *
    + * Palette image color header:
    + *  truecolor   - 1 byte (always "\0")
    + *  count       - 1 word (the number of used palette colors)
    + *  transparent - 1 dword (ARGB color)
    + *  palette     - 256 dwords (RGBA colors)
    + *
    + * Chunk structure:
    + *  Sequential pixel data of a rectangular area (chunk_size x chunk_size),
    + *  row-major from top to bottom, left to right:
    + *  - 1 byte per pixel for palette images
    + *  - 1 dword (ARGB) per pixel for truecolor images
    + *
    + *  Depending on format, the chunk may be ZLIB compressed.
    + */
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
    @@ -151,6 +209,10 @@ _gd2GetHeader (gdIOCtxPtr in, int *sx, int *sy,
     	GD2_DBG (printf ("%d Chunks vertically\n", *ncy));
     
     	if (gd2_compressed (*fmt)) {
    +		if (*ncx <= 0 || *ncy <= 0 || *ncx > INT_MAX / *ncy) {
    +			GD2_DBG(printf ("Illegal chunk counts: %d * %d\n", *ncx, *ncy));
    +			goto fail1;
    +		}
     		nc = (*ncx) * (*ncy);
     
     		GD2_DBG (printf ("Reading %d chunk index entries\n", nc));
    @@ -445,18 +507,16 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ctx (gdIOCtxPtr in)
     
     						if (im->trueColor) {
     							if (!gdGetInt (&im->tpixels[y][x], in)) {
    -								/*printf("EOF while reading\n"); */
    -								/*gdImageDestroy(im); */
    -								/*return 0; */
    -								im->tpixels[y][x] = 0;
    +								gd_error("gd2: EOF while reading\n");
    +								gdImageDestroy(im);
    +								return NULL;
     							}
     						} else {
     							int ch;
     							if (!gdGetByte (&ch, in)) {
    -								/*printf("EOF while reading\n"); */
    -								/*gdImageDestroy(im); */
    -								/*return 0; */
    -								ch = 0;
    +								gd_error("gd2: EOF while reading\n");
    +								gdImageDestroy(im);
    +								return NULL;
     							}
     							im->pixels[y][x] = ch;
     						}
    @@ -867,7 +927,7 @@ _gdImageGd2 (gdImagePtr im, gdIOCtx * out, int cs, int fmt)
     	/* Force fmt to a valid value since we don't return anything. */
     	/* */
     	if ((fmt != GD2_FMT_RAW) && (fmt != GD2_FMT_COMPRESSED)) {
    -		fmt = im->trueColor ? GD2_FMT_TRUECOLOR_COMPRESSED : GD2_FMT_COMPRESSED;
    +		fmt = GD2_FMT_COMPRESSED;
     	};
     	if (im->trueColor) {
     		fmt += 2;
    @@ -887,8 +947,8 @@ _gdImageGd2 (gdImagePtr im, gdIOCtx * out, int cs, int fmt)
     	};
     
     	/* Work out number of chunks. */
    -	ncx = im->sx / cs + 1;
    -	ncy = im->sy / cs + 1;
    +	ncx = (im->sx + cs - 1) / cs;
    +	ncy = (im->sy + cs - 1) / cs;
     
     	/* Write the standard header. */
     	_gd2PutHeader (im, out, cs, fmt, ncx, ncy);
    @@ -1119,5 +1179,6 @@ BGD_DECLARE(void) gdImageGd2 (gdImagePtr im, FILE * outFile, int cs, int fmt)
     BGD_DECLARE(void *) gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size)
     {
     	_noLibzError();
    +	return NULL;
     }
     #endif /* HAVE_LIBZ */
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_gif_in.c b/Build/source/libs/gd/libgd-src/src/gd_gif_in.c
    index 3ae74dea523..008d1ecec41 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_gif_in.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_gif_in.c
    @@ -1,3 +1,9 @@
    +/**
    + * File: GIF Input
    + *
    + * Read GIF images.
    + */
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
    @@ -443,7 +449,7 @@ GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroD
     	if(flag) {
     		scd->curbit = 0;
     		scd->lastbit = 0;
    -		scd->last_byte = 0;
    +		scd->last_byte = 2;
     		scd->done = FALSE;
     		return 0;
     	}
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_gif_out.c b/Build/source/libs/gd/libgd-src/src/gd_gif_out.c
    index 3099d4982b7..6fe707d8423 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_gif_out.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_gif_out.c
    @@ -1,3 +1,9 @@
    +/**
    + * File: GIF Output
    + *
    + * Write GIF images.
    + */
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
    @@ -534,50 +540,52 @@ BGD_DECLARE(void *) gdImageGifAnimAddPtr(gdImagePtr im, int *size, int LocalCM,
         Nothing.
     
       Example:
    -
    -    > {
    -    > gdImagePtr im, im2, im3;
    -    > int black, white, trans;
    -    > FILE *out;
    -    >
    -    > im = gdImageCreate(100, 100);     // Create the image 
    -    > white = gdImageColorAllocate(im, 255, 255, 255); // Allocate background
    -    > black = gdImageColorAllocate(im, 0, 0, 0); // Allocate drawing color 
    -    > trans = gdImageColorAllocate(im, 1, 1, 1); // trans clr for compression 
    -    > gdImageRectangle(im, 0, 0, 10, 10, black); // Draw rectangle 
    -    >
    -    > out = fopen("anim.gif", "wb");// Open output file in binary mode
    -    > gdImageGifAnimBegin(im, out, 1, 3);// Write GIF hdr, global clr map,loops
    -    > // Write the first frame.  No local color map.  Delay = 1s 
    -    > gdImageGifAnimAdd(im, out, 0, 0, 0, 100, 1, NULL);
    -    >
    -    > // construct the second frame 
    -    > im2 = gdImageCreate(100, 100);
    -    > (void)gdImageColorAllocate(im2, 255, 255, 255); // White background
    -    > gdImagePaletteCopy (im2, im);  // Make sure the palette is identical
    -    > gdImageRectangle(im2, 0, 0, 15, 15, black);    // Draw something 
    -    > // Allow animation compression with transparent pixels 
    -    > gdImageColorTransparent (im2, trans);
    -    > gdImageGifAnimAdd(im2, out, 0, 0, 0, 100, 1, im);  // Add second frame 
    -    >
    -    > // construct the third frame 
    -    > im3 = gdImageCreate(100, 100);
    -    > (void)gdImageColorAllocate(im3, 255, 255, 255); // white background
    -    > gdImagePaletteCopy (im3, im); // Make sure the palette is identical
    -    > gdImageRectangle(im3, 0, 0, 15, 20, black); // Draw something 
    -    > // Allow animation compression with transparent pixels 
    -    > gdImageColorTransparent (im3, trans);
    -    > // Add the third frame, compressing against the second one 
    -    > gdImageGifAnimAdd(im3, out, 0, 0, 0, 100, 1, im2);
    -    > gdImageGifAnimEnd(out);  // End marker, same as putc(';', out);
    -    > fclose(out); // Close file 
    -    >
    -    > // Destroy images 
    -    > gdImageDestroy(im);
    -    > gdImageDestroy(im2);
    -    > gdImageDestroy(im3);
    -    > }
    -
    +    (start code)
    +
    +    {
    +    gdImagePtr im, im2, im3;
    +    int black, white, trans;
    +    FILE *out;
    +    
    +    im = gdImageCreate(100, 100);     // Create the image
    +    white = gdImageColorAllocate(im, 255, 255, 255); // Allocate background
    +    black = gdImageColorAllocate(im, 0, 0, 0); // Allocate drawing color
    +    trans = gdImageColorAllocate(im, 1, 1, 1); // trans clr for compression
    +    gdImageRectangle(im, 0, 0, 10, 10, black); // Draw rectangle
    +    
    +    out = fopen("anim.gif", "wb");// Open output file in binary mode
    +    gdImageGifAnimBegin(im, out, 1, 3);// Write GIF hdr, global clr map,loops
    +    // Write the first frame.  No local color map.  Delay = 1s
    +    gdImageGifAnimAdd(im, out, 0, 0, 0, 100, 1, NULL);
    +    
    +    // construct the second frame
    +    im2 = gdImageCreate(100, 100);
    +    (void)gdImageColorAllocate(im2, 255, 255, 255); // White background
    +    gdImagePaletteCopy (im2, im);  // Make sure the palette is identical
    +    gdImageRectangle(im2, 0, 0, 15, 15, black);    // Draw something
    +    // Allow animation compression with transparent pixels
    +    gdImageColorTransparent (im2, trans);
    +    gdImageGifAnimAdd(im2, out, 0, 0, 0, 100, 1, im);  // Add second frame
    +    
    +    // construct the third frame
    +    im3 = gdImageCreate(100, 100);
    +    (void)gdImageColorAllocate(im3, 255, 255, 255); // white background
    +    gdImagePaletteCopy (im3, im); // Make sure the palette is identical
    +    gdImageRectangle(im3, 0, 0, 15, 20, black); // Draw something
    +    // Allow animation compression with transparent pixels
    +    gdImageColorTransparent (im3, trans);
    +    // Add the third frame, compressing against the second one
    +    gdImageGifAnimAdd(im3, out, 0, 0, 0, 100, 1, im2);
    +    gdImageGifAnimEnd(out);  // End marker, same as putc(';', out);
    +    fclose(out); // Close file
    +    
    +    // Destroy images
    +    gdImageDestroy(im);
    +    gdImageDestroy(im2);
    +    gdImageDestroy(im3);
    +    }
    +
    +    (end code)
     */
     
     BGD_DECLARE(void) gdImageGifAnimAdd(gdImagePtr im, FILE *outFile, int LocalCM,
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_interpolation.c b/Build/source/libs/gd/libgd-src/src/gd_interpolation.c
    index 7e7943d6955..b9a206551dc 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_interpolation.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_interpolation.c
    @@ -829,8 +829,13 @@ static inline LineContribType * _gdContributionsAlloc(unsigned int line_length,
     {
     	unsigned int u = 0;
     	LineContribType *res;
    -	int overflow_error = 0;
    +	size_t weights_size;
     
    +	if (overflow2(windows_size, sizeof(double))) {
    +		return NULL;
    +	} else {
    +		weights_size = windows_size * sizeof(double);
    +	}
     	res = (LineContribType *) gdMalloc(sizeof(LineContribType));
     	if (!res) {
     		return NULL;
    @@ -847,15 +852,11 @@ static inline LineContribType * _gdContributionsAlloc(unsigned int line_length,
     		return NULL;
     	}
     	for (u = 0 ; u < line_length ; u++) {
    -		if (overflow2(windows_size, sizeof(double))) {
    -			overflow_error = 1;
    -		} else {
    -			res->ContribRow[u].Weights = (double *) gdMalloc(windows_size * sizeof(double));
    -		}
    -		if (overflow_error == 1 || res->ContribRow[u].Weights == NULL) {
    +		res->ContribRow[u].Weights = (double *) gdMalloc(weights_size);
    +		if (res->ContribRow[u].Weights == NULL) {
     			unsigned int i;
    -			u--;
    -			for (i=0;i<=u;i++) {
    +
    +			for (i=0;i<u;i++) {
     				gdFree(res->ContribRow[i].Weights);
     			}
     			gdFree(res->ContribRow);
    @@ -1015,6 +1016,8 @@ gdImageScaleTwoPass(const gdImagePtr src, const unsigned int new_width,
     	gdImagePtr dst = NULL;
     	int scale_pass_res;
     
    +	assert(src != NULL);
    +
         /* First, handle the trivial case. */
         if (src_width == new_width && src_height == new_height) {
             return gdImageClone(src);
    @@ -1055,7 +1058,7 @@ gdImageScaleTwoPass(const gdImagePtr src, const unsigned int new_width,
             scale_pass_res = _gdScalePass(tmp_im, src_height, dst, new_height, new_width, VERTICAL);
     		if (scale_pass_res != 1) {
     			gdImageDestroy(dst);
    -			if (tmp_im != NULL && src != tmp_im) {
    +			if (src != tmp_im) {
     				gdImageDestroy(tmp_im);
     			}
     			return NULL;
    @@ -1063,7 +1066,7 @@ gdImageScaleTwoPass(const gdImagePtr src, const unsigned int new_width,
         }/* if */
     
     
    -	if (tmp_im != NULL && src != tmp_im) {
    +	if (src != tmp_im) {
             gdImageDestroy(tmp_im);
         }/* if */
     
    @@ -1241,11 +1244,11 @@ static gdImagePtr gdImageScaleBilinearPalette(gdImagePtr im, const unsigned int
     					f_b1, f_b2, f_b3, f_b4,
     					f_a1, f_a2, f_a3, f_a4;
     
    -			/* zero for the background color, nothig gets outside anyway */
    +			/* 0 for bgColor; (n,m) is supposed to be valid anyway */
     			pixel1 = getPixelOverflowPalette(im, n, m, 0);
    -			pixel2 = getPixelOverflowPalette(im, n + 1, m, 0);
    -			pixel3 = getPixelOverflowPalette(im, n, m + 1, 0);
    -			pixel4 = getPixelOverflowPalette(im, n + 1, m + 1, 0);
    +			pixel2 = getPixelOverflowPalette(im, n + 1, m, pixel1);
    +			pixel3 = getPixelOverflowPalette(im, n, m + 1, pixel1);
    +			pixel4 = getPixelOverflowPalette(im, n + 1, m + 1, pixel1);
     
     			f_r1 = gd_itofx(gdTrueColorGetRed(pixel1));
     			f_r2 = gd_itofx(gdTrueColorGetRed(pixel2));
    @@ -1265,10 +1268,10 @@ static gdImagePtr gdImageScaleBilinearPalette(gdImagePtr im, const unsigned int
     			f_a4 = gd_itofx(gdTrueColorGetAlpha(pixel4));
     
     			{
    -				const char red = (char) gd_fxtoi(gd_mulfx(f_w1, f_r1) + gd_mulfx(f_w2, f_r2) + gd_mulfx(f_w3, f_r3) + gd_mulfx(f_w4, f_r4));
    -				const char green = (char) gd_fxtoi(gd_mulfx(f_w1, f_g1) + gd_mulfx(f_w2, f_g2) + gd_mulfx(f_w3, f_g3) + gd_mulfx(f_w4, f_g4));
    -				const char blue = (char) gd_fxtoi(gd_mulfx(f_w1, f_b1) + gd_mulfx(f_w2, f_b2) + gd_mulfx(f_w3, f_b3) + gd_mulfx(f_w4, f_b4));
    -				const char alpha = (char) gd_fxtoi(gd_mulfx(f_w1, f_a1) + gd_mulfx(f_w2, f_a2) + gd_mulfx(f_w3, f_a3) + gd_mulfx(f_w4, f_a4));
    +				const unsigned char red = (unsigned char) gd_fxtoi(gd_mulfx(f_w1, f_r1) + gd_mulfx(f_w2, f_r2) + gd_mulfx(f_w3, f_r3) + gd_mulfx(f_w4, f_r4));
    +				const unsigned char green = (unsigned char) gd_fxtoi(gd_mulfx(f_w1, f_g1) + gd_mulfx(f_w2, f_g2) + gd_mulfx(f_w3, f_g3) + gd_mulfx(f_w4, f_g4));
    +				const unsigned char blue = (unsigned char) gd_fxtoi(gd_mulfx(f_w1, f_b1) + gd_mulfx(f_w2, f_b2) + gd_mulfx(f_w3, f_b3) + gd_mulfx(f_w4, f_b4));
    +				const unsigned char alpha = (unsigned char) gd_fxtoi(gd_mulfx(f_w1, f_a1) + gd_mulfx(f_w2, f_a2) + gd_mulfx(f_w3, f_a3) + gd_mulfx(f_w4, f_a4));
     
     				new_img->tpixels[dst_offset_v][dst_offset_h] = gdTrueColorAlpha(red, green, blue, alpha);
     			}
    @@ -1327,11 +1330,11 @@ static gdImagePtr gdImageScaleBilinearTC(gdImagePtr im, const unsigned int new_w
     					f_g1, f_g2, f_g3, f_g4,
     					f_b1, f_b2, f_b3, f_b4,
     					f_a1, f_a2, f_a3, f_a4;
    -			/* 0 for bgColor, nothing gets outside anyway */
    +			/* 0 for bgColor; (n,m) is supposed to be valid anyway */
     			pixel1 = getPixelOverflowTC(im, n, m, 0);
    -			pixel2 = getPixelOverflowTC(im, n + 1, m, 0);
    -			pixel3 = getPixelOverflowTC(im, n, m + 1, 0);
    -			pixel4 = getPixelOverflowTC(im, n + 1, m + 1, 0);
    +			pixel2 = getPixelOverflowTC(im, n + 1, m, pixel1);
    +			pixel3 = getPixelOverflowTC(im, n, m + 1, pixel1);
    +			pixel4 = getPixelOverflowTC(im, n + 1, m + 1, pixel1);
     
     			f_r1 = gd_itofx(gdTrueColorGetRed(pixel1));
     			f_r2 = gd_itofx(gdTrueColorGetRed(pixel2));
    @@ -1490,13 +1493,8 @@ gdImageScaleBicubicFixed(gdImagePtr src, const unsigned int width,
     				src_offset_y[8] = m;
     			}
     
    -			if (m >= src_h - 1) {
    -				src_offset_x[8] = n;
    -				src_offset_y[8] = m;
    -			} else {
    -				src_offset_x[9] = n;
    -				src_offset_y[9] = m;
    -			}
    +			src_offset_x[9] = n;
    +			src_offset_y[9] = m;
     
     			if ((m >= src_h-1) || (n >= src_w-1)) {
     				src_offset_x[10] = n;
    @@ -1607,9 +1605,28 @@ gdImageScaleBicubicFixed(gdImagePtr src, const unsigned int width,
     	return dst;
     }
     
    -/*
    -	Function: gdImageScale
    -*/
    +/**
    + * Function: gdImageScale
    + *
    + * Scale an image
    + *
    + * Creates a new image, scaled to the requested size using the current
    + * <gdInterpolationMethod>.
    + *
    + * Note that GD_WEIGHTED4 is not yet supported by this function.
    + *
    + * Parameters:
    + *   src        - The source image.
    + *   new_width  - The new width.
    + *   new_height - The new height.
    + *
    + * Returns:
    + *   The scaled image on success, NULL on failure.
    + *
    + * See also:
    + *   - <gdImageCopyResized>
    + *   - <gdImageCopyResampled>
    + */
     BGD_DECLARE(gdImagePtr) gdImageScale(const gdImagePtr src, const unsigned int new_width, const unsigned int new_height)
     {
     	gdImagePtr im_scaled = NULL;
    @@ -1689,13 +1706,6 @@ gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees,
     	gdRect bbox;
     	int new_height, new_width;
     
    -	/* impact perf a bit, but not that much. Implementation for palette
    -	   images can be done at a later point.
    -	*/
    -	if (src->trueColor == 0) {
    -		gdImagePaletteToTrueColor(src);
    -	}
    -
         gdRotatedImageSize(src, degrees, &bbox);
         new_width = bbox.width;
         new_height = bbox.height;
    @@ -1753,13 +1763,6 @@ gdImageRotateGeneric(gdImagePtr src, const float degrees, const int bgColor)
     		return NULL;
     	}
     
    -	/* impact perf a bit, but not that much. Implementation for palette
    -	   images can be done at a later point.
    -	*/
    -	if (src->trueColor == 0) {
    -		gdImagePaletteToTrueColor(src);
    -	}
    -
     	if (src->interpolation == NULL) {
     		gdImageSetInterpolationMethod(src, GD_DEFAULT);
     	}
    @@ -1796,9 +1799,26 @@ gdImageRotateGeneric(gdImagePtr src, const float degrees, const int bgColor)
     	return dst;
     }
     
    -/*
    -	Function: gdImageRotateInterpolated
    -*/
    +/** 
    + * Function: gdImageRotateInterpolated
    + *
    + * Rotate an image
    + *
    + * Creates a new image, counter-clockwise rotated by the requested angle
    + * using the current <gdInterpolationMethod>. Non-square angles will add a
    + * border with bgcolor.
    + *
    + * Parameters:
    + *   src     - The source image.
    + *   angle   - The angle in degrees.
    + *   bgcolor - The color to fill the added background with.
    + *
    + * Returns:
    + *   The rotated image on success, NULL on failure.
    + *
    + * See also:
    + *   - <gdImageCopyRotated>
    + */
     BGD_DECLARE(gdImagePtr) gdImageRotateInterpolated(const gdImagePtr src, const float angle, int bgcolor)
     {
     	/* round to two decimals and keep the 100x multiplication to use it in the common square angles 
    @@ -1806,10 +1826,20 @@ BGD_DECLARE(gdImagePtr) gdImageRotateInterpolated(const gdImagePtr src, const fl
     	   slow animations, f.e. */
     	const int angle_rounded = fmod((int) floorf(angle * 100), 360 * 100);
     
    -	if (bgcolor < 0) {
    +	if (src == NULL || bgcolor < 0) {
     		return NULL;
     	}
     
    +	/* impact perf a bit, but not that much. Implementation for palette
    +	   images can be done at a later point.
    +	*/
    +	if (src->trueColor == 0) {
    +		if (bgcolor < gdMaxColors) {
    +			bgcolor =  gdTrueColorAlpha(src->red[bgcolor], src->green[bgcolor], src->blue[bgcolor], src->alpha[bgcolor]);
    +		}
    +		gdImagePaletteToTrueColor(src);
    +	}
    +
     	/* 0 && 90 degrees multiple rotation, 0 rotation simply clones the return image and convert it
     	   to truecolor, as we must return truecolor image. */
     	switch (angle_rounded) {
    @@ -1838,7 +1868,7 @@ BGD_DECLARE(gdImagePtr) gdImageRotateInterpolated(const gdImagePtr src, const fl
     			return gdImageRotate270(src, 0);
     	}
     
    -	if (src == NULL || src->interpolation_id < 1 || src->interpolation_id > GD_METHOD_COUNT) {
    +	if (src->interpolation_id < 1 || src->interpolation_id > GD_METHOD_COUNT) {
     		return NULL;
     	}
     
    @@ -1856,11 +1886,7 @@ BGD_DECLARE(gdImagePtr) gdImageRotateInterpolated(const gdImagePtr src, const fl
     }
     
     /**
    - * Title: Affine transformation
    - **/
    -
    -/**
    - * Group: Transform
    + * Group: Affine Transformation
      **/
     
      static void gdImageClipRectangle(gdImagePtr im, gdRectPtr r)
    @@ -2117,9 +2143,26 @@ BGD_DECLARE(int) gdTransformAffineBoundingBox(gdRectPtr src, const double affine
     	return GD_TRUE;
     }
     
    -/*
    -	Function: gdImageSetInterpolationMethod
    -*/
    +/**
    + * Group: Interpolation Method
    + */
    +
    +/**
    + * Function: gdImageSetInterpolationMethod
    + *
    + * Set the interpolation method for subsequent operations
    + *
    + * Parameters:
    + *   im - The image.
    + *   id - The interpolation method.
    + *
    + * Returns:
    + *   Non-zero on success, zero on failure.
    + *
    + * See also:
    + *   - <gdInterpolationMethod>
    + *   - <gdImageGetInterpolationMethod>
    + */
     BGD_DECLARE(int) gdImageSetInterpolationMethod(gdImagePtr im, gdInterpolationMethod id)
     {
     	if (im == NULL || (uintmax_t)id > GD_METHOD_COUNT) {
    @@ -2202,13 +2245,24 @@ BGD_DECLARE(int) gdImageSetInterpolationMethod(gdImagePtr im, gdInterpolationMet
     }
     
     
    -/*
    -	Function: gdImageGetInterpolationMethod
    -
    -	Return the interpolation mode set in 'im'.  This is here so that
    -	the value can be read via a language or VM with an FFI but no
    -	(portable) way to extract the value from the struct.
    -*/
    +/**
    + * Function: gdImageGetInterpolationMethod
    + *
    + * Get the current interpolation method
    + *
    + * This is here so that the value can be read via a language or VM with an FFI
    + * but no (portable) way to extract the value from the struct.
    + *
    + * Parameters:
    + *   im - The image.
    + *
    + * Returns:
    + *   The current interpolation method.
    + *
    + * See also:
    + *   - <gdInterpolationMethod>
    + *   - <gdImageSetInterpolationMethod>
    + */
     BGD_DECLARE(gdInterpolationMethod) gdImageGetInterpolationMethod(gdImagePtr im)
     {
         return im->interpolation_id;
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_io_dp.c b/Build/source/libs/gd/libgd-src/src/gd_io_dp.c
    index 135eda3fcb0..eda2eeb0551 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_io_dp.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_io_dp.c
    @@ -263,6 +263,7 @@ static void dynamicPutchar(struct gdIOCtx *ctx, int a)
     	appendDynamic(dctx->dp, &b, 1);
     }
     
    +/* returns the number of bytes actually read; 0 on EOF and error */
     static int dynamicGetbuf(gdIOCtxPtr ctx, void *buf, int len)
     {
     	int rlen, remain;
    @@ -272,21 +273,25 @@ static int dynamicGetbuf(gdIOCtxPtr ctx, void *buf, int len)
     	dctx = (dpIOCtxPtr) ctx;
     	dp = dctx->dp;
     
    +	if (dp->pos < 0 || dp->pos >= dp->realSize) {
    +		return 0;
    +	}
    +
     	remain = dp->logicalSize - dp->pos;
     	if(remain >= len) {
     		rlen = len;
     	} else {
    -		if(remain == 0) {
    -			/* 2.0.34: EOF is incorrect. We use 0 for
    -			 * errors and EOF, just like fileGetbuf,
    -			 * which is a simple fread() wrapper.
    -			 * TBB. Original bug report: Daniel Cowgill. */
    -			return 0; /* NOT EOF */
    +		if(remain <= 0) {
    +			return 0;
     		}
     
     		rlen = remain;
     	}
     
    +	if (dp->pos + rlen > dp->realSize) {
    +		rlen = dp->realSize - dp->pos;
    +	}
    +
     	memcpy(buf, (void *) ((char *)dp->data + dp->pos), rlen);
     	dp->pos += rlen;
     
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_jpeg.c b/Build/source/libs/gd/libgd-src/src/gd_jpeg.c
    index 51233952d44..744f229bd97 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_jpeg.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_jpeg.c
    @@ -21,6 +21,11 @@
      * Christian Aberger
      */
     
    +/**
    + * File: JPEG IO
    + *
    + * Read and write JPEG images.
    + */
     
     #ifdef HAVE_CONFIG_H
     #	include "config.h"
    @@ -169,27 +174,29 @@ static void fatal_jpeg_error(j_common_ptr cinfo)
         Nothing.
     
       Example:
    -
    -    > gdImagePtr im;
    -    > int black, white;
    -    > FILE *out;
    -    > // Create the image
    -    > im = gdImageCreate(100, 100);
    -    > // Allocate background
    -    > white = gdImageColorAllocate(im, 255, 255, 255);
    -    > // Allocate drawing color
    -    > black = gdImageColorAllocate(im, 0, 0, 0);
    -    > // Draw rectangle
    -    > gdImageRectangle(im, 0, 0, 99, 99, black);
    -    > // Open output file in binary mode
    -    > out = fopen("rect.jpg", "wb");
    -    > // Write JPEG using default quality
    -    > gdImageJpeg(im, out, -1);
    -    > // Close file
    -    > fclose(out);
    -    > // Destroy image
    -    > gdImageDestroy(im);
    -
    +    (start code)
    +
    +    gdImagePtr im;
    +    int black, white;
    +    FILE *out;
    +    // Create the image
    +    im = gdImageCreate(100, 100);
    +    // Allocate background
    +    white = gdImageColorAllocate(im, 255, 255, 255);
    +    // Allocate drawing color
    +    black = gdImageColorAllocate(im, 0, 0, 0);
    +    // Draw rectangle
    +    gdImageRectangle(im, 0, 0, 99, 99, black);
    +    // Open output file in binary mode
    +    out = fopen("rect.jpg", "wb");
    +    // Write JPEG using default quality
    +    gdImageJpeg(im, out, -1);
    +    // Close file
    +    fclose(out);
    +    // Destroy image
    +    gdImageDestroy(im);
    +
    +    (end code)
     */
     
     BGD_DECLARE(void) gdImageJpeg(gdImagePtr im, FILE *outFile, int quality)
    @@ -463,15 +470,17 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromJpeg(FILE *inFile)
         On error, returns NULL.
     
       Example:
    +    (start code)
     
    -    > gdImagePtr im;
    -    > FILE *in;
    -    > in = fopen("myjpeg.jpg", "rb");
    -    > im = gdImageCreateFromJpegEx(in, GD_TRUE);
    -    > fclose(in);
    -    > // ... Use the image ...
    -    > gdImageDestroy(im);
    +    gdImagePtr im;
    +    FILE *in;
    +    in = fopen("myjpeg.jpg", "rb");
    +    im = gdImageCreateFromJpegEx(in, GD_TRUE);
    +    fclose(in);
    +    // ... Use the image ...
    +    gdImageDestroy(im);
     
    +    (end code)
     */
     BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegEx(FILE *inFile, int ignore_warning)
     {
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_nnquant.c b/Build/source/libs/gd/libgd-src/src/gd_nnquant.c
    index d6b2b275766..19190b7ed84 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_nnquant.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_nnquant.c
    @@ -506,9 +506,23 @@ int verbose;
     	if (verbose) gd_error_ex(GD_NOTICE, "finished 1D learning: final alpha=%f !\n",((float)alpha)/initalpha);
     }
     
    -/*
    -	Function: gdImageNeuQuant
    -*/
    +/**
    + * Function: gdImageNeuQuant
    + *
    + * Creates a new palette image from a truecolor image
    + *
    + * This is the same as calling <gdImageCreatePaletteFromTrueColor> with the
    + * quantization method <GD_QUANT_NEUQUANT>.
    + *
    + * Parameters:
    + *   im            - The image.
    + *   max_color     - The number of desired palette entries.
    + *   sample_factor - The quantization precision between 1 (highest quality) and
    + *                   10 (fastest).
    + *
    + * Returns:
    + *   A newly create palette image; NULL on failure.
    + */
     BGD_DECLARE(gdImagePtr) gdImageNeuQuant(gdImagePtr im, const int max_color, int sample_factor)
     {
     	const int newcolors = max_color;
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_png.c b/Build/source/libs/gd/libgd-src/src/gd_png.c
    index ab93e4347ce..db8de725ec1 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_png.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_png.c
    @@ -42,6 +42,12 @@
     
       ---------------------------------------------------------------------------*/
     
    +/**
    + * File: PNG IO
    + *
    + * Read and write PNG images.
    + */
    +
     #ifdef PNG_SETJMP_SUPPORTED
     typedef struct _jmpbuf_wrapper {
     	jmp_buf jmpbuf;
    @@ -143,16 +149,18 @@ gdPngFlushData (png_structp png_ptr)
         A pointer to the new image or NULL if an error occurred.
     
       Example:
    -
    -    > gdImagePtr im;
    -    > ... inside a function ...
    -    > FILE *in;
    -    > in = fopen("mypng.png", "rb");
    -    > im = gdImageCreateFromPng(in);
    -    > fclose(in);
    -    > // ... Use the image ...
    -    > gdImageDestroy(im);
    -
    +    (start code)
    +
    +    gdImagePtr im;
    +    ... inside a function ...
    +    FILE *in;
    +    in = fopen("mypng.png", "rb");
    +    im = gdImageCreateFromPng(in);
    +    fclose(in);
    +    // ... Use the image ...
    +    gdImageDestroy(im);
    +
    +    (end code)
      */
     BGD_DECLARE(gdImagePtr) gdImageCreateFromPng (FILE * inFile)
     {
    @@ -579,20 +587,22 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromPngCtx (gdIOCtx * infile)
         Nothing.
     
       Example:
    -
    -    > gdImagePtr im;
    -    > int black, white;
    -    > FILE *out;
    -    > 
    -    > im = gdImageCreate(100, 100);              // Create the image 
    -    > white = gdImageColorAllocate(im, 255, 255, 255); // Alloc background 
    -    > black = gdImageColorAllocate(im, 0, 0, 0); // Allocate drawing color 
    -    > gdImageRectangle(im, 0, 0, 99, 99, black); // Draw rectangle 
    -    > out = fopen("rect.png", "wb");             // Open output file (binary) 
    -    > gdImagePngEx(im, out, 9);                  // Write PNG, max compression
    -    > fclose(out);                               // Close file 
    -    > gdImageDestroy(im);                        // Destroy image 
    -
    +    (start code)
    +
    +    gdImagePtr im;
    +    int black, white;
    +    FILE *out;
    +     
    +    im = gdImageCreate(100, 100);              // Create the image
    +    white = gdImageColorAllocate(im, 255, 255, 255); // Alloc background
    +    black = gdImageColorAllocate(im, 0, 0, 0); // Allocate drawing color
    +    gdImageRectangle(im, 0, 0, 99, 99, black); // Draw rectangle
    +    out = fopen("rect.png", "wb");             // Open output file (binary)
    +    gdImagePngEx(im, out, 9);                  // Write PNG, max compression
    +    fclose(out);                               // Close file
    +    gdImageDestroy(im);                        // Destroy image
    +
    +    (end code)
     */
     BGD_DECLARE(void) gdImagePngEx (gdImagePtr im, FILE * outFile, int level)
     {
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_rotate.c b/Build/source/libs/gd/libgd-src/src/gd_rotate.c
    index e590b3f2114..3d7025001bf 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_rotate.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_rotate.c
    @@ -362,194 +362,3 @@ gdImagePtr gdImageRotate270 (gdImagePtr src, int ignoretransparent)
     
     	return dst;
     }
    -
    -gdImagePtr gdImageRotate45 (gdImagePtr src, double dAngle, int clrBack, int ignoretransparent)
    -{
    -	gdImagePtr dst1,dst2,dst3;
    -	double dRadAngle, dSinE, dTan, dShear;
    -	double dOffset;     /* Variable skew offset */
    -	int u, iShear, newx, newy;
    -	int clrBackR, clrBackG, clrBackB, clrBackA;
    -
    -	/* See GEMS I for the algorithm details */
    -	dRadAngle = dAngle * ROTATE_DEG2RAD; /* Angle in radians */
    -	dSinE = sin (dRadAngle);
    -	dTan = tan (dRadAngle / 2.0);
    -
    -	newx = (int)(src->sx + src->sy * fabs(dTan));
    -	newy = src->sy;
    -
    -	/* 1st shear */
    -	dst1 = gdImageCreateTrueColor(newx, newy);
    -	/******* Perform 1st shear (horizontal) ******/
    -	if (dst1 == NULL) {
    -		return NULL;
    -	}
    -#ifdef HAVE_GD_BUNDLED
    -	dst1->alphaBlendingFlag = gdEffectReplace;
    -#else
    -	gdImageAlphaBlending(dst1, 0);
    -#endif
    -	if (dAngle == 0.0) {
    -		/* Returns copy of src */
    -		gdImageCopy (dst1, src,0,0,0,0,src->sx,src->sy);
    -		return dst1;
    -	}
    -
    -	gdImagePaletteCopy (dst1, src);
    -
    -	if (ignoretransparent) {
    -		if (gdImageTrueColor(src)) {
    -			dst1->transparent = src->transparent;
    -		} else {
    -
    -			dst1->transparent = gdTrueColorAlpha(gdImageRed(src, src->transparent), gdImageBlue(src, src->transparent), gdImageGreen(src, src->transparent), 127);
    -		}
    -	}
    -
    -	for (u = 0; u < dst1->sy; u++) {
    -		if (dTan >= 0.0) {
    -			dShear = ((double)(u + 0.5)) * dTan;
    -		} else {
    -			dShear = ((double)(u - dst1->sy) + 0.5) * dTan;
    -		}
    -
    -		iShear = (int)floor(dShear);
    -		gdImageSkewX(dst1, src, u, iShear, (dShear - iShear), clrBack, ignoretransparent);
    -	}
    -
    -	/*
    -	The 1st shear may use the original clrBack as color index
    -	Convert it once here
    -	*/
    -	if(!src->trueColor) {
    -		clrBackR = gdImageRed(src, clrBack);
    -		clrBackG = gdImageGreen(src, clrBack);
    -		clrBackB = gdImageBlue(src, clrBack);
    -		clrBackA = gdImageAlpha(src, clrBack);
    -		clrBack =  gdTrueColorAlpha(clrBackR, clrBackG, clrBackB, clrBackA);
    -	}
    -	/* 2nd shear */
    -	newx = dst1->sx;
    -
    -	if (dSinE > 0.0) {
    -		dOffset = (src->sx-1) * dSinE;
    -	} else {
    -		dOffset = -dSinE *  (src->sx - newx);
    -	}
    -
    -	newy = (int) ((double) src->sx * fabs( dSinE ) + (double) src->sy * cos (dRadAngle))+1;
    -
    -	dst2 = gdImageCreateTrueColor(newx, newy);
    -	if (dst2 == NULL) {
    -		gdImageDestroy(dst1);
    -		return NULL;
    -	}
    -
    -#ifdef HAVE_GD_BUNDLED
    -	dst2->alphaBlendingFlag = gdEffectReplace;
    -#else
    -	gdImageAlphaBlending(dst2, 0);
    -#endif
    -
    -	if (ignoretransparent) {
    -		dst2->transparent = dst1->transparent;
    -	}
    -
    -	for (u = 0; u < dst2->sx; u++, dOffset -= dSinE) {
    -		iShear = (int)floor (dOffset);
    -		gdImageSkewY(dst2, dst1, u, iShear, (dOffset - (double)iShear), clrBack, ignoretransparent);
    -	}
    -
    -	/* 3rd shear */
    -	gdImageDestroy(dst1);
    -
    -	newx = (int) ((double)src->sy * fabs (dSinE) + (double)src->sx * cos (dRadAngle)) + 1;
    -	newy = dst2->sy;
    -
    -	dst3 = gdImageCreateTrueColor(newx, newy);
    -	if (dst3 == NULL) {
    -		gdImageDestroy(dst2);
    -		return NULL;
    -	}
    -
    -#ifdef HAVE_GD_BUNDLED
    -	dst3->alphaBlendingFlag = gdEffectReplace;
    -#else
    -	gdImageAlphaBlending(dst3, 0);
    -#endif
    -
    -	if (ignoretransparent) {
    -		dst3->transparent = dst2->transparent;
    -	}
    -
    -	if (dSinE >= 0.0) {
    -		dOffset = (double)(src->sx - 1) * dSinE * -dTan;
    -	} else {
    -		dOffset = dTan * ((double)(src->sx - 1) * -dSinE + (double)(1 - newy));
    -	}
    -
    -	for (u = 0; u < dst3->sy; u++, dOffset += dTan) {
    -		int iShear = (int)floor(dOffset);
    -		gdImageSkewX(dst3, dst2, u, iShear, (dOffset - iShear), clrBack, ignoretransparent);
    -	}
    -
    -	gdImageDestroy(dst2);
    -
    -	return dst3;
    -}
    -
    -gdImagePtr gdImageRotate (gdImagePtr src, double dAngle, int clrBack, int ignoretransparent)
    -{
    -	gdImagePtr pMidImg;
    -	gdImagePtr rotatedImg;
    -
    -	if (src == NULL) {
    -		return NULL;
    -	}
    -
    -	if (!gdImageTrueColor(src) && (clrBack < 0 || clrBack>=gdImageColorsTotal(src))) {
    -		return NULL;
    -	}
    -
    -	while (dAngle >= 360.0) {
    -		dAngle -= 360.0;
    -	}
    -
    -	while (dAngle < 0) {
    -		dAngle += 360.0;
    -	}
    -
    -	if (dAngle == 90.00) {
    -		return gdImageRotate90(src, ignoretransparent);
    -	}
    -	if (dAngle == 180.00) {
    -		return gdImageRotate180(src, ignoretransparent);
    -	}
    -	if(dAngle == 270.00) {
    -		return gdImageRotate270 (src, ignoretransparent);
    -	}
    -
    -	if ((dAngle > 45.0) && (dAngle <= 135.0)) {
    -		pMidImg = gdImageRotate90 (src, ignoretransparent);
    -		dAngle -= 90.0;
    -	} else if ((dAngle > 135.0) && (dAngle <= 225.0)) {
    -		pMidImg = gdImageRotate180 (src, ignoretransparent);
    -		dAngle -= 180.0;
    -	} else if ((dAngle > 225.0) && (dAngle <= 315.0)) {
    -		pMidImg = gdImageRotate270 (src, ignoretransparent);
    -		dAngle -= 270.0;
    -	} else {
    -		return gdImageRotate45 (src, dAngle, clrBack, ignoretransparent);
    -	}
    -
    -	if (pMidImg == NULL) {
    -		return NULL;
    -	}
    -
    -	rotatedImg = gdImageRotate45 (pMidImg, dAngle, clrBack, ignoretransparent);
    -	gdImageDestroy(pMidImg);
    -
    -	return rotatedImg;
    -}
    -/* End Rotate function */
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_tga.c b/Build/source/libs/gd/libgd-src/src/gd_tga.c
    index 170532478e2..f80f0b16fb8 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_tga.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_tga.c
    @@ -1,3 +1,9 @@
    +/**
    + * File: TGA Input
    + *
    + * Read TGA images.
    + */
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif /* HAVE_CONFIG_H */
    @@ -201,12 +207,13 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga )
     {
     	int pixel_block_size = (tga->bits / 8);
     	int image_block_size = (tga->width * tga->height) * pixel_block_size;
    -	uint8_t* decompression_buffer = NULL;
    +	int* decompression_buffer = NULL;
     	unsigned char* conversion_buffer = NULL;
     	int buffer_caret = 0;
     	int bitmap_caret = 0;
     	int i = 0;
     	int encoded_pixels;
    +	int rle_size;
     
     	if(overflow2(tga->width, tga->height)) {
     		return -1;
    @@ -260,7 +267,7 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga )
     		/*! \brief Read in RLE compressed RGB TGA
     		 *  Chunk load the pixel data from an RLE compressed RGB type TGA.
     		 */
    -		decompression_buffer = (uint8_t*) gdMalloc(image_block_size * sizeof(uint8_t));
    +		decompression_buffer = (int*) gdMalloc(image_block_size * sizeof(int));
     		if (decompression_buffer == NULL) {
     			return -1;
     		}
    @@ -271,7 +278,8 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga )
     			return -1;
     		}
     
    -		if (gdGetBuf(conversion_buffer, image_block_size, ctx) != image_block_size) {
    +		rle_size = gdGetBuf(conversion_buffer, image_block_size, ctx);
    +		if (rle_size <= 0) {
     			gdFree(conversion_buffer);
     			gdFree(decompression_buffer);
     			return -1;
    @@ -279,7 +287,7 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga )
     
     		buffer_caret = 0;
     
    -		while( buffer_caret < image_block_size) {
    +		while( buffer_caret < rle_size) {
     			decompression_buffer[buffer_caret] = (int)conversion_buffer[buffer_caret];
     			buffer_caret++;
     		}
    @@ -287,19 +295,26 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga )
     		buffer_caret = 0;
     
     		while( bitmap_caret < image_block_size ) {
    -			
    +
    +			if (buffer_caret + pixel_block_size > rle_size) {
    +				gdFree( decompression_buffer );
    +				gdFree( conversion_buffer );
    +				return -1;
    +			}
    +
     			if ((decompression_buffer[buffer_caret] & TGA_RLE_FLAG) == TGA_RLE_FLAG) {
     				encoded_pixels = ( ( decompression_buffer[ buffer_caret ] & ~TGA_RLE_FLAG ) + 1 );
     				buffer_caret++;
     
    -				if ((bitmap_caret + (encoded_pixels * pixel_block_size)) >= image_block_size) {
    +				if ((bitmap_caret + (encoded_pixels * pixel_block_size)) > image_block_size
    +						|| buffer_caret + pixel_block_size > rle_size) {
     					gdFree( decompression_buffer );
     					gdFree( conversion_buffer );
     					return -1;
     				}
     
     				for (i = 0; i < encoded_pixels; i++) {
    -					memcpy(tga->bitmap + bitmap_caret, decompression_buffer + buffer_caret, pixel_block_size);
    +					memcpy(tga->bitmap + bitmap_caret, decompression_buffer + buffer_caret, pixel_block_size * sizeof(int));
     					bitmap_caret += pixel_block_size;
     				}
     				buffer_caret += pixel_block_size;
    @@ -308,13 +323,14 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga )
     				encoded_pixels = decompression_buffer[ buffer_caret ] + 1;
     				buffer_caret++;
     
    -				if ((bitmap_caret + (encoded_pixels * pixel_block_size)) >= image_block_size) {
    +				if ((bitmap_caret + (encoded_pixels * pixel_block_size)) > image_block_size
    +						|| buffer_caret + (encoded_pixels * pixel_block_size) > rle_size) {
     					gdFree( decompression_buffer );
     					gdFree( conversion_buffer );
     					return -1;
     				}
     
    -				memcpy(tga->bitmap + bitmap_caret, decompression_buffer + buffer_caret, encoded_pixels * pixel_block_size);
    +				memcpy(tga->bitmap + bitmap_caret, decompression_buffer + buffer_caret, encoded_pixels * pixel_block_size * sizeof(int));
     				bitmap_caret += (encoded_pixels * pixel_block_size);
     				buffer_caret += (encoded_pixels * pixel_block_size);
     			}
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_tiff.c b/Build/source/libs/gd/libgd-src/src/gd_tiff.c
    index 26805ffcc4d..3f20c5b2645 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_tiff.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_tiff.c
    @@ -29,6 +29,15 @@
      */
     /* $Id$ */
     
    +/**
    + * File: TIFF IO
    + *
    + * Read and write TIFF images.
    + *
    + * There is only most basic support for the TIFF format available for now;
    + * for instance, multiple pages are not yet supported.
    + */
    +
     #ifdef HAVE_CONFIG_H
     #	include "config.h"
     #endif
    @@ -750,6 +759,7 @@ static int createFromTiffRgba(TIFF * tif, gdImagePtr im)
     	int height = im->sy;
     	uint32 *buffer;
     	uint32 rgba;
    +	int success;
     
     	/* switch off colour merging on target gd image just while we write out
     	 * content - we want to preserve the alpha data until the user chooses
    @@ -762,18 +772,20 @@ static int createFromTiffRgba(TIFF * tif, gdImagePtr im)
     		return GD_FAILURE;
     	}
     
    -	TIFFReadRGBAImage(tif, width, height, buffer, 0);
    -
    -	for(y = 0; y < height; y++) {
    -		for(x = 0; x < width; x++) {
    -			/* if it doesn't already exist, allocate a new colour,
    -			 * else use existing one */
    -			rgba = buffer[(y * width + x)];
    -			a = (0xff - TIFFGetA(rgba)) / 2;
    -			color = gdTrueColorAlpha(TIFFGetR(rgba), TIFFGetG(rgba), TIFFGetB(rgba), a);
    -
    -			/* set pixel colour to this colour */
    -			gdImageSetPixel(im, x, height - y - 1, color);
    +	success = TIFFReadRGBAImage(tif, width, height, buffer, 1);
    +
    +	if (success) {
    +		for(y = 0; y < height; y++) {
    +			for(x = 0; x < width; x++) {
    +				/* if it doesn't already exist, allocate a new colour,
    +				 * else use existing one */
    +				rgba = buffer[(y * width + x)];
    +				a = (0xff - TIFFGetA(rgba)) / 2;
    +				color = gdTrueColorAlpha(TIFFGetR(rgba), TIFFGetG(rgba), TIFFGetB(rgba), a);
    +	
    +				/* set pixel colour to this colour */
    +				gdImageSetPixel(im, x, height - y - 1, color);
    +			}
     		}
     	}
     
    @@ -781,7 +793,7 @@ static int createFromTiffRgba(TIFF * tif, gdImagePtr im)
     
     	/* now reset colour merge for alpha blending routines */
     	gdImageAlphaBlending(im, alphaBlendingFlag);
    -	return GD_SUCCESS;
    +	return success;
     }
     
     /*
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_topal.c b/Build/source/libs/gd/libgd-src/src/gd_topal.c
    index 7ff835a6d36..3419512eee2 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_topal.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_topal.c
    @@ -28,6 +28,11 @@
      * fundamental assumptions even hold with an irregularly spaced color map.
      */
     
    +/**
    + * File: Color Quantization
    + *
    + * Functions for truecolor to palette conversion
    + */
     
     /*
      * THOMAS BOUTELL & BAREND GEHRELS, february 2003
    @@ -659,7 +664,7 @@ compute_color (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize,
     		}
     
     	/* 2.0.16: Paul den Dulk found an occasion where total can be 0 */
    -	if (count) {
    +	if (total) {
     		nim->red[icolor] = (int) ((c0total + (total >> 1)) / total);
     		nim->green[icolor] = (int) ((c1total + (total >> 1)) / total);
     		nim->blue[icolor] = (int) ((c2total + (total >> 1)) / total);
    @@ -1365,16 +1370,26 @@ zeroHistogram (hist3d histogram)
     }
     
     
    -/*
    -	Function: gdImageTrueColorToPaletteSetMethod
    -
    -	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.
    -*/
    +/**
    + * Function: gdImageTrueColorToPaletteSetMethod
    + *
    + * Selects the quantization method
    + *
    + * That quantization method is used for all subsequent
    + * <gdImageTrueColorToPalette> and <gdImageCreatePaletteFromTrueColor> calls.
    + *
    + * Parameters:
    + *   im     - The image.
    + *   method - The quantization method, see <gdPaletteQuantizationMethod>.
    + *   speed  - The quantization speed between 1 (highest quality) and
    + *            10 (fastest). 0 selects a method-specific default (recommended).
    + *   
    + * Returns:
    + *   Zero if the given method is invalid or not available; non-zero otherwise.
    + *
    + * See also:
    + *   - <gdImageTrueColorToPaletteSetQuality>
    + */
     BGD_DECLARE(int) gdImageTrueColorToPaletteSetMethod (gdImagePtr im, int method, int speed)
     {
     #ifndef HAVE_LIBIMAGEQUANT
    @@ -1394,15 +1409,25 @@ BGD_DECLARE(int) gdImageTrueColorToPaletteSetMethod (gdImagePtr im, int method,
     	return TRUE;
     }
     
    -/*
    -	Function: gdImageTrueColorToPaletteSetQuality
    -
    -	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.
    -*/
    +/**
    + * Function: gdImageTrueColorToPaletteSetQuality
    + *
    + * Chooses a quality range for quantization
    + *
    + * That quality range is used in all subsequent calls to
    + * <gdImageTrueColorToPalette> and <gdImageCreatePaletteFromTrueColor>
    + * if the quantization method is <GD_QUANT_LIQ>.
    + *
    + * Parameters:
    + *   im          - The image.
    + *   min_quality - The minimum quality in range 1-100 (1 = ugly, 100 = perfect).
    + *                 If the palette cannot represent the image with at least
    + *                 min_quality, then no conversion is done.
    + *   max_quality - The maximum quality in range 1-100 (1 = ugly, 100 = perfect),
    + *                 which must be higher than the min_quality. If the palette can
    + *                 represent the image with a quality better than max_quality,
    + *                 then fewer colors than requested will be used.
    + */
     BGD_DECLARE(void) gdImageTrueColorToPaletteSetQuality (gdImagePtr im, int min_quality, int max_quality)
     {
     	if (min_quality >= 0 && min_quality <= 100 &&
    @@ -1414,9 +1439,24 @@ BGD_DECLARE(void) gdImageTrueColorToPaletteSetQuality (gdImagePtr im, int min_qu
     
     static int gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int colorsWanted, gdImagePtr *cimP);
     
    -/*
    -	Function: gdImageCreatePaletteFromTrueColor
    -*/
    +/**
    + * Function: gdImageCreatePaletteFromTrueColor
    + *
    + * Creates a new palette image from a truecolor image
    + *
    + * Parameters:
    + *   im           - The image.
    + *   dither       - Whether dithering should be applied.
    + *   colorsWanted - The number of desired palette entries.
    + *
    + * Returns:
    + *   A newly create palette image; NULL on failure.
    + *   
    + * See also:
    + *   - <gdImageCreatePaletteFromTrueColor>
    + *   - <gdImageTrueColorToPaletteSetMethod>
    + *   - <gdImageNeuQuant>
    + */
     BGD_DECLARE(gdImagePtr) gdImageCreatePaletteFromTrueColor (gdImagePtr im, int dither, int colorsWanted)
     {
     	gdImagePtr nim;
    @@ -1426,9 +1466,24 @@ BGD_DECLARE(gdImagePtr) gdImageCreatePaletteFromTrueColor (gdImagePtr im, int di
     	return NULL;
     }
     
    -/*
    -	Function: gdImageTrueColorToPalette
    -*/
    +/**
    + * Function: gdImageTrueColorToPalette
    + *
    + * Converts a truecolor image to a palette image
    + *
    + * Parameters:
    + *   im           - The image.
    + *   dither       - Whether dithering should be applied.
    + *   colorsWanted - The number of desired palette entries.
    + *
    + * Returns:
    + *   Non-zero if the conversion succeeded, zero otherwise.
    + *
    + * See also:
    + *   - <gdImageCreatePaletteFromTrueColor>
    + *   - <gdImageTrueColorToPaletteSetMethod>
    + *   - <gdImagePaletteToTrueColor>
    + */
     BGD_DECLARE(int) gdImageTrueColorToPalette (gdImagePtr im, int dither, int colorsWanted)
     {
     	return gdImageTrueColorToPaletteBody(im, dither, colorsWanted, 0);
    @@ -1535,6 +1590,7 @@ static int gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int colors
     		if (!nim) {
     			return FALSE;
     		} else {
    +			free_truecolor_image_data(oim);
     			gdImageCopy(oim, nim, 0, 0, 0, 0, oim->sx, oim->sy);
     			gdImageDestroy(nim);
     		}
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_transform.c b/Build/source/libs/gd/libgd-src/src/gd_transform.c
    index a126686269d..1a96daaf438 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_transform.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_transform.c
    @@ -1,12 +1,28 @@
    +/**
    + * File: Transformations
    + */
    +
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif /* HAVE_CONFIG_H */
     
     #include "gd.h"
     
    -/*
    -	Function: gdImageFlipVertical
    -*/
    +/**
    + * Function: gdImageFlipVertical
    + *
    + * Flip an image vertically
    + *
    + * The image is mirrored upside-down.
    + *
    + * Parameters:
    + *   im - The image.
    + *
    + * See also:
    + *   - <gdImageFlipHorizontal>
    + *   - <gdImageFlipBoth>
    + */
     BGD_DECLARE(void) gdImageFlipVertical(gdImagePtr im)
     {
     	register int x, y;
    @@ -35,9 +51,20 @@ BGD_DECLARE(void) gdImageFlipVertical(gdImagePtr im)
     	return;
     }
     
    -/*
    -	Function: gdImageFlipHorizontal
    -*/
    +/**
    + * Function: gdImageFlipHorizontal
    + *
    + * Flip an image horizontally
    + *
    + * The image is mirrored left-right.
    + *
    + * Parameters:
    + *   im - The image.
    + *
    + * See also:
    + *   - <gdImageFlipVertical>
    + *   - <gdImageFlipBoth>
    + */
     BGD_DECLARE(void) gdImageFlipHorizontal(gdImagePtr im)
     {
     
    @@ -74,9 +101,20 @@ BGD_DECLARE(void) gdImageFlipHorizontal(gdImagePtr im)
     	}
     }
     
    -/*
    -	Function: gdImageFlipBoth
    -*/
    +/**
    + * Function: gdImageFlipBoth
    + *
    + * Flip an image vertically and horizontally
    + *
    + * The image is mirrored upside-down and left-right.
    + *
    + * Parameters:
    + *   im - The image.
    + *
    + * See also:
    + *   - <gdImageFlipVertical>
    + *   - <gdImageFlipHorizontal>
    + */
     BGD_DECLARE(void) gdImageFlipBoth(gdImagePtr im)
     {
     	gdImageFlipVertical(im);
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_wbmp.c b/Build/source/libs/gd/libgd-src/src/gd_wbmp.c
    index d9de5916bba..0028273d656 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_wbmp.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_wbmp.c
    @@ -51,6 +51,12 @@
      *--------------------------------------------------------------------------
      */
     
    +/**
    + * File: WBMP IO
    + *
    + * Read and write WBMP images.
    + */
    +
     #ifdef HAVE_CONFIG_H
     #	include "config.h"
     #endif
    @@ -200,15 +206,17 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMPCtx(gdIOCtx *infile)
         A pointer to the new image or NULL if an error occurred.
     
       Example:
    +    (start code)
     
    -    > gdImagePtr im;
    -    > FILE *in;
    -    > in = fopen("mywbmp.wbmp", "rb");
    -    > im = gdImageCreateFromWBMP(in);
    -    > fclose(in);
    -    > // ... Use the image ...
    -    > gdImageDestroy(im);
    +    gdImagePtr im;
    +    FILE *in;
    +    in = fopen("mywbmp.wbmp", "rb");
    +    im = gdImageCreateFromWBMP(in);
    +    fclose(in);
    +    // ... Use the image ...
    +    gdImageDestroy(im);
     
    +    (end code)
     */
     
     BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMP(FILE *inFile)
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_webp.c b/Build/source/libs/gd/libgd-src/src/gd_webp.c
    index 98628cfff7f..b5ee2642634 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_webp.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_webp.c
    @@ -1,3 +1,9 @@
    +/**
    + * File: WebP IO
    + *
    + * Read and write WebP images.
    + */
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif /* HAVE_CONFIG_H */
    @@ -16,7 +22,43 @@
     
     #define GD_WEBP_ALLOC_STEP (4*1024)
     
    -gdImagePtr gdImageCreateFromWebp (FILE * inFile)
    +/*
    +  Function: gdImageCreateFromWebp
    +
    +    <gdImageCreateFromWebp> is called to load truecolor images from
    +    WebP format files. Invoke <gdImageCreateFromWebp> with an
    +    already opened pointer to a file containing the desired
    +    image. <gdImageCreateFromWebp> returns a <gdImagePtr> to the new
    +    truecolor image, or NULL if unable to load the image (most often
    +    because the file is corrupt or does not contain a WebP
    +    image). <gdImageCreateFromWebp> does not close the file.
    +
    +    You can inspect the sx and sy members of the image to determine
    +    its size. The image must eventually be destroyed using
    +    <gdImageDestroy>.
    +
    +    *The returned image is always a truecolor image.*
    +
    +  Variants:
    +
    +    <gdImageCreateFromJpegPtr> creates an image from WebP data
    +    already in memory.
    +
    +    <gdImageCreateFromJpegCtx> reads its data via the function
    +    pointers in a <gdIOCtx> structure.
    +
    +  Parameters:
    +
    +    infile - The input FILE pointer.
    +
    +  Returns:
    +
    +    A pointer to the new *truecolor* image.  This will need to be
    +    destroyed with <gdImageDestroy> once it is no longer needed.
    +
    +    On error, returns NULL.
    +*/
    +BGD_DECLARE(gdImagePtr) gdImageCreateFromWebp (FILE * inFile)
     {
     	gdImagePtr im;
     	gdIOCtx *in = gdNewFileCtx(inFile);
    @@ -30,7 +72,17 @@ gdImagePtr gdImageCreateFromWebp (FILE * inFile)
     }
     
     
    -gdImagePtr gdImageCreateFromWebpPtr (int size, void *data)
    +/*
    +  Function: gdImageCreateFromWebpPtr
    +
    +    See <gdImageCreateFromWebp>.
    +
    +  Parameters:
    +
    +    size            - size of WebP data in bytes.
    +    data            - pointer to WebP data.
    +*/
    +BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpPtr (int size, void *data)
     {
     	gdImagePtr im;
     	gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
    @@ -41,7 +93,12 @@ gdImagePtr gdImageCreateFromWebpPtr (int size, void *data)
     	return im;
     }
     
    -gdImagePtr gdImageCreateFromWebpCtx (gdIOCtx * infile)
    +/*
    +  Function: gdImageCreateFromWebpCtx
    +
    +    See <gdImageCreateFromWebp>.
    +*/
    +BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpCtx (gdIOCtx * infile)
     {
     	int    width, height;
     	uint8_t   *filedata = NULL;
    @@ -105,30 +162,41 @@ gdImagePtr gdImageCreateFromWebpCtx (gdIOCtx * infile)
     	return im;
     }
     
    -void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization)
    +
    +/* returns 0 on success, 1 on failure */
    +static int _gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
     {
     	uint8_t *argb;
     	int x, y;
     	uint8_t *p;
     	uint8_t *out;
     	size_t out_size;
    +    int ret = 0;
     
     	if (im == NULL) {
    -		return;
    +		return 1;
     	}
     
     	if (!gdImageTrueColor(im)) {
    -		gd_error("Paletter image not supported by webp");
    -		return;
    +		gd_error("Palette image not supported by webp");
    +		return 1;
    +	}
    +
    +	if (quality == -1) {
    +		quality = 80;
     	}
     
    -	if (quantization == -1) {
    -		quantization = 80;
    +	if (overflow2(gdImageSX(im), 4)) {
    +		return 1;
    +	}
    +
    +	if (overflow2(gdImageSX(im) * 4, gdImageSY(im))) {
    +		return 1;
     	}
     
     	argb = (uint8_t *)gdMalloc(gdImageSX(im) * 4 * gdImageSY(im));
     	if (!argb) {
    -		return;
    +		return 1;
     	}
     	p = argb;
     	for (y = 0; y < gdImageSY(im); y++) {
    @@ -148,9 +216,10 @@ void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization)
     			*(p++) = a;
     		}
     	}
    -	out_size = WebPEncodeRGBA(argb, gdImageSX(im), gdImageSY(im), gdImageSX(im) * 4, quantization, &out);
    +	out_size = WebPEncodeRGBA(argb, gdImageSX(im), gdImageSY(im), gdImageSX(im) * 4, quality, &out);
     	if (out_size == 0) {
     		gd_error("gd-webp encoding failed");
    +        ret = 1;
     		goto freeargb;
     	}
     	gdPutBuf(out, out_size, outfile);
    @@ -158,23 +227,86 @@ void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization)
     
     freeargb:
     	gdFree(argb);
    +
    +    return ret;
     }
     
    +
     /*
    -	Function: gdImageWebpEx
    +  Function: gdImageWebpCtx
    +
    +    Write the image as WebP data via a <gdIOCtx>. See <gdImageWebpEx>
    +    for more details.
    +
    +  Parameters:
    +
    +    im      - The image to write.
    +    outfile - The output sink.
    +    quality - Image quality.
    +
    +  Returns:
    +
    +    Nothing.
     */
    -BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization)
    +BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
    +{
    +	_gdImageWebpCtx(im, outfile, quality);
    +}
    +
    +/*
    +  Function: gdImageWebpEx
    +
    +    <gdImageWebpEx> outputs the specified image to the specified file in
    +    WebP format. The file must be open for writing. Under MSDOS and
    +    all versions of Windows, it is important to use "wb" as opposed to
    +    simply "w" as the mode when opening the file, and under Unix there
    +    is no penalty for doing so. <gdImageWebpEx> does not close the file;
    +    your code must do so.
    +
    +	If _quality_ is -1, a reasonable quality value (which should yield a
    +	good general quality / size tradeoff for most situations) is used. Otherwise
    +	_quality_ should be a value in the range 0-100, higher quality values
    +	usually implying both higher quality and larger image sizes.
    +
    +  Variants:
    +
    +    <gdImageWebpCtx> stores the image using a <gdIOCtx> struct.
    +
    +    <gdImageWebpPtrEx> stores the image to RAM.
    +
    +  Parameters:
    +
    +    im      - The image to save.
    +    outFile - The FILE pointer to write to.
    +    quality - Compression quality (0-100).
    +
    +  Returns:
    +
    +    Nothing.
    +*/
    +BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quality)
     {
     	gdIOCtx *out = gdNewFileCtx(outFile);
     	if (out == NULL) {
     		return;
     	}
    -	gdImageWebpCtx(im, out, quantization);
    +	_gdImageWebpCtx(im, out, quality);
     	out->gd_free(out);
     }
     
     /*
    -	Function: gdImageWebp
    +  Function: gdImageWebp
    +
    +    Variant of <gdImageWebpEx> which uses the default quality (-1).
    +
    +  Parameters:
    +
    +    im      - The image to save
    +    outFile - The FILE pointer to write to.
    +
    +  Returns:
    +
    +    Nothing.
     */
     BGD_DECLARE(void) gdImageWebp (gdImagePtr im, FILE * outFile)
     {
    @@ -182,12 +314,14 @@ BGD_DECLARE(void) gdImageWebp (gdImagePtr im, FILE * outFile)
     	if (out == NULL) {
     		return;
     	}
    -	gdImageWebpCtx(im, out, -1);
    +	_gdImageWebpCtx(im, out, -1);
     	out->gd_free(out);
     }
     
     /*
    -	Function: gdImageWebpPtr
    +  Function: gdImageWebpPtr
    +
    +    See <gdImageWebpEx>.
     */
     BGD_DECLARE(void *) gdImageWebpPtr (gdImagePtr im, int *size)
     {
    @@ -196,25 +330,33 @@ BGD_DECLARE(void *) gdImageWebpPtr (gdImagePtr im, int *size)
     	if (out == NULL) {
     		return NULL;
     	}
    -	gdImageWebpCtx(im, out, -1);
    -	rv = gdDPExtractData(out, size);
    +	if (_gdImageWebpCtx(im, out, -1)) {
    +		rv = NULL;
    +	} else {
    +		rv = gdDPExtractData(out, size);
    +	}
     	out->gd_free(out);
     
     	return rv;
     }
     
     /*
    -	Function: gdImageWebpPtrEx
    +  Function: gdImageWebpPtrEx
    +
    +    See <gdImageWebpEx>.
     */
    -BGD_DECLARE(void *) gdImageWebpPtrEx (gdImagePtr im, int *size, int quantization)
    +BGD_DECLARE(void *) gdImageWebpPtrEx (gdImagePtr im, int *size, int quality)
     {
     	void *rv;
     	gdIOCtx *out = gdNewDynamicCtx(2048, NULL);
     	if (out == NULL) {
     		return NULL;
     	}
    -	gdImageWebpCtx(im, out, quantization);
    -	rv = gdDPExtractData(out, size);
    +	if (_gdImageWebpCtx(im, out, quality)) {
    +        rv = NULL;
    +    } else {
    +        rv = gdDPExtractData(out, size);
    +    }
     	out->gd_free(out);
     	return rv;
     }
    diff --git a/Build/source/libs/gd/libgd-src/src/gd_xbm.c b/Build/source/libs/gd/libgd-src/src/gd_xbm.c
    index 58b57203dc6..5f09b56674d 100644
    --- a/Build/source/libs/gd/libgd-src/src/gd_xbm.c
    +++ b/Build/source/libs/gd/libgd-src/src/gd_xbm.c
    @@ -1,3 +1,9 @@
    +/**
    + * File: XBM IO
    + *
    + * Read and write XBM images.
    + */
    +
     #ifdef HAVE_CONFIG_H
     #	include "config.h"
     #endif
    @@ -43,14 +49,17 @@
         A pointer to the new image or NULL if an error occurred.
     
       Example:
    +    (start code)
    +
    +    gdImagePtr im;
    +    FILE *in;
    +    in = fopen("myxbm.xbm", "rb");
    +    im = gdImageCreateFromXbm(in);
    +    fclose(in);
    +    // ... Use the image ...
    +    gdImageDestroy(im);
     
    -    > gdImagePtr im;
    -    > FILE *in;
    -    > in = fopen("myxbm.xbm", "rb");
    -    > im = gdImageCreateFromXbm(in);
    -    > fclose(in);
    -    > // ... Use the image ...
    -    > gdImageDestroy(im);
    +    (end code)
     */
     BGD_DECLARE(gdImagePtr) gdImageCreateFromXbm(FILE * fd)
     {
    diff --git a/Build/source/libs/gd/libgd-src/src/gdfontg.c b/Build/source/libs/gd/libgd-src/src/gdfontg.c
    index 04f3362c99b..2adf6da7995 100644
    --- a/Build/source/libs/gd/libgd-src/src/gdfontg.c
    +++ b/Build/source/libs/gd/libgd-src/src/gdfontg.c
    @@ -10,6 +10,15 @@
        "Libor Skarvada, libor@informatics.muni.cz"
      */
     
    +/**
    + * File: Giant Font
    + *
    + * A very large ISO-8859-2 raster font (9x15 pixels).
    + *
    + * The font is supposed to be used with <gdImageChar> and <gdImageString>
    + * and their variants.
    + */
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
    @@ -4382,9 +4391,11 @@ gdFont gdFontGiantRep = {
     
     BGD_EXPORT_DATA_PROT gdFontPtr gdFontGiant = &gdFontGiantRep;
     
    -/*
    -	Function: gdFontGetGiant
    -*/
    +/**
    + * Function: gdFontGetGiant
    + *
    + * Returns the built-in giant font.
    + */
     BGD_DECLARE(gdFontPtr) gdFontGetGiant (void)
     {
     	return gdFontGiant;
    diff --git a/Build/source/libs/gd/libgd-src/src/gdfontl.c b/Build/source/libs/gd/libgd-src/src/gdfontl.c
    index 8501b5f7d96..97f7a65863d 100644
    --- a/Build/source/libs/gd/libgd-src/src/gdfontl.c
    +++ b/Build/source/libs/gd/libgd-src/src/gdfontl.c
    @@ -11,6 +11,15 @@
        "Libor Skarvada, libor@informatics.muni.cz"
      */
     
    +/**
    + * File: Large Font
    + *
    + * A large ISO-8859-2 raster font (8x16 pixels).
    + *
    + * The font is supposed to be used with <gdImageChar> and <gdImageString>
    + * and their variants.
    + */
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
    @@ -4639,9 +4648,11 @@ gdFont gdFontLargeRep = {
     
     BGD_EXPORT_DATA_PROT gdFontPtr gdFontLarge = &gdFontLargeRep;
     
    -/*
    -	Function: gdFontGetLarge
    -*/
    +/**
    + * Function: gdFontGetLarge
    + *
    + * Returns the built-in large font.
    + */
     BGD_DECLARE(gdFontPtr)
     gdFontGetLarge (void)
     {
    diff --git a/Build/source/libs/gd/libgd-src/src/gdfontmb.c b/Build/source/libs/gd/libgd-src/src/gdfontmb.c
    index 566cc6dd15f..debee4e3105 100644
    --- a/Build/source/libs/gd/libgd-src/src/gdfontmb.c
    +++ b/Build/source/libs/gd/libgd-src/src/gdfontmb.c
    @@ -9,6 +9,15 @@
        No copyright info was found in the original bdf.
      */
     
    +/**
    + * File: Medium Bold Font
    + *
    + * A medium bold ISO-8859-2 raster font (7x13 pixels).
    + *
    + * The font is supposed to be used with <gdImageChar> and <gdImageString>
    + * and their variants.
    + */
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
    @@ -3869,9 +3878,11 @@ gdFont gdFontMediumBoldRep = {
     
     BGD_EXPORT_DATA_PROT gdFontPtr gdFontMediumBold = &gdFontMediumBoldRep;
     
    -/*
    -	Function: gdFontGetMediumBold
    -*/
    +/**
    + * Function: gdFontGetMediumBold
    + *
    + * Returns the built-in medium bold font.
    + */
     BGD_DECLARE(gdFontPtr)
     gdFontGetMediumBold (void)
     {
    diff --git a/Build/source/libs/gd/libgd-src/src/gdfonts.c b/Build/source/libs/gd/libgd-src/src/gdfonts.c
    index f84b2ee7d4e..e184e364ca9 100644
    --- a/Build/source/libs/gd/libgd-src/src/gdfonts.c
    +++ b/Build/source/libs/gd/libgd-src/src/gdfonts.c
    @@ -7,6 +7,15 @@
        No copyright info was found in the original bdf.
      */
     
    +/**
    + * File: Small Font
    + *
    + * A small ISO-8859-2 raster font (7x13 pixels).
    + *
    + * The font is supposed to be used with <gdImageChar> and <gdImageString>
    + * and their variants.
    + */
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
    @@ -3867,9 +3876,11 @@ gdFont gdFontSmallRep = {
     
     BGD_EXPORT_DATA_PROT gdFontPtr gdFontSmall = &gdFontSmallRep;
     
    -/*
    -	Function: gdFontGetSmall
    -*/
    +/**
    + * Function: gdFontGetSmall
    + *
    + * Returns the built-in small font.
    + */
     BGD_DECLARE(gdFontPtr)
     gdFontGetSmall (void)
     {
    diff --git a/Build/source/libs/gd/libgd-src/src/gdfontt.c b/Build/source/libs/gd/libgd-src/src/gdfontt.c
    index 3c97c4d376d..e7bb3458e16 100644
    --- a/Build/source/libs/gd/libgd-src/src/gdfontt.c
    +++ b/Build/source/libs/gd/libgd-src/src/gdfontt.c
    @@ -10,6 +10,15 @@
        "Libor Skarvada, libor@informatics.muni.cz"
      */
     
    +/**
    + * File: Tiny Font
    + *
    + * A very small ISO-8859-2 raster font (5x8 pixels).
    + *
    + * The font is supposed to be used with <gdImageChar> and <gdImageString>
    + * and their variants.
    + */
    +
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
    @@ -2590,9 +2599,11 @@ gdFont gdFontTinyRep = {
     
     BGD_EXPORT_DATA_PROT gdFontPtr gdFontTiny = &gdFontTinyRep;
     
    -/*
    -	Function: gdFontGetTiny
    -*/
    +/**
    + * Function: gdFontGetTiny
    + *
    + * Returns the built-in tiny font.
    + */
     BGD_DECLARE(gdFontPtr)
     gdFontGetTiny (void)
     {
    diff --git a/Build/source/libs/gd/libgd-src/src/gdft.c b/Build/source/libs/gd/libgd-src/src/gdft.c
    index e745c6c098d..d989ecc3873 100644
    --- a/Build/source/libs/gd/libgd-src/src/gdft.c
    +++ b/Build/source/libs/gd/libgd-src/src/gdft.c
    @@ -6,6 +6,10 @@
     /********************************************/
     
     
    +/**
    + * File: FreeType font rendering
    + */
    +
     #include <stdio.h>
     #include <stdlib.h>
     #include <string.h>
    @@ -17,7 +21,6 @@
     
     #include "gd.h"
     #include "gdhelpers.h"
    -#include "entities.h"
     #include "gd_intern.h"
     
     /* 2.0.10: WIN32, not MSWIN32 */
    @@ -46,7 +49,10 @@ static int fontConfigFlag = 0;
     static char *font_pattern(char **fontpath, char *fontpattern);
     #endif
     
    +#ifdef HAVE_LIBFREETYPE
    +#include "entities.h"
     static char *font_path(char **fontpath, char *name_list);
    +#endif
     
     /* 2.0.30: move these up here so we can build correctly without freetype
     	but with fontconfig */
    @@ -92,9 +98,11 @@ static char *font_path(char **fontpath, char *name_list);
     #define TRUE !FALSE
     #endif
     
    -/*
    -	Function: gdImageStringTTF
    -*/
    +/**
    + * Function: gdImageStringTTF
    + *
    + * Alias of <gdImageStringFT>.
    + */
     BGD_DECLARE(char *) gdImageStringTTF (gdImage * im, int *brect, int fg, char *fontlist,
                                           double ptsize, double angle, int x, int y, char *string)
     {
    @@ -139,16 +147,6 @@ BGD_DECLARE(char *) gdImageStringFT (gdImage * im, int *brect, int fg, char *fon
     }
     #else
     
    -#ifndef HAVE_LIBFONTCONFIG
    -static char * font_pattern(char **fontpath, char *fontpattern)
    -{
    -	(void)fontpath;
    -	(void)fontpattern;
    -
    -	return "libgd was not built with FontConfig support\n";
    -}
    -#endif /* HAVE_LIBFONTCONFIG */
    -
     #include "gdcache.h"
     /* 2.0.16 Christophe Thomas: starting with FreeType 2.1.6, this is
       mandatory, and it has been supported for a long while. */
    @@ -446,15 +444,15 @@ fontTest (void *element, void *key)
     	return (strcmp (a->fontlist, b->fontlist) == 0 && a->flags == b->flags);
     }
     
    +#ifdef HAVE_LIBFONTCONFIG
     static int useFontConfig(int flag)
     {
    -#ifdef HAVE_LIBFONTCONFIG
     	if (fontConfigFlag) {
     		return (!(flag & gdFTEX_FONTPATHNAME));
     	}
    -#endif
     	return flag & gdFTEX_FONTCONFIG;
     }
    +#endif
     
     static void *
     fontFetch (char **error, void *key)
    @@ -768,17 +766,26 @@ gdft_draw_bitmap (gdCache_head_t * tc_cache, gdImage * im, int fg,
     	return (char *) NULL;
     }
     
    -/*
    -	Function: gdFreeFontCache
    -*/
    +/**
    + * Function: gdFreeFontCache
    + *
    + * Alias of <gdFontCacheShutdown>.
    + */
     BGD_DECLARE(void) gdFreeFontCache ()
     {
     	gdFontCacheShutdown ();
     }
     
    -/*
    -	Function: gdFontCacheShutdown
    -*/
    +/**
    + * Function: gdFontCacheShutdown
    + *
    + * Shut down the font cache and free the allocated resources.
    + *
    + * Important:
    + *  This function has to be called whenever FreeType operations have been
    + *  invoked, to avoid resource leaks. It doesn't harm to call this function
    + *  multiple times.
    + */
     BGD_DECLARE(void) gdFontCacheShutdown ()
     {
     	if (fontCache) {
    @@ -792,11 +799,31 @@ BGD_DECLARE(void) gdFontCacheShutdown ()
     	}
     }
     
    -/*
    -	Function: gdImageStringFT
    -
    -	Render a utf8 string onto a gd image.
    -*/
    +/**
    + * Function: gdImageStringFT
    + *
    + * Render an UTF-8 string onto a gd image.
    + *
    + * Parameters:
    + *	im       - The image to draw onto.
    + *  brect    - The bounding rectangle as array of 8 integers where each pair
    + *             represents the x- and y-coordinate of a point. The points
    + *             specify the lower left, lower right, upper right and upper left
    + *             corner.
    + *	fg       - The font color.
    + *	fontlist - The semicolon delimited list of font filenames to look for.
    + *	ptsize   - The height of the font in typographical points (pt).
    + *	angle    - The angle in radian to rotate the font counter-clockwise.
    + *	x        - The x-coordinate of the basepoint (roughly the lower left corner) of the first letter.
    + *	y        - The y-coordinate of the basepoint (roughly the lower left corner) of the first letter.
    + *	string   - The string to render.
    + *
    + * Variant:
    + *  - <gdImageStringFTEx>
    + *
    + * See also:
    + *  - <gdImageString>
    + */
     BGD_DECLARE(char *) gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
                                          double ptsize, double angle, int x, int y, char *string)
     {
    @@ -804,9 +831,15 @@ BGD_DECLARE(char *) gdImageStringFT (gdImage * im, int *brect, int fg, char *fon
     	                          ptsize, angle, x, y, string, 0);
     }
     
    -/*
    -	Function: gdFontCacheSetup
    -*/
    +/**
    + * Function: gdFontCacheSetup
    + *
    + * Set up the font cache.
    + *
    + * This is called automatically from the string rendering functions, if it
    + * has not already been called. So there's no need to call this function
    + * explicitly.
    + */
     BGD_DECLARE(int) gdFontCacheSetup (void)
     {
     	if (fontCache) {
    @@ -834,23 +867,26 @@ BGD_DECLARE(int) gdFontCacheSetup (void)
       If the strex parameter is not null, it must point to a
       gdFTStringExtra structure. As of gd 2.0.5, this structure is defined
       as follows:
    -
    -  > typedef struct {
    -  >     // logical OR of gdFTEX_ values
    -  >     int flags; 
    -  > 
    -  >     // fine tune line spacing for '\n'
    -  >     double linespacing; 
    -  > 
    -  >     // Preferred character mapping
    -  >     int charmap;
    -  > 
    -  >     // Rendering resolution
    -  >     int hdpi;
    -  >     int vdpi;
    -  >     char *xshow;
    -  >     char *fontpath;
    -  > } gdFTStringExtra, *gdFTStringExtraPtr;
    +  (start code)
    +
    +  typedef struct {
    +      // logical OR of gdFTEX_ values
    +      int flags;
    +   
    +      // fine tune line spacing for '\n'
    +      double linespacing;
    +   
    +      // Preferred character mapping
    +      int charmap;
    +   
    +      // Rendering resolution
    +      int hdpi;
    +      int vdpi;
    +      char *xshow;
    +      char *fontpath;
    +  } gdFTStringExtra, *gdFTStringExtraPtr;
    +
    +  (end code)
     
       To output multiline text with a specific line spacing, include
       gdFTEX_LINESPACE in the setting of flags:
    @@ -919,14 +955,14 @@ BGD_DECLARE(int) gdFontCacheSetup (void)
       GD 2.0.29 and later can use fontconfig to resolve font names,
       including fontconfig patterns, if the gdFTEX_FONTCONFIG flag is
       set. As a convenience, this behavior can be made the default by
    -  calling gdFTUseFontConfig with a nonzero value. In that situation it
    +  calling <gdFTUseFontConfig> with a nonzero value. In that situation it
       is not necessary to set the gdFTEX_FONTCONFIG flag on every call;
       however explicit font path names can still be used if the
       gdFTEX_FONTPATHNAME flag is set:
     
         > flags | gdFTEX_FONTPATHNAME;
     
    -  Unless gdFTUseFontConfig has been called with a nonzero value, GD
    +  Unless <gdFTUseFontConfig> has been called with a nonzero value, GD
       2.0.29 and later will still expect the fontlist argument to the
       freetype text output functions to be a font file name or list
       thereof as in previous versions. If you do not wish to make
    @@ -939,7 +975,7 @@ BGD_DECLARE(int) gdFontCacheSetup (void)
       GD 2.0.29 and above can use fontconfig to resolve font names,
       including fontconfig patterns, if the gdFTEX_FONTCONFIG flag is
       set. As a convenience, this behavior can be made the default by
    -  calling gdFTUseFontConfig with a nonzero value. In that situation it
    +  calling <gdFTUseFontConfig> with a nonzero value. In that situation it
       is not necessary to set the gdFTEX_FONTCONFIG flag on every call;
       however explicit font path names can still be used if the
       gdFTEX_FONTPATHNAME flag is set:
    @@ -1630,6 +1666,7 @@ static char * font_pattern(char **fontpath, char *fontpattern)
     
     #endif /* HAVE_LIBFONTCONFIG */
     
    +#ifdef HAVE_LIBFREETYPE
     /* Look up font using font names as file names. */
     static char * font_path(char **fontpath, char *name_list)
     {
    @@ -1758,10 +1795,21 @@ static char * font_path(char **fontpath, char *name_list)
     	*fontpath = fullname;
     	return NULL;
     }
    +#endif
     
    -/*
    -	Function: gdFTUseFontConfig
    -*/
    +/**
    + * Function: gdFTUseFontConfig
    + *
    + * Enable or disable fontconfig by default.
    + *
    + * If GD is built without libfontconfig support, this function is a NOP.
    + *
    + * Parameters:
    + *  flag - Zero to disable, nonzero to enable.
    + *
    + * See also:
    + *  - <gdImageStringFTEx>
    + */
     BGD_DECLARE(int) gdFTUseFontConfig(int flag)
     {
     #ifdef HAVE_LIBFONTCONFIG
    diff --git a/Build/source/libs/gd/libgd-src/src/gdfx.c b/Build/source/libs/gd/libgd-src/src/gdfx.c
    index f145de04802..d71a3421b2c 100644
    --- a/Build/source/libs/gd/libgd-src/src/gdfx.c
    +++ b/Build/source/libs/gd/libgd-src/src/gdfx.c
    @@ -25,10 +25,39 @@
     #define MAXY(x) MAX4(x[1],x[3],x[5],x[7])
     #define MINY(x) MIN4(x[1],x[3],x[5],x[7])
     
    -/*
    -	Function: gdImageStringFTCircle
    -*/
    -BGD_DECLARE(char *)
    +/**
    + * Function: gdImageStringFTCircle
    + *
    + * Draw text curved along the top and bottom of a circular area of an image.
    + *
    + * Parameters:
    + *  im          - The image to draw onto.
    + *  cx          - The x-coordinate of the center of the circular area.
    + *  cy          - The y-coordinate of the center of the circular area.
    + *  radius      - The radius of the circular area.
    + *  textRadius  - The height of each character; if textRadius is 1/2 of radius,
    + *	              characters extend halfway from the edge to the center.
    + *  fillPortion - The percentage of the 180 degrees of the circular area
    + *                assigned to each section of text, that is actually occupied
    + *                by text. The value has to be in range 0.0 to 1.0, with useful
    + *                values from about 0.4 to 0.9; 0.9 looks better than 1.0 which
    + *                is rather crowded.
    + *  font        - The fontlist that is passed to <gdImageStringFT>.
    + *  points      - The point size, which functions as a hint. Although the size
    + *                of the text is determined by radius, textRadius and
    + *                fillPortion, a point size that 'hints' appropriately should be
    + *                passed. If it's known that the text will be large, a large
    + *                point size such as 24.0 should be passed to get the best
    + *                results.
    + *  top         - The text to draw clockwise at the top of the circular area.
    + *  bottom      - The text to draw counterclockwise at the bottom of the
    + *                circular area.
    + *  fgcolor     - The font color.
    + *
    + * Returns:
    + *  NULL on success, or an error string on failure.
    + */
    +BGD_DECLARE(char*)
     gdImageStringFTCircle (gdImagePtr im,
                            int cx,
                            int cy,
    @@ -257,9 +286,21 @@ main (int argc, char *argv[])
     #define SUPERBITS1 1
     #define SUPERBITS2 2
     
    -/*
    -	Function: gdImageSquareToCircle
    -*/
    +/**
    + * Function: gdImageSquareToCircle
    + *
    + * Apply polar coordinate transformation to an image.
    + *
    + * The X axis of the original will be remapped to theta (angle) and the Y axis
    + * of the original will be remapped to rho (distance from center).
    + *
    + * Parameters:
    + *  im     - The image, which must be square, i.e. width == height.
    + *  radius - The radius of the new image, i.e. width == height == radius * 2.
    + *
    + * Returns:
    + *  The transformed image, or NULL on failure.
    + */
     BGD_DECLARE(gdImagePtr)
     gdImageSquareToCircle (gdImagePtr im, int radius)
     {
    @@ -386,19 +427,21 @@ gdImageSubSharpen (int pc, int c, int nc, float inner_coeff, float
     	return gdTrueColorAlpha ((int) red, (int) green, (int) blue, (int) alpha);
     }
     
    -/*
    -	Function: gdImageSharpen
    -
    -	Sharpen function added on 2003-11-19
    -	by Paul Troughton (paul<dot>troughton<at>ieee<dot>org)
    -	Simple 3x3 convolution kernel
    -	Makes use of seperability
    -	Faster, but less flexible, than full-blown unsharp masking
    -	pct is sharpening percentage, and can be greater than 100
    -	Silently does nothing to non-truecolor images
    -	Silently does nothing for pct<0, as not a useful blurring function
    -	Leaves transparency/alpha-channel untouched
    -*/
    +/**
    + * Function: gdImageSharpen
    + *
    + * Sharpen an image.
    + *
    + * Uses a simple 3x3 convolution kernel and makes use of separability.
    + * It's faster, but less flexible, than full-blown unsharp masking.
    + * Silently does nothing to non-truecolor images and for pct<0, as it's not a useful blurring function.
    + *
    + * Parameters:
    + *  pct - The sharpening percentage, which can be greater than 100.
    + *
    + * Author:
    + *  Paul Troughton (paul<dot>troughton<at>ieee<dot>org)
    + */
     BGD_DECLARE(void)
     gdImageSharpen (gdImagePtr im, int pct)
     {
    diff --git a/Build/source/libs/gd/libgd-src/src/gdfx.h b/Build/source/libs/gd/libgd-src/src/gdfx.h
    index cf83d3eb46e..dbd74984ebe 100644
    --- a/Build/source/libs/gd/libgd-src/src/gdfx.h
    +++ b/Build/source/libs/gd/libgd-src/src/gdfx.h
    @@ -5,37 +5,8 @@ extern "C" {
     #ifndef GDFX_H
     #define GDFX_H 1
     
    -/* im MUST be square, but can have any size. Returns a new image
    -	of width and height radius * 2, in which the X axis of
    -	the original has been remapped to theta (angle) and the Y axis
    -	of the original has been remapped to rho (distance from center).
    -	This is known as a "polar coordinate transform." */
    -
     BGD_DECLARE(gdImagePtr) gdImageSquareToCircle(gdImagePtr im, int radius);
     
    -/* Draws the text 'top' and 'bottom' on 'im', curved along the
    -	edge of a circle of radius 'radius', with its
    -	center at 'cx' and 'cy'. 'top' is written clockwise
    -	along the top; 'bottom' is written counterclockwise
    -	along the bottom. 'textRadius' determines the 'height'
    -	of each character; if 'textRadius' is 1/2 of 'radius',
    -	characters extend halfway from the edge to the center.
    -	'fillPortion' varies from 0 to 1.0, with useful values
    -	from about 0.4 to 0.9, and determines how much of the
    -	180 degrees of arc assigned to each section of text
    -	is actually occupied by text; 0.9 looks better than
    -	1.0 which is rather crowded. 'font' is a freetype
    -	font; see gdImageStringFT. 'points' is passed to the
    -	freetype engine and has an effect on hinting; although
    -	the size of the text is determined by radius, textRadius,
    -	and fillPortion, you should pass a point size that
    -	'hints' appropriately -- if you know the text will be
    -	large, pass a large point size such as 24.0 to get the
    -	best results. 'fgcolor' can be any color, and may have
    -	an alpha component, do blending, etc.
    -
    -	Returns 0 on success, or an error string. */
    -
     BGD_DECLARE(char *) gdImageStringFTCircle(
         gdImagePtr im,
         int cx,
    @@ -49,18 +20,6 @@ BGD_DECLARE(char *) gdImageStringFTCircle(
         char *bottom,
         int fgcolor);
     
    -/* 2.0.16:
    - * Sharpen function added on 2003-11-19
    - * by Paul Troughton (paul<dot>troughton<at>ieee<dot>org)
    - * Simple 3x3 convolution kernel
    - * Makes use of seperability
    - * Faster, but less flexible, than full-blown unsharp masking
    - * pct is sharpening percentage, and can be greater than 100
    - * Silently does nothing to non-truecolor images
    - * Silently does nothing for pct<0, as not a useful blurring function
    - * Leaves transparency/alpha-channel untouched
    - */
    -
     BGD_DECLARE(void) gdImageSharpen (gdImagePtr im, int pct);
     
     #endif /* GDFX_H */
    diff --git a/Build/source/libs/gd/libgd-src/src/gdhelpers.c b/Build/source/libs/gd/libgd-src/src/gdhelpers.c
    index c371e78fa5b..20fff5c0356 100644
    --- a/Build/source/libs/gd/libgd-src/src/gdhelpers.c
    +++ b/Build/source/libs/gd/libgd-src/src/gdhelpers.c
    @@ -91,7 +91,24 @@ gdReallocEx (void *ptr, size_t size)
     }
     
     /*
    -	Function: gdFree
    +  Function: gdFree
    +
    +    Frees memory that has been allocated by libgd functions.
    +
    +	Unless more specialized functions exists (for instance, <gdImageDestroy>),
    +	all memory that has been allocated by public libgd functions has to be
    +	freed by calling <gdFree>, and not by free(3), because libgd internally
    +	doesn't use alloc(3) and friends but rather its own allocation functions,
    +	which are, however, not publicly available.
    +
    +  Parameters:
    +
    +	ptr - Pointer to the memory space to free. If it is NULL, no operation is
    +		  performed.
    +
    +  Returns:
    +
    +	Nothing.
     */
     BGD_DECLARE(void) gdFree (void *ptr)
     {
    diff --git a/Build/source/libs/gd/libgd-src/src/gdxpm.c b/Build/source/libs/gd/libgd-src/src/gdxpm.c
    index 15603a6bd84..4ac84662380 100644
    --- a/Build/source/libs/gd/libgd-src/src/gdxpm.c
    +++ b/Build/source/libs/gd/libgd-src/src/gdxpm.c
    @@ -5,6 +5,14 @@
      * http://www.csn.ul.ie/~caolan
      */
     
    +
    +/**
    + * File: XPM Input
    + *
    + * Read XPM images.
    + */
    +
    +
     #ifdef HAVE_CONFIG_H
     #	include "config.h"
     #endif
    @@ -52,14 +60,17 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromXpm(char *filename)
         A pointer to the new image or NULL if an error occurred.
     
       Example:
    +    (start code)
    +
    +    gdImagePtr im;
    +    FILE *in;
    +    in = fopen("myxpm.xpm", "rb");
    +    im = gdImageCreateFromXpm(in);
    +    fclose(in);
    +    // ... Use the image ...
    +    gdImageDestroy(im);
     
    -    > gdImagePtr im;
    -    > FILE *in;
    -    > in = fopen("myxpm.xpm", "rb");
    -    > im = gdImageCreateFromXpm(in);
    -    > fclose(in);
    -    > // ... Use the image ...
    -    > gdImageDestroy(im);
    +    (end code)
     
     */
     BGD_DECLARE(gdImagePtr) gdImageCreateFromXpm(char *filename)
    diff --git a/Build/source/libs/gd/libgd-src/tests/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/CMakeLists.txt
    index 3c1402c57dc..7eef4bf46eb 100644
    --- a/Build/source/libs/gd/libgd-src/tests/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/CMakeLists.txt
    @@ -19,19 +19,26 @@ if (BUILD_TEST)
     
     	SET(TESTS_DIRS
     		bmp
    +		fontconfig
     		freetype
     		gd
     		gd2
     		gdimagearc
    +		gdimagebrightness
    +		gdimageclone
    +		gdimagecolor
     		gdimagecolorclosest
     		gdimagecolordeallocate
     		gdimagecolorexact
     		gdimagecolorreplace
     		gdimagecolorresolve
     		gdimagecolortransparent
    +		gdimagecontrast
    +		gdimageconvolution
     		gdimagecopy
     		gdimagecopyresampled
     		gdimagecopyrotated
    +		gdimagecreate
     		gdimagecrop
     		gdimagefile
     		gdimagefill
    @@ -41,7 +48,10 @@ if (BUILD_TEST)
     		gdimagefilledrectangle
     		gdimagefilltoborder
     		gdimagefilter
    +		gdimageflip
    +		gdimagegrayscale
     		gdimageline
    +		gdimagenegate
     		gdimageopenpolygon
     		gdimagepixelate
     		gdimagepolygon
    diff --git a/Build/source/libs/gd/libgd-src/tests/Makefile.am b/Build/source/libs/gd/libgd-src/tests/Makefile.am
    index afdcd5d6a0a..5f8b624bc1c 100644
    --- a/Build/source/libs/gd/libgd-src/tests/Makefile.am
    +++ b/Build/source/libs/gd/libgd-src/tests/Makefile.am
    @@ -4,6 +4,7 @@ libgdtest_a_SOURCES = \
     	gdtest/gdtest.c \
     	gdtest/gdtest.h \
     	gdhelpers.c
    +libgdtest_a_CPPFLAGS = $(AM_CPPFLAGS) -DGDTEST_TOP_DIR='"$(srcdir)"'
     
     # Setup vars that subdirs will increment.
     libgd_test_programs =
    @@ -13,19 +14,26 @@ EXTRA_DIST =
     TESTS =
     
     include bmp/Makemodule.am
    +include fontconfig/Makemodule.am
     include freetype/Makemodule.am
     include gd/Makemodule.am
     include gd2/Makemodule.am
     include gdimagearc/Makemodule.am
    +include gdimagebrightness/Makemodule.am
    +include gdimageclone/Makemodule.am
    +include gdimagecolor/Makemodule.am
     include gdimagecolorclosest/Makemodule.am
     include gdimagecolordeallocate/Makemodule.am
     include gdimagecolorexact/Makemodule.am
     include gdimagecolorreplace/Makemodule.am
     include gdimagecolorresolve/Makemodule.am
     include gdimagecolortransparent/Makemodule.am
    +include gdimagecontrast/Makemodule.am
    +include gdimageconvolution/Makemodule.am
     include gdimagecopy/Makemodule.am
     include gdimagecopyresampled/Makemodule.am
     include gdimagecopyrotated/Makemodule.am
    +include gdimagecreate/Makemodule.am
     include gdimagecrop/Makemodule.am
     include gdimagefile/Makemodule.am
     include gdimagefill/Makemodule.am
    @@ -35,7 +43,10 @@ include gdimagefilledpolygon/Makemodule.am
     include gdimagefilledrectangle/Makemodule.am
     include gdimagefilltoborder/Makemodule.am
     include gdimagefilter/Makemodule.am
    +include gdimageflip/Makemodule.am
    +include gdimagegrayscale/Makemodule.am
     include gdimageline/Makemodule.am
    +include gdimagenegate/Makemodule.am
     include gdimageopenpolygon/Makemodule.am
     include gdimagepixelate/Makemodule.am
     include gdimagepolygon/Makemodule.am
    @@ -63,7 +74,7 @@ include xbm/Makemodule.am
     include xpm/Makemodule.am
     
     LDADD = libgdtest.a ../src/libgd.la
    -AM_CPPFLAGS = -I$(top_srcdir)/src -I $(top_srcdir)/tests/gdtest
    +AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/tests/gdtest
     
     check_PROGRAMS = $(libgd_test_programs) $(libgd_helper_programs)
     TESTS += $(libgd_test_programs)
    diff --git a/Build/source/libs/gd/libgd-src/tests/bmp/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/bmp/CMakeLists.txt
    index 9c7800e9a67..a42629b8bcf 100644
    --- a/Build/source/libs/gd/libgd-src/tests/bmp/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/bmp/CMakeLists.txt
    @@ -1,6 +1,8 @@
     SET(TESTS_FILES
     	bmp_im2im
     	bmp_null
    +	bug00275
    +	bug00276
     )
     
     ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/bmp/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/bmp/Makemodule.am
    index 73be361bede..27dc7ecd00a 100644
    --- a/Build/source/libs/gd/libgd-src/tests/bmp/Makemodule.am
    +++ b/Build/source/libs/gd/libgd-src/tests/bmp/Makemodule.am
    @@ -1,5 +1,7 @@
     libgd_test_programs += \
    -	bmp/bmp_null
    +	bmp/bmp_null \
    +	bmp/bug00275 \
    +	bmp/bug00276
     
     if HAVE_LIBPNG
     libgd_test_programs += \
    diff --git a/Build/source/libs/gd/libgd-src/tests/bmp/bug00275.c b/Build/source/libs/gd/libgd-src/tests/bmp/bug00275.c
    new file mode 100644
    index 00000000000..710c084c877
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/bmp/bug00275.c
    @@ -0,0 +1,53 @@
    +/* See <https://github.com/libgd/libgd/issues/275>. */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +#ifdef __GNUC__
    +#define UNUSED __attribute__((unused))
    +#else
    +#define UNUSED
    +#endif
    +
    +
    +/* define callbacks for a non-seekable fake IO context */
    +
    +static void fakePutC(UNUSED gdIOCtx *ctx, UNUSED int c)
    +{
    +	// do nothing
    +}
    +
    +static int fakePutBuf(UNUSED gdIOCtx *ctx, UNUSED const void *data, int wanted)
    +{
    +	return wanted;
    +}
    +
    +
    +int main()
    +{
    +	gdImagePtr im;
    +	int white;
    +	gdIOCtx ctx;
    +
    +	/* initialize the fake IO context */
    +	ctx.getC = NULL;
    +	ctx.getBuf = NULL;
    +	ctx.putC = fakePutC;
    +	ctx.putBuf = fakePutBuf;
    +	ctx.seek = NULL;
    +	ctx.tell = NULL;
    +	ctx.gd_free = NULL;
    +
    +	/* create an image */
    +	im = gdImageCreate(10, 10);
    +	gdImageColorAllocate(im, 0, 0, 0);
    +	white = gdImageColorAllocate(im, 255, 255, 255);
    +	gdImageLine(im, 2,2, 7,7, white);
    +
    +	/* "save" the image as BMP */
    +	gdImageBmpCtx(im, &ctx, 2);
    +
    +	return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/bmp/bug00276.c b/Build/source/libs/gd/libgd-src/tests/bmp/bug00276.c
    new file mode 100644
    index 00000000000..58ca423b7ee
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/bmp/bug00276.c
    @@ -0,0 +1,32 @@
    +/* See <https://github.com/libgd/libgd/issues/276> */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +	gdImagePtr im_orig, im_saved;
    +	int white;
    +	void *data;
    +	int size;
    +
    +	/* create an image */
    +	im_orig = gdImageCreate(10, 10);
    +	gdImageColorAllocate(im_orig, 0, 0, 0);
    +	white = gdImageColorAllocate(im_orig, 255, 255, 255);
    +	gdImageLine(im_orig, 0,0, 9,9, white);
    +
    +	/* save the image, re-read it and compare it with the original */
    +	data = gdImageBmpPtr(im_orig, &size, 1);
    +	im_saved = gdImageCreateFromBmpPtr(size, data);
    +	gdTestAssert(im_saved != NULL);
    +	gdAssertImageEquals(im_orig, im_saved);
    +
    +	/* clean up */
    +	gdImageDestroy(im_orig);
    +	gdImageDestroy(im_saved);
    +
    +	return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/fontconfig/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/fontconfig/CMakeLists.txt
    new file mode 100644
    index 00000000000..159130dffb2
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/fontconfig/CMakeLists.txt
    @@ -0,0 +1,7 @@
    +IF(FREETYPE_FOUND AND FONTCONFIG_FOUND)
    +LIST(APPEND TESTS_FILES
    +    basic
    +)
    +ENDIF(FREETYPE_FOUND AND FONTCONFIG_FOUND)
    +
    +ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/fontconfig/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/fontconfig/Makemodule.am
    new file mode 100644
    index 00000000000..cbde85b4464
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/fontconfig/Makemodule.am
    @@ -0,0 +1,9 @@
    +if HAVE_LIBFONTCONFIG
    +if HAVE_LIBFREETYPE
    +libgd_test_programs += \
    +	fontconfig/basic
    +endif
    +endif
    +
    +EXTRA_DIST += \
    +	fontconfig/CMakeLists.txt
    diff --git a/Build/source/libs/gd/libgd-src/tests/fontconfig/basic.c b/Build/source/libs/gd/libgd-src/tests/fontconfig/basic.c
    new file mode 100644
    index 00000000000..71d24fb60a3
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/fontconfig/basic.c
    @@ -0,0 +1,33 @@
    +/**
    + * A most basic test for fontconfig support.
    + *
    + * Without actually using fontconfig, passing an empty fontlist to
    + * gdImageStringFT() would return an error ("Could not find/open font").
    + * We're checking that it returns NULL.
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr im;
    +    int black;
    +    char *error;
    +
    +    im = gdImageCreate(100, 100);
    +    gdTestAssert(im != NULL);
    +    gdImageColorAllocate(im, 255, 255, 255);
    +    black = gdImageColorAllocate(im, 0, 0, 0);
    +
    +    gdTestAssert(gdFTUseFontConfig(1));
    +    error = gdImageStringFT(im, NULL, black, "", 14.0, 0.0, 10, 20, "foo");
    +    gdTestAssertMsg(error == NULL, "%s", error);
    +
    +    gdImageDestroy(im);
    +    gdFontCacheShutdown();
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/freetype/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/freetype/CMakeLists.txt
    index 83bb18d754d..728c226c661 100644
    --- a/Build/source/libs/gd/libgd-src/tests/freetype/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/freetype/CMakeLists.txt
    @@ -1,6 +1,6 @@
     IF(FREETYPE_FOUND)
     SET(TESTS_FILES
    -#	bug00132
    +	bug00132
     )
     ENDIF(FREETYPE_FOUND)
     
    diff --git a/Build/source/libs/gd/libgd-src/tests/freetype/bug00132.c b/Build/source/libs/gd/libgd-src/tests/freetype/bug00132.c
    index 2c3d6bc8103..713dd2d023f 100644
    --- a/Build/source/libs/gd/libgd-src/tests/freetype/bug00132.c
    +++ b/Build/source/libs/gd/libgd-src/tests/freetype/bug00132.c
    @@ -34,5 +34,6 @@ int main()
     		}
     	}
     	gdImageDestroy(im);
    +	gdFontCacheShutdown();
     	return error;
     }
    diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gd2/CMakeLists.txt
    index 8aecacc7fd5..8c27babea2c 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gd2/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/gd2/CMakeLists.txt
    @@ -1,8 +1,12 @@
     SET(TESTS_FILES
    +	bug_289
    +	bug00309
    +	bug00354
     	gd2_empty_file
     	gd2_im2im
     	gd2_null
     	php_bug_72339
    +	too_few_image_data
     )
     
     ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gd2/Makemodule.am
    index 4c0199039eb..add4f34a76f 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gd2/Makemodule.am
    +++ b/Build/source/libs/gd/libgd-src/tests/gd2/Makemodule.am
    @@ -1,7 +1,11 @@
     libgd_test_programs += \
    +	gd2/bug_289 \
    +	gd2/bug00309 \
    +	gd2/bug00354 \
     	gd2/gd2_empty_file \
     	gd2/php_bug_72339 \
    -	gd2/gd2_read_corrupt
    +	gd2/gd2_read_corrupt \
    +	gd2/too_few_image_data
     
     if HAVE_LIBZ
     libgd_test_programs += \
    @@ -16,10 +20,12 @@ endif
     
     EXTRA_DIST += \
     	gd2/CMakeLists.txt \
    +	gd2/bug00354a.gd2 \
    +	gd2/bug00354b.gd2 \
     	gd2/conv_gd2_exp.gd2 \
     	gd2/conv_test.gd2 \
     	gd2/conv_test_exp.png \
     	gd2/empty.gd2 \
     	gd2/invalid_header.gd2 \
     	gd2/invalid_neg_size.gd2 \
    -	gd2/php_bug_72339_exp.gd2
    +	gd2/too_few_image_data.gd2
    diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug00309.c b/Build/source/libs/gd/libgd-src/tests/gd2/bug00309.c
    new file mode 100644
    index 00000000000..b649cdc2d63
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gd2/bug00309.c
    @@ -0,0 +1,37 @@
    +/**
    + * Regression test for <https://github.com/libgd/libgd/issues/309>.
    + *
    + * We test that an image with 64x64 pixels reports only a single chunk in the
    + * GD2 image header when the chunk size is 64.
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr im;
    +    unsigned char *buf;
    +    int size, word;
    +
    +    im = gdImageCreate(64, 64);
    +    gdImageColorAllocate(im, 0, 0, 0);
    +
    +    buf = gdImageGd2Ptr(im, 64, 1, &size);
    +
    +    gdImageDestroy(im);
    +
    +    word = buf[10] << 8 | buf[11];
    +    gdTestAssertMsg(word == 64, "chunk size is %d, but expected 64\n", word);
    +    word = buf[14] << 8 | buf[15];
    +    gdTestAssertMsg(word == 1, "x chunk count is %d, but expected 1\n", word);
    +    word = buf[16] << 8 | buf[17];
    +    gdTestAssertMsg(word == 1, "y chunk count is %d, but expected 1\n", word);
    +    gdTestAssertMsg(size == 5145, "file size is %d, but expected 5145\n", size);
    +
    +    gdFree(buf);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug00354.c b/Build/source/libs/gd/libgd-src/tests/gd2/bug00354.c
    new file mode 100644
    index 00000000000..8dc27cc5ad0
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gd2/bug00354.c
    @@ -0,0 +1,32 @@
    +/**
    + * We're testing GD2 image files which report illegal chunk counts. These should
    + * not cause integer overflows or other issues, but instead simply fail to be
    + * loaded.
    + *
    + * See also <https://github.com/libgd/libgd/issues/354>.
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr im;
    +    FILE *fp;
    +
    +    fp = gdTestFileOpen2("gd2", "bug00354a.gd2");
    +    gdTestAssert(fp != NULL);
    +    im = gdImageCreateFromGd2(fp);
    +    gdTestAssert(im == NULL);
    +    fclose(fp);
    +
    +    fp = gdTestFileOpen2("gd2", "bug00354b.gd2");
    +    gdTestAssert(fp != NULL);
    +    im = gdImageCreateFromGd2(fp);
    +    gdTestAssert(im == NULL);
    +    fclose(fp);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug00354a.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/bug00354a.gd2
    new file mode 100644
    index 00000000000..5060bfde3aa
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gd2/bug00354a.gd2 differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug00354b.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/bug00354b.gd2
    new file mode 100644
    index 00000000000..8600126becb
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gd2/bug00354b.gd2 differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug_289.c b/Build/source/libs/gd/libgd-src/tests/gd2/bug_289.c
    new file mode 100644
    index 00000000000..ad311e93ebc
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gd2/bug_289.c
    @@ -0,0 +1,33 @@
    +/**
    + * Passing an unrecognized format to gdImageGd2() should result in
    + * GD2_FMT_TRUECOLOR_COMPRESSED for truecolor images.
    + *
    + * See <https://github.com/libgd/libgd/issues/289>.
    + */
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +#define GD2_FMT_UNRECOGNIZED 0
    +#define GD2_FMT_TRUECOLOR_COMPRESSED 4
    +
    +#define MSG "expected %s byte to be %d, but got %d\n"
    +
    +
    +int main()
    +{
    +    gdImagePtr im;
    +    char *buffer;
    +    int size;
    +
    +    im = gdImageCreateTrueColor(10, 10);
    +    gdTestAssert(im != NULL);
    +    buffer = (char *) gdImageGd2Ptr(im, 128, GD2_FMT_UNRECOGNIZED, &size);
    +    gdTestAssert(buffer != NULL);
    +    gdImageDestroy(im);
    +    gdTestAssertMsg(buffer[12] == 0, MSG, "1st", 0, buffer[12]);
    +    gdTestAssertMsg(buffer[13] == GD2_FMT_TRUECOLOR_COMPRESSED, MSG, "2nd", GD2_FMT_TRUECOLOR_COMPRESSED, buffer[13]);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/php_bug_72339.c b/Build/source/libs/gd/libgd-src/tests/gd2/php_bug_72339.c
    index e15383e8c75..7ce60289ef8 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gd2/php_bug_72339.c
    +++ b/Build/source/libs/gd/libgd-src/tests/gd2/php_bug_72339.c
    @@ -8,14 +8,29 @@ int main()
     {
     	gdImagePtr im;
     	FILE *fp;
    -	
    -	fp = gdTestFileOpen2("gd2", "php_bug_72339_exp.gd2");
    -	im = gdImageCreateFromGd2(fp);
    -	if (im == NULL) {
    -		return 0;
    -	} else {
    -		gdTestErrorMsg("Image should have failed to be loaded");
    -		return 1;
    +	int i;
    +	const char header[] = {
    +		0x00, 0x02,
    +		0x00, 0x01,
    +		0x00, 0x01,
    +		0x00, 0x40,
    +		0x00, 0x02,
    +		0x54, 0xA0,
    +		0x5B, 0x00
    +	};
    +
    +	/* we're creating the test image dynamically, due to its size */
    +	fp = gdTestTempFp();
    +	fwrite(header, sizeof(header[0]), sizeof(header), fp);
    +	for (i = 0; i < 0x4000000; i++) {
    +		fputc(0x41, fp);
     	}
    +	rewind(fp);
    +
    +	im = gdImageCreateFromGd2(fp);
    +	fclose(fp);
    +	
    +	gdTestAssertMsg(im == NULL, "Image should have failed to be loaded\n");
     
    +	return gdNumFailures();
     }
    diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/php_bug_72339_exp.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/php_bug_72339_exp.gd2
    deleted file mode 100644
    index 39ed2270390..00000000000
    Binary files a/Build/source/libs/gd/libgd-src/tests/gd2/php_bug_72339_exp.gd2 and /dev/null differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.c b/Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.c
    new file mode 100644
    index 00000000000..3153a080078
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.c
    @@ -0,0 +1,22 @@
    +/*
    +too_few_image_data.gd2 claims to have a size of 12336x48 pixels, but doesn't
    +provide as much image data. We test that gdImageCreateFromGd2Ctx() returns NULL
    +in this case.
    +*/
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +int main()
    +{
    +    gdImagePtr im;
    +    FILE *fp;
    +
    +    fp = gdTestFileOpen2("gd2", "too_few_image_data.gd2");
    +    gdTestAssert(fp != NULL);
    +    im = gdImageCreateFromGd2(fp);
    +    gdTestAssert(im == NULL);
    +    fclose(fp);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.gd2
    new file mode 100644
    index 00000000000..1c797d1acfa
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.gd2 differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/CMakeLists.txt
    new file mode 100644
    index 00000000000..381c74d06e2
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/CMakeLists.txt
    @@ -0,0 +1,5 @@
    +LIST(APPEND TESTS_FILES
    +	basic
    +)
    +
    +ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/Makemodule.am
    new file mode 100644
    index 00000000000..142fd948484
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/Makemodule.am
    @@ -0,0 +1,10 @@
    +if HAVE_LIBPNG
    +libgd_test_programs += \
    +	gdimagebrightness/basic
    +endif
    +
    +EXTRA_DIST += \
    +	gdimagebrightness/CMakeLists.txt \
    +	gdimagebrightness/basic.png \
    +	gdimagebrightness/basic+100.png \
    +	gdimagebrightness/basic-100.png
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic+100.png b/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic+100.png
    new file mode 100644
    index 00000000000..5ed328916ff
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic+100.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic-100.png b/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic-100.png
    new file mode 100644
    index 00000000000..80c2997905d
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic-100.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic.c b/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic.c
    new file mode 100644
    index 00000000000..779704830f0
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic.c
    @@ -0,0 +1,41 @@
    +/**
    + * Basic test for gdImageBrightness()
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +static void test_brightness(int brightness);
    +
    +
    +int main()
    +{
    +    test_brightness(+100);
    +    test_brightness(-100);
    +
    +    return gdNumFailures();
    +}
    +
    +
    +static void test_brightness(int brightness)
    +{
    +    gdImagePtr im;
    +    FILE *fp;
    +    char basename[256];
    +    char *path;
    +
    +    fp = gdTestFileOpen2("gdimagebrightness", "basic.png");
    +    im = gdImageCreateFromPng(fp);
    +    fclose(fp);
    +
    +    gdImageBrightness(im, brightness);
    +
    +    sprintf(basename, "basic%+03d.png", brightness);
    +    path = gdTestFilePath2("gdimagebrightness", basename);
    +    gdAssertImageEqualsToFile(path, im);
    +    gdFree(path);
    +
    +    gdImageDestroy(im);
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic.png b/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic.png
    new file mode 100644
    index 00000000000..517010b42ff
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagebrightness/basic.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageclone/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimageclone/CMakeLists.txt
    new file mode 100644
    index 00000000000..e6ccc318a0f
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimageclone/CMakeLists.txt
    @@ -0,0 +1,5 @@
    +LIST(APPEND TESTS_FILES
    +	bug00300
    +)
    +
    +ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageclone/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimageclone/Makemodule.am
    new file mode 100644
    index 00000000000..4b1b54c0100
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimageclone/Makemodule.am
    @@ -0,0 +1,5 @@
    +libgd_test_programs += \
    +	gdimageclone/bug00300
    +
    +EXTRA_DIST += \
    +	gdimageclone/CMakeLists.txt
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageclone/bug00300.c b/Build/source/libs/gd/libgd-src/tests/gdimageclone/bug00300.c
    new file mode 100644
    index 00000000000..c5b7bde1724
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimageclone/bug00300.c
    @@ -0,0 +1,32 @@
    +/**
    + * Regression test for <https://github.com/libgd/libgd/issues/300>
    + *
    + * We're testing that the resolution does not change when cloning.
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr im, clone;
    +
    +    im = gdImageCreate(8, 8);
    +    gdImageSetResolution(im, 100, 50);
    +
    +    clone = gdImageClone(im);
    +
    +    gdTestAssertMsg(gdImageResolutionX(clone) == gdImageResolutionX(im),
    +                    "horizontal resolution doesn't match: expected %d, got %d\n",
    +                    gdImageResolutionX(im), gdImageResolutionX(clone));
    +    gdTestAssertMsg(gdImageResolutionY(clone) == gdImageResolutionY(im),
    +                    "vertical resolution doesn't match: expected %d, got %d\n",
    +                    gdImageResolutionY(im), gdImageResolutionY(clone));
    +
    +    gdImageDestroy(clone);
    +    gdImageDestroy(im);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecolor/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagecolor/CMakeLists.txt
    new file mode 100644
    index 00000000000..381c74d06e2
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagecolor/CMakeLists.txt
    @@ -0,0 +1,5 @@
    +LIST(APPEND TESTS_FILES
    +	basic
    +)
    +
    +ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecolor/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagecolor/Makemodule.am
    new file mode 100644
    index 00000000000..caf26a4d487
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagecolor/Makemodule.am
    @@ -0,0 +1,9 @@
    +if HAVE_LIBPNG
    +libgd_test_programs += \
    +	gdimagecolor/basic
    +endif
    +
    +EXTRA_DIST += \
    +	gdimagecolor/CMakeLists.txt \
    +	gdimagecolor/basic.png \
    +	gdimagecolor/basic_exp.png
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecolor/basic.c b/Build/source/libs/gd/libgd-src/tests/gdimagecolor/basic.c
    new file mode 100644
    index 00000000000..ff2fe349854
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagecolor/basic.c
    @@ -0,0 +1,29 @@
    +/**
    + * Basic test for gdImageColor()
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr im;
    +    FILE *fp;
    +    char *path;
    +
    +    fp = gdTestFileOpen2("gdimagecolor", "basic.png");
    +    im = gdImageCreateFromPng(fp);
    +    fclose(fp);
    +
    +    gdImageColor(im, 127, -127, -127, 0);
    +
    +    path = gdTestFilePath2("gdimagecolor", "basic_exp.png");
    +    gdAssertImageEqualsToFile(path, im);
    +    gdFree(path);
    +
    +    gdImageDestroy(im);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecolor/basic.png b/Build/source/libs/gd/libgd-src/tests/gdimagecolor/basic.png
    new file mode 100644
    index 00000000000..310f4ae89ed
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagecolor/basic.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecolor/basic_exp.png b/Build/source/libs/gd/libgd-src/tests/gdimagecolor/basic_exp.png
    new file mode 100644
    index 00000000000..0af32508bc6
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagecolor/basic_exp.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/CMakeLists.txt
    new file mode 100644
    index 00000000000..381c74d06e2
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/CMakeLists.txt
    @@ -0,0 +1,5 @@
    +LIST(APPEND TESTS_FILES
    +	basic
    +)
    +
    +ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/Makemodule.am
    new file mode 100644
    index 00000000000..635e2dc46a1
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/Makemodule.am
    @@ -0,0 +1,10 @@
    +if HAVE_LIBPNG
    +libgd_test_programs += \
    +	gdimagecontrast/basic
    +endif
    +
    +EXTRA_DIST += \
    +	gdimagecontrast/CMakeLists.txt \
    +	gdimagecontrast/basic.png \
    +	gdimagecontrast/basic+50.png \
    +	gdimagecontrast/basic-50.png
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic+50.png b/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic+50.png
    new file mode 100644
    index 00000000000..d2a85ed6249
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic+50.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic-50.png b/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic-50.png
    new file mode 100644
    index 00000000000..94151ecaff7
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic-50.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic.c b/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic.c
    new file mode 100644
    index 00000000000..66c17ab9fb9
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic.c
    @@ -0,0 +1,41 @@
    +/**
    + * Basic test for gdImageContrast()
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +static void test_contrast(double contrast);
    +
    +
    +int main()
    +{
    +    test_contrast(+50.0);
    +    test_contrast(-50.0);
    +
    +    return gdNumFailures();
    +}
    +
    +
    +static void test_contrast(double contrast)
    +{
    +    gdImagePtr im;
    +    FILE *fp;
    +    char basename[256];
    +    char *path;
    +
    +    fp = gdTestFileOpen2("gdimagecontrast", "basic.png");
    +    im = gdImageCreateFromPng(fp);
    +    fclose(fp);
    +
    +    gdImageContrast(im, contrast);
    +
    +    sprintf(basename, "basic%+03.0f.png", contrast);
    +    path = gdTestFilePath2("gdimagecontrast", basename);
    +    gdAssertImageEqualsToFile(path, im);
    +    gdFree(path);
    +
    +    gdImageDestroy(im);
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic.png b/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic.png
    new file mode 100644
    index 00000000000..517010b42ff
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagecontrast/basic.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/CMakeLists.txt
    new file mode 100644
    index 00000000000..381c74d06e2
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/CMakeLists.txt
    @@ -0,0 +1,5 @@
    +LIST(APPEND TESTS_FILES
    +	basic
    +)
    +
    +ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/Makemodule.am
    new file mode 100644
    index 00000000000..8f65b0f36e9
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/Makemodule.am
    @@ -0,0 +1,12 @@
    +if HAVE_LIBPNG
    +libgd_test_programs += \
    +	gdimageconvolution/basic
    +endif
    +
    +EXTRA_DIST += \
    +	gdimageconvolution/CMakeLists.txt \
    +	gdimageconvolution/basic.png \
    +	gdimageconvolution/basic_edge_detect_quick.png \
    +	gdimageconvolution/basic_emboss.png \
    +	gdimageconvolution/basic_mean_removal.png \
    +	gdimageconvolution/basic_smooth.png
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic.c b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic.c
    new file mode 100644
    index 00000000000..267a079d898
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic.c
    @@ -0,0 +1,62 @@
    +/**
    + * Basic test for gdImageConvolution() and related functions
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +static void test_convolution(void (*convolution_func)(gdImagePtr im), const char *expected)
    +{
    +    gdImagePtr im;
    +    FILE *fp;
    +    char *path;
    +
    +    fp = gdTestFileOpen2("gdimageconvolution", "basic.png");
    +    im = gdImageCreateFromPng(fp);
    +    fclose(fp);
    +
    +    convolution_func(im);
    +
    +    path = gdTestFilePath2("gdimageconvolution", expected);
    +    gdAssertImageEqualsToFile(path, im);
    +    gdFree(path);
    +
    +    gdImageDestroy(im);
    +}
    +
    +
    +static void test_edge_detect_quick(gdImagePtr im)
    +{
    +    gdImageEdgeDetectQuick(im);
    +}
    +
    +
    +static void test_smooth(gdImagePtr im)
    +{
    +    gdImageSmooth(im, 5);
    +}
    +
    +
    +static void test_emboss(gdImagePtr im)
    +{
    +    gdImageEmboss(im);
    +}
    +
    +
    +static void test_mean_removal(gdImagePtr im)
    +{
    +    gdImageMeanRemoval(im);
    +}
    +
    +
    +int main()
    +{
    +    test_convolution(&test_edge_detect_quick, "basic_edge_detect_quick.png");
    +    test_convolution(&test_smooth, "basic_smooth.png");
    +    test_convolution(&test_emboss, "basic_emboss.png");
    +    test_convolution(&test_mean_removal, "basic_mean_removal.png");
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic.png b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic.png
    new file mode 100644
    index 00000000000..2db78821ab8
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_edge_detect_quick.png b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_edge_detect_quick.png
    new file mode 100644
    index 00000000000..195a0fdcdf2
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_edge_detect_quick.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_emboss.png b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_emboss.png
    new file mode 100644
    index 00000000000..bafd88233f5
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_emboss.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_mean_removal.png b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_mean_removal.png
    new file mode 100644
    index 00000000000..e98a91ac821
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_mean_removal.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_smooth.png b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_smooth.png
    new file mode 100644
    index 00000000000..7907143fd63
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimageconvolution/basic_smooth.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecopyrotated/bug00020.c b/Build/source/libs/gd/libgd-src/tests/gdimagecopyrotated/bug00020.c
    index fe8dfdf451d..4933df00376 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagecopyrotated/bug00020.c
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagecopyrotated/bug00020.c
    @@ -7,7 +7,6 @@ int main()
     {
     	gdImagePtr im, im2;
     	int error = 0;
    -	char *path;
     
     	im = gdImageCreateTrueColor(width, width);
     	gdImageFilledRectangle(im, 0,0, width, width, 0xFF0000);
    @@ -18,13 +17,11 @@ int main()
     	im2 = gdImageCreateTrueColor(width, width);
     
     	gdImageCopyRotated(im2, im, width / 2, width / 2, 0,0, width, width, 60);
    -	path = gdTestFilePath2("gdimagecopyrotated", "bug00020_exp.png");
    -	if (!gdAssertImageEqualsToFile(path, im2)) {
    +	if (!gdAssertImageEqualsToFile("gdimagecopyrotated/bug00020_exp.png", im2)) {
     		error = 1;
     	}
     
     	gdImageDestroy(im2);
     	gdImageDestroy(im);
    -	free(path);
     	return error;
     }
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecreate/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagecreate/CMakeLists.txt
    new file mode 100644
    index 00000000000..905e79c52e2
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagecreate/CMakeLists.txt
    @@ -0,0 +1,5 @@
    +SET(TESTS_FILES
    +	bug00340
    +)
    +
    +ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecreate/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagecreate/Makemodule.am
    new file mode 100644
    index 00000000000..886608694af
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagecreate/Makemodule.am
    @@ -0,0 +1,5 @@
    +libgd_test_programs += \
    +	gdimagecreate/bug00340
    +
    +EXTRA_DIST += \
    +	gdimagecreate/CMakeLists.txt
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecreate/bug00340.c b/Build/source/libs/gd/libgd-src/tests/gdimagecreate/bug00340.c
    new file mode 100644
    index 00000000000..14129ab8660
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagecreate/bug00340.c
    @@ -0,0 +1,33 @@
    +/**
    + * Regression test for <https://github.com/libgd/libgd/issues/340>
    + *
    + * We're testing that trying to create an oversized image fails early,
    + * triggering an appropriate warning.
    + */
    +
    +
    +#include <string.h>
    +#include "gd.h"
    +#include "gd_errors.h"
    +#include "gdtest.h"
    +
    +
    +#define MSG "product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n"
    +
    +
    +void error_handler(int priority, const char *format, ...)
    +{
    +    gdTestAssert(priority == GD_WARNING);
    +    gdTestAssert(!strcmp(format, MSG));
    +}
    +
    +
    +int main()
    +{
    +    gdImagePtr im;
    +
    +    im = gdImageCreate(64970, 65111);
    +    gdTestAssert(im == NULL);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecrop/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagecrop/CMakeLists.txt
    index f7e4c7ef475..4b1e97e292c 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagecrop/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagecrop/CMakeLists.txt
    @@ -1,4 +1,5 @@
     SET(TESTS_FILES
    +	bug00297
     	php_bug_72494
     )
     
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecrop/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagecrop/Makemodule.am
    index 210888b5a70..fe73c1de929 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagecrop/Makemodule.am
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagecrop/Makemodule.am
    @@ -1,4 +1,5 @@
     libgd_test_programs += \
    +	gdimagecrop/bug00297 \
     	gdimagecrop/php_bug_72494
     
     EXTRA_DIST += \
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecrop/bug00297.c b/Build/source/libs/gd/libgd-src/tests/gdimagecrop/bug00297.c
    new file mode 100644
    index 00000000000..5ce99604468
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagecrop/bug00297.c
    @@ -0,0 +1,28 @@
    +/**
    + * Regression test for <https://github.com/libgd/libgd/issues/297>.
    + *
    + * We're testing that the result of gdImageCrop() is a palette image,
    + * if the source was also a palette image.
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr src, dst;
    +    gdRect rect = {0, 0, 8, 8};
    +
    +    src = gdImageCreate(8, 8);
    +    dst = gdImageCrop(src, &rect);
    +
    +    gdTestAssert(!gdImageTrueColor(src));
    +    gdTestAssert(!gdImageTrueColor(dst));
    +
    +    gdImageDestroy(dst);
    +    gdImageDestroy(src);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagefile/gdnametest.c b/Build/source/libs/gd/libgd-src/tests/gdimagefile/gdnametest.c
    index 40dbc30b9e3..66da484e821 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagefile/gdnametest.c
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagefile/gdnametest.c
    @@ -4,7 +4,6 @@
     
     #include "gd.h"
     #include "gdtest.h"
    -#include "test_config.h"
     
     #define WIDTH 60
     #define HEIGHT 50
    @@ -50,8 +49,8 @@ gdImagePtr mkcross() {
     void
     do_test() {
     
    -    gdTestAssertMsg(strchr("123",'2') != 0, "strchr() is not functional.\n",1);
    -    gdTestAssertMsg(strcasecmp("123abC","123Abc") == 0, "strcasecmp() is not functional.\n",1);
    +    gdTestAssertMsg(strchr("123",'2') != 0, "strchr() is not functional.\n");
    +    gdTestAssertMsg(strcasecmp("123abC","123Abc") == 0, "strcasecmp() is not functional.\n");
         
         int n;
         struct {
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/CMakeLists.txt
    index 1a2d3305f5e..190dad7f943 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/CMakeLists.txt
    @@ -5,6 +5,7 @@ SET(TESTS_FILES
     	gdimagefilledpolygon3
     	bug00100
     	php_bug_64641
    +	self_intersecting
     )
     
     ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/Makemodule.am
    index 7a2f6812bbf..03c48462b3d 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/Makemodule.am
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/Makemodule.am
    @@ -5,7 +5,8 @@ libgd_test_programs += \
     	gdimagefilledpolygon/gdimagefilledpolygon1 \
     	gdimagefilledpolygon/gdimagefilledpolygon2 \
     	gdimagefilledpolygon/gdimagefilledpolygon3 \
    -	gdimagefilledpolygon/php_bug_64641
    +	gdimagefilledpolygon/php_bug_64641 \
    +	gdimagefilledpolygon/self_intersecting
     endif
     
     EXTRA_DIST += \
    @@ -15,4 +16,5 @@ EXTRA_DIST += \
     	gdimagefilledpolygon/gdimagefilledpolygon1.png \
     	gdimagefilledpolygon/gdimagefilledpolygon2.png \
     	gdimagefilledpolygon/gdimagefilledpolygon3.png \
    -	gdimagefilledpolygon/php_bug_64641.png
    +	gdimagefilledpolygon/php_bug_64641.png \
    +	gdimagefilledpolygon/self_intersecting_exp.png
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/self_intersecting.c b/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/self_intersecting.c
    new file mode 100644
    index 00000000000..ebb1404984d
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/self_intersecting.c
    @@ -0,0 +1,31 @@
    +/**
    + * We're testing the filling behavior of self-intersecting polygons, which is
    + * *currently* using the even-odd fillrule.
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr im;
    +    int black;
    +    gdPoint points[] = {{50, 5}, {24, 86}, {93, 36}, {7, 36}, {76, 86}};
    +    char *path;
    +
    +    im = gdImageCreate(100, 100);
    +    gdImageColorAllocate(im, 255, 255, 255);
    +    black = gdImageColorAllocate(im, 0, 0, 0);
    +
    +    gdImageFilledPolygon(im, points, 5, black);
    +
    +    path = gdTestFilePath2("gdimagefilledpolygon", "self_intersecting_exp.png");
    +    gdAssertImageEqualsToFile(path, im);
    +    gdFree(path);
    +
    +    gdImageDestroy(im);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/self_intersecting_exp.png b/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/self_intersecting_exp.png
    new file mode 100644
    index 00000000000..907820ffe7f
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagefilledpolygon/self_intersecting_exp.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageflip/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimageflip/CMakeLists.txt
    new file mode 100644
    index 00000000000..39caf080fb3
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimageflip/CMakeLists.txt
    @@ -0,0 +1,5 @@
    +LIST(APPEND TESTS_FILES
    +	gdimageflip
    +)
    +
    +ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageflip/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimageflip/Makemodule.am
    new file mode 100644
    index 00000000000..e3a1f8ea527
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimageflip/Makemodule.am
    @@ -0,0 +1,11 @@
    +if HAVE_LIBPNG
    +libgd_test_programs += \
    +	gdimageflip/gdimageflip
    +endif
    +
    +EXTRA_DIST += \
    +	gdimageflip/CMakeLists.txt \
    +	gdimageflip/remi.png \
    +	gdimageflip/gdimageflipvertical_exp.png \
    +	gdimageflip/gdimagefliphorizontal_exp.png \
    +	gdimageflip/gdimageflipboth_exp.png
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimageflip.c b/Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimageflip.c
    new file mode 100644
    index 00000000000..e0a1a2ab3d7
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimageflip.c
    @@ -0,0 +1,37 @@
    +/**
    + * Testing the basic operation of the gdImageFlip*() functions
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +static void test_flip(void (*func)(gdImagePtr), const char *filename)
    +{
    +    gdImagePtr im;
    +    FILE *fp;
    +    char *path;
    +
    +    fp = gdTestFileOpen2("gdimageflip", "remi.png");
    +    im = gdImageCreateFromPng(fp);
    +    fclose(fp);
    +
    +    func(im);
    +
    +    path = gdTestFilePath2("gdimageflip", filename);
    +    gdAssertImageEqualsToFile(path, im);
    +    gdFree(path);
    +
    +    gdImageDestroy(im);
    +}
    +
    +
    +int main()
    +{
    +    test_flip(gdImageFlipVertical, "gdimageflipvertical_exp.png");
    +    test_flip(gdImageFlipHorizontal, "gdimagefliphorizontal_exp.png");
    +    test_flip(gdImageFlipBoth, "gdimageflipboth_exp.png");
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimageflipboth_exp.png b/Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimageflipboth_exp.png
    new file mode 100644
    index 00000000000..d9cb57681c8
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimageflipboth_exp.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimagefliphorizontal_exp.png b/Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimagefliphorizontal_exp.png
    new file mode 100644
    index 00000000000..5e7c7f9b717
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimagefliphorizontal_exp.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimageflipvertical_exp.png b/Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimageflipvertical_exp.png
    new file mode 100644
    index 00000000000..383516393c9
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimageflip/gdimageflipvertical_exp.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageflip/remi.png b/Build/source/libs/gd/libgd-src/tests/gdimageflip/remi.png
    new file mode 100644
    index 00000000000..2db78821ab8
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimageflip/remi.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/CMakeLists.txt
    new file mode 100644
    index 00000000000..381c74d06e2
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/CMakeLists.txt
    @@ -0,0 +1,5 @@
    +LIST(APPEND TESTS_FILES
    +	basic
    +)
    +
    +ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/Makemodule.am
    new file mode 100644
    index 00000000000..e715c5b4235
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/Makemodule.am
    @@ -0,0 +1,9 @@
    +if HAVE_LIBPNG
    +libgd_test_programs += \
    +	gdimagegrayscale/basic
    +endif
    +
    +EXTRA_DIST += \
    +	gdimagegrayscale/CMakeLists.txt \
    +	gdimagegrayscale/basic.png \
    +	gdimagegrayscale/basic_exp.png
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/basic.c b/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/basic.c
    new file mode 100644
    index 00000000000..40b4201944a
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/basic.c
    @@ -0,0 +1,29 @@
    +/**
    + * Basic test for gdImageGrayScale()
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr im;
    +    FILE *fp;
    +    char *path;
    +
    +    fp = gdTestFileOpen2("gdimagegrayscale", "basic.png");
    +    im = gdImageCreateFromPng(fp);
    +    fclose(fp);
    +
    +    gdImageGrayScale(im);
    +
    +    path = gdTestFilePath2("gdimagegrayscale", "basic_exp.png");
    +    gdAssertImageEqualsToFile(path, im);
    +    gdFree(path);
    +
    +    gdImageDestroy(im);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/basic.png b/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/basic.png
    new file mode 100644
    index 00000000000..517010b42ff
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/basic.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/basic_exp.png b/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/basic_exp.png
    new file mode 100644
    index 00000000000..310f4ae89ed
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagegrayscale/basic_exp.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimageline/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimageline/CMakeLists.txt
    index 61982517ede..a1658a61a04 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimageline/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimageline/CMakeLists.txt
    @@ -1,6 +1,8 @@
     SET(TESTS_FILES
     	gdimageline_aa
     	gdimageline_aa_outofrange
    +	gdImageAALine_thickness
    +	github_bug_167
     	bug00077
     	bug00072
     	bug00111
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagenegate/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagenegate/CMakeLists.txt
    new file mode 100644
    index 00000000000..381c74d06e2
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagenegate/CMakeLists.txt
    @@ -0,0 +1,5 @@
    +LIST(APPEND TESTS_FILES
    +	basic
    +)
    +
    +ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagenegate/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagenegate/Makemodule.am
    new file mode 100644
    index 00000000000..03b4dce1adb
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagenegate/Makemodule.am
    @@ -0,0 +1,9 @@
    +if HAVE_LIBPNG
    +libgd_test_programs += \
    +	gdimagenegate/basic
    +endif
    +
    +EXTRA_DIST += \
    +	gdimagenegate/CMakeLists.txt \
    +	gdimagenegate/basic.png \
    +	gdimagenegate/basic_exp.png
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagenegate/basic.c b/Build/source/libs/gd/libgd-src/tests/gdimagenegate/basic.c
    new file mode 100644
    index 00000000000..f8dafc8ea23
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagenegate/basic.c
    @@ -0,0 +1,29 @@
    +/**
    + * Basic test for gdImageNegate()
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr im;
    +    FILE *fp;
    +    char *path;
    +
    +    fp = gdTestFileOpen2("gdimagenegate", "basic.png");
    +    im = gdImageCreateFromPng(fp);
    +    fclose(fp);
    +
    +    gdImageNegate(im);
    +
    +    path = gdTestFilePath2("gdimagenegate", "basic_exp.png");
    +    gdAssertImageEqualsToFile(path, im);
    +    gdFree(path);
    +
    +    gdImageDestroy(im);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagenegate/basic.png b/Build/source/libs/gd/libgd-src/tests/gdimagenegate/basic.png
    new file mode 100644
    index 00000000000..517010b42ff
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagenegate/basic.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagenegate/basic_exp.png b/Build/source/libs/gd/libgd-src/tests/gdimagenegate/basic_exp.png
    new file mode 100644
    index 00000000000..2dc0484d018
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagenegate/basic_exp.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/CMakeLists.txt
    index 517864ed2ba..9008d86c77f 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/CMakeLists.txt
    @@ -1,7 +1,9 @@
     SET(TESTS_FILES
     	bug00003
     	bug00106_gdimagerectangle
    +	bug00299
     	github_bug_00172
    +	point_ordering
     )
     
     ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/Makemodule.am
    index 4175ca59873..ea9d52b9662 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/Makemodule.am
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/Makemodule.am
    @@ -1,7 +1,10 @@
     libgd_test_programs += \
     	gdimagerectangle/bug00003 \
     	gdimagerectangle/bug00106_gdimagerectangle \
    -	gdimagerectangle/github_bug_00172
    +	gdimagerectangle/bug00299 \
    +	gdimagerectangle/github_bug_00172 \
    +	gdimagerectangle/point_ordering
     
     EXTRA_DIST += \
    -	gdimagerectangle/CMakeLists.txt
    +	gdimagerectangle/CMakeLists.txt \
    +	gdimagerectangle/bug00299_exp.png
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00299.c b/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00299.c
    new file mode 100644
    index 00000000000..7e604cee941
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00299.c
    @@ -0,0 +1,32 @@
    +/**
    + * Regression test for <https://github.com/libgd/libgd/issues/299>
    + *
    + * We test that thick rectangles are drawn as desired.
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr im;
    +    int black;
    +
    +    im = gdImageCreate(70, 70);
    +    gdImageColorAllocate(im, 255, 255, 255);
    +    black = gdImageColorAllocate(im, 0, 0, 0);
    +    gdImageSetThickness(im, 4);
    +
    +    gdImageRectangle(im, 10,10, 50,50, black);
    +    gdImageRectangle(im, 10,60, 50,60, black);
    +    gdImageRectangle(im, 60,10, 60,50, black);
    +    gdImageRectangle(im, 60,60, 60,60, black);
    +
    +    gdAssertImageEqualsToFile("gdimagerectangle/bug00299_exp.png", im);
    +
    +    gdImageDestroy(im);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00299_exp.png b/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00299_exp.png
    new file mode 100644
    index 00000000000..6ebdba64d72
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00299_exp.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/point_ordering.c b/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/point_ordering.c
    new file mode 100644
    index 00000000000..b2ea4ed1735
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/point_ordering.c
    @@ -0,0 +1,76 @@
    +/**
    + * Test point ordering of gdImageRectangle()
    + *
    + * We're testing the two allowed point orders with and without thickness,
    + * and verify that all sides of the rectangle are drawn.
    + *
    + * See also <https://github.com/libgd/libgd/issues/177>
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +static void draw_and_check_rectangle(gdImagePtr im, int x1, int y1, int x2, int y2, int black, int red);
    +static void draw_and_check_pixel(gdImagePtr im, int x, int y, int black, int red);
    +
    +
    +int main()
    +{
    +    gdImagePtr im;
    +    int black, red;
    +
    +    im = gdImageCreate(110, 210);
    +    gdImageColorAllocate(im, 255, 255, 255);
    +    black = gdImageColorAllocate(im,   0,   0,   0);
    +    red   = gdImageColorAllocate(im, 255,   0,   0);
    +
    +    draw_and_check_rectangle(im,  10,  10,  50,  50, black, red);
    +    draw_and_check_rectangle(im,  50, 150,  10, 110, black, red);
    +    gdImageSetThickness(im, 4);
    +    draw_and_check_rectangle(im,  60,  10, 100,  50, black, red);
    +    draw_and_check_rectangle(im, 100, 150,  60, 110, black, red);
    +
    +#if 0
    +    /* save image for debugging purposes */
    +    do {
    +        char *path;
    +        FILE *fp;
    +
    +        path = gdTestFilePath2("gdimagerectangle", "point_ordering.png");
    +        fp = fopen(path, "wb");
    +        gdImagePng(im, fp);
    +        fclose(fp);
    +        gdFree(path);
    +    } while(0);
    +#endif
    +
    +    gdImageDestroy(im);
    +
    +    return gdNumFailures();
    +}
    +
    +
    +static void draw_and_check_rectangle(gdImagePtr im, int x1, int y1, int x2, int y2, int black, int red)
    +{
    +    int x, y;
    +
    +    gdImageRectangle(im, x1, y1, x2, y2, black);
    +    x = (x1 + x2) / 2;
    +    y = (y1 + y2) / 2;
    +    draw_and_check_pixel(im, x,  y1, black, red);
    +    draw_and_check_pixel(im, x1, y,  black, red);
    +    draw_and_check_pixel(im, x,  y2, black, red);
    +    draw_and_check_pixel(im, x2, y,  black, red);
    +}
    +
    +
    +static void draw_and_check_pixel(gdImagePtr im, int x, int y, int black, int red)
    +{
    +    int color;
    +
    +    color = gdImagePalettePixel(im, x, y);
    +    gdTestAssertMsg(color == black, "expected color %d, but got color %d\n", black, color);
    +    gdImageSetPixel(im, x, y, red);
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagerotate/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagerotate/CMakeLists.txt
    index fd8b4fa7b1b..ab8b4cfb7ca 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagerotate/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagerotate/CMakeLists.txt
    @@ -1,6 +1,7 @@
     SET(TESTS_FILES
     	bug00067
     	php_bug_64898
    +	php_bug_65070
     )
     
     ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagerotate/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagerotate/Makemodule.am
    index 696344bafb5..99b2398bb8a 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagerotate/Makemodule.am
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagerotate/Makemodule.am
    @@ -5,7 +5,8 @@ endif
     
     if HAVE_LIBPNG
     libgd_test_programs += \
    -	gdimagerotate/php_bug_64898
    +	gdimagerotate/php_bug_64898 \
    +	gdimagerotate/php_bug_65070
     endif
     
     EXTRA_DIST += \
    @@ -25,4 +26,6 @@ EXTRA_DIST += \
     	gdimagerotate/bug00067_180_exp.png \
     	gdimagerotate/php_bug_64898.png \
     	gdimagerotate/php_bug_64898_exp.png \
    +	gdimagerotate/php_bug_65070.gif \
    +	gdimagerotate/php_bug_65070_exp.png \
     	gdimagerotate/remirh128.png
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagerotate/php_bug_65070.c b/Build/source/libs/gd/libgd-src/tests/gdimagerotate/php_bug_65070.c
    new file mode 100644
    index 00000000000..0bf34a3d78e
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagerotate/php_bug_65070.c
    @@ -0,0 +1,35 @@
    +/**
    + * Regression test for <https://github.com/libgd/libgd/issues/319>
    + *
    + * We're testing that the rotated image actually has the requested background
    + * color.
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +	gdImagePtr src, dst;
    +	FILE *fp;
    +	int black;
    +	char *path;
    +
    +	fp = gdTestFileOpen2("gdimagerotate", "php_bug_65070.gif");
    +	src = gdImageCreateFromGif(fp);
    +	fclose(fp);
    +
    +	black = gdImageColorAllocateAlpha(src, 0, 0, 0, 0);
    +	dst = gdImageRotateInterpolated(src, 30.0, black);
    +
    +	path = gdTestFilePath2("gdimagerotate", "php_bug_65070_exp.png");
    +	gdAssertImageEqualsToFile(path, dst);
    +	gdFree(path);
    +
    +	gdImageDestroy(src);
    +	gdImageDestroy(dst);
    +
    +	return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagerotate/php_bug_65070.gif b/Build/source/libs/gd/libgd-src/tests/gdimagerotate/php_bug_65070.gif
    new file mode 100644
    index 00000000000..4c2fd1b36ea
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagerotate/php_bug_65070.gif differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagerotate/php_bug_65070_exp.png b/Build/source/libs/gd/libgd-src/tests/gdimagerotate/php_bug_65070_exp.png
    new file mode 100644
    index 00000000000..fba85f6f06f
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagerotate/php_bug_65070_exp.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagescale/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagescale/CMakeLists.txt
    index 91bd0150176..b1d9cf3d85d 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagescale/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagescale/CMakeLists.txt
    @@ -1,4 +1,6 @@
     SET(TESTS_FILES
    +	bug00329
    +	bug00330
     	github_bug_00218
     	bug_overflow_large_new_size
     )
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagescale/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagescale/Makemodule.am
    index 23b89241883..771030151df 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagescale/Makemodule.am
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagescale/Makemodule.am
    @@ -1,5 +1,7 @@
     
     libgd_test_programs += \
    +	gdimagescale/bug00329 \
    +	gdimagescale/bug00330 \
     	gdimagescale/github_bug_00218 \
     	gdimagescale/bug_overflow_large_new_size
     
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagescale/bug00329.c b/Build/source/libs/gd/libgd-src/tests/gdimagescale/bug00329.c
    new file mode 100644
    index 00000000000..bc505c12935
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagescale/bug00329.c
    @@ -0,0 +1,53 @@
    +/**
    + * Regression test for <https://github.com/libgd/libgd/issues/329>
    + *
    + * We're testing that for truecolor as well as palette images after
    + * GD_BILINEAR_FIXED scaling the corner pixels of the scaled image have the
    + * expected color.
    + */
    +
    +
    +#include <string.h>
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +static void test(const char *mode)
    +{
    +    gdImagePtr src, dst;
    +    int expected, actual;
    +
    +    if (strcmp(mode, "palette")) {
    +        src = gdImageCreateTrueColor(100, 100);
    +        expected = gdTrueColorAlpha(255, 255, 255, gdAlphaOpaque);
    +        gdImageFilledRectangle(src, 0,0, 99,99, expected);
    +    } else {
    +        src = gdImageCreate(100, 100);
    +        gdImageColorAllocate(src, 255, 255, 255);
    +        expected = gdImageGetTrueColorPixel(src, 49, 49);
    +    }
    +
    +    gdImageSetInterpolationMethod(src, GD_BILINEAR_FIXED);
    +    dst = gdImageScale(src, 200, 200);
    +
    +    actual = gdImageGetPixel(dst, 0, 0);
    +    gdTestAssertMsg(actual == expected, "%s: wrong color; expected %x, but got %x", mode, expected, actual);
    +    actual = gdImageGetPixel(dst, 0, 199);
    +    gdTestAssertMsg(actual == expected, "%s: wrong color; expected %x, but got %x", mode, expected, actual);
    +    actual = gdImageGetPixel(dst, 199, 199);
    +    gdTestAssertMsg(actual == expected, "%s: wrong color; expected %x, but got %x", mode, expected, actual);
    +    actual = gdImageGetPixel(dst, 199, 0);
    +    gdTestAssertMsg(actual == expected, "%s: wrong color; expected %x, but got %x", mode, expected, actual);
    +
    +    gdImageDestroy(src);
    +    gdImageDestroy(dst);
    +}
    +
    +
    +int main()
    +{
    +    test("palette");
    +    test("truecolor");
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagescale/bug00330.c b/Build/source/libs/gd/libgd-src/tests/gdimagescale/bug00330.c
    new file mode 100644
    index 00000000000..0c9d10c9139
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagescale/bug00330.c
    @@ -0,0 +1,32 @@
    +/**
    + * Regression test for <https://github.com/libgd/libgd/issues/330>.
    + *
    + * We're testing that after scaling a palette image, the center pixel actually
    + * has the expected color value.
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr src, dst;
    +    int color;
    +
    +    src = gdImageCreate(100, 100);
    +    gdImageColorAllocate(src, 255, 255, 255);
    +
    +    gdImageSetInterpolationMethod(src, GD_BILINEAR_FIXED);
    +    dst = gdImageScale(src, 200, 200);
    +
    +    color = gdImageGetPixel(dst, 99, 99);
    +    gdTestAssertMsg(color == 0xffffff,
    +                    "expected color ffffff, but got %x\n", color);
    +
    +    gdImageDestroy(src);
    +    gdImageDestroy(dst);
    +
    +    return 0;
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/CMakeLists.txt
    index 31ba4e418b9..f969cdf72d3 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/CMakeLists.txt
    @@ -1,4 +1,5 @@
     SET(TESTS_FILES
    +	alpha_blending
     	bug00186
     	gdeffectoverlay
     	gdeffectmultiply
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/Makemodule.am
    index 8722e9afdf0..0a574ad14b1 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/Makemodule.am
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/Makemodule.am
    @@ -1,7 +1,9 @@
     libgd_test_programs += \
    +	gdimagesetpixel/alpha_blending \
     	gdimagesetpixel/bug00186 \
     	gdimagesetpixel/gdeffectmultiply \
     	gdimagesetpixel/gdeffectoverlay
     
     EXTRA_DIST += \
    -	gdimagesetpixel/CMakeLists.txt
    +	gdimagesetpixel/CMakeLists.txt \
    +	gdimagesetpixel/alphablending_exp.png
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/alpha_blending.c b/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/alpha_blending.c
    new file mode 100644
    index 00000000000..9874df659d9
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/alpha_blending.c
    @@ -0,0 +1,54 @@
    +/**
    + * Testing all effects
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr im;
    +    int effects[] = {
    +        gdEffectReplace, gdEffectAlphaBlend, gdEffectNormal,
    +        gdEffectOverlay, gdEffectMultiply
    +    };
    +    int red[3], blue[3];
    +    int x, y, i, j;
    +    char *path;
    +
    +    red[0] = gdTrueColorAlpha(0, 0, 255, 127);
    +    red[1] = gdTrueColorAlpha(0, 0, 255, 63);
    +    red[2] = gdTrueColorAlpha(0, 0, 255, 0);
    +    blue[0] = gdTrueColorAlpha(255, 0, 0, 127);
    +    blue[1] = gdTrueColorAlpha(255, 0, 0, 63);
    +    blue[2] = gdTrueColorAlpha(255, 0, 0, 0);
    +
    +    im = gdImageCreateTrueColor(120, 180);
    +
    +    gdImageAlphaBlending(im, gdEffectReplace);
    +    for (j = 0; j < 3; j++) {
    +        y = 60 * j;
    +        gdImageFilledRectangle(im, 0,y, 119,y+59, red[j]);
    +    }
    +
    +    for (i = 0; i < 5; i++) {
    +        x = 20 * i;
    +        gdImageAlphaBlending(im, effects[i]);
    +        for (j = 0; j < 9; j++) {
    +            y = 20 * j;
    +            gdImageFilledRectangle(im, x+20,y, x+39,y+19, blue[j % 3]);
    +        }
    +    }
    +
    +    gdImageSaveAlpha(im, 1);
    +
    +    path = gdTestFilePath2("gdimagesetpixel", "alphablending_exp.png");
    +    gdAssertImageEqualsToFile(path, im);
    +    gdFree(path);
    +
    +    gdImageDestroy(im);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/alphablending_exp.png b/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/alphablending_exp.png
    new file mode 100644
    index 00000000000..39551530452
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagesetpixel/alphablending_exp.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagestringft/gdimagestringft_bbox.c b/Build/source/libs/gd/libgd-src/tests/gdimagestringft/gdimagestringft_bbox.c
    index bc2bdd0b791..0161ec8101c 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagestringft/gdimagestringft_bbox.c
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagestringft/gdimagestringft_bbox.c
    @@ -73,6 +73,7 @@ int main()
     	fclose(fp);
     done:
     	gdImageDestroy(im);
    +	gdFontCacheShutdown();
     	free(path);
     	return error;
     }
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagestringftex/gdimagestringftex_returnfontpathname.c b/Build/source/libs/gd/libgd-src/tests/gdimagestringftex/gdimagestringftex_returnfontpathname.c
    index fc135cd263f..23c094a2f39 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagestringftex/gdimagestringftex_returnfontpathname.c
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagestringftex/gdimagestringftex_returnfontpathname.c
    @@ -18,6 +18,7 @@ int main()
     		return 2;
     	}
     	gdFree(strex.fontpath);
    +	gdFontCacheShutdown();
     	free(path);
     	return 0;
     }
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/CMakeLists.txt
    index 606eb537270..b23d2a1b86a 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/CMakeLists.txt
    @@ -1,5 +1,12 @@
     SET(TESTS_FILES
    +	bug00307
     	php_bug_72512
     )
     
    +IF(JPEG_FOUND)
    +LIST(APPEND TESTS_FILES
    +	php_bug_67325
    +)
    +ENDIF(JPEG_FOUND)
    +
     ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/Makemodule.am
    index cd73f092b9b..31f03624f66 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/Makemodule.am
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/Makemodule.am
    @@ -1,6 +1,13 @@
     
     libgd_test_programs += \
    +	gdimagetruecolortopalette/bug00307 \
     	gdimagetruecolortopalette/php_bug_72512
     
    +if HAVE_LIBJPEG
    +libgd_test_programs += \
    +	gdimagetruecolortopalette/php_bug_67325
    +endif
    +
     EXTRA_DIST += \
    -	gdimagetruecolortopalette/CMakeLists.txt
    +	gdimagetruecolortopalette/CMakeLists.txt \
    +	gdimagetruecolortopalette/php_bug_67325.jpeg
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/bug00307.c b/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/bug00307.c
    new file mode 100644
    index 00000000000..a5c6a04b64f
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/bug00307.c
    @@ -0,0 +1,26 @@
    +/**
    + * Regression test for <https://github.com/libgd/libgd/issues/307>
    + *
    + * We're testing that an image that has been converted to palette with
    + * GD_QUANT_NEUQUANT has its trueColor flag unset.
    + */
    +
    + 
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +	gdImagePtr im;
    +
    +	im = gdImageCreateTrueColor(100, 100);
    +
    +	gdTestAssert(gdImageTrueColorToPaletteSetMethod(im, GD_QUANT_NEUQUANT, 0));
    +	gdImageTrueColorToPalette(im, 0, 256);
    +	gdTestAssert(!gdImageTrueColor(im));
    +
    +	gdImageDestroy(im);
    +
    +	return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/php_bug_67325.c b/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/php_bug_67325.c
    new file mode 100644
    index 00000000000..29eaf6d8716
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/php_bug_67325.c
    @@ -0,0 +1,38 @@
    +/**
    + * Regression test for <https://bugs.php.net/bug.php?id=67325>
    + *
    + * We convert a truecolor image to a palette image and check that no duplicated
    + * white colors are in the resulting palette.
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr im;
    +    FILE *fp;
    +    int i, white;
    +
    +    fp = gdTestFileOpen2("gdimagetruecolortopalette", "php_bug_67325.jpeg");
    +    gdTestAssert(fp != NULL);
    +    im = gdImageCreateFromJpeg(fp);
    +    gdTestAssert(im != NULL);
    +    gdTestAssert(!fclose(fp));
    +
    +    gdTestAssert(gdImageTrueColorToPalette(im, 0, 256));
    +
    +    white = 0;
    +    for (i = 0; i < im->colorsTotal; i++) {
    +        if (im->red[i] == 255 && im->green[i] == 255 && im->blue[i] == 255) {
    +            white++;
    +        }
    +    }
    +    gdTestAssertMsg(white <= 1, "At most one white color palette entry expected, got %d\n", white);
    +
    +    gdImageDestroy(im);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/php_bug_67325.jpeg b/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/php_bug_67325.jpeg
    new file mode 100644
    index 00000000000..82e8233a761
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/php_bug_67325.jpeg differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/php_bug_72512.c b/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/php_bug_72512.c
    index d022a94e5e7..3a2158f0ca9 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/php_bug_72512.c
    +++ b/Build/source/libs/gd/libgd-src/tests/gdimagetruecolortopalette/php_bug_72512.c
    @@ -12,7 +12,7 @@ int main()
     	im = gdImageCreateTrueColor(100, 100);
     
     	if (im == NULL) {
    -		gdTestErrorMsg("gdImageCreateTruecolor failed");
    +		gdTestErrorMsg("gdImageCreateTruecolor failed\n");
     		error = 1;
     		goto exit;
     	}
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdtest/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdtest/CMakeLists.txt
    index 5f89bc91b75..4b0526252ab 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdtest/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/gdtest/CMakeLists.txt
    @@ -1,4 +1,3 @@
    -SET(GDTEST_TOP_DIR "${GD_SOURCE_DIR}/tests")
    -CONFIGURE_FILE(test_config.h.cmake test_config.h ESCAPE_QUOTES)
    +add_definitions(-DGDTEST_TOP_DIR="${CMAKE_CURRENT_SOURCE_DIR}/..")
     add_library (gdTest STATIC gdtest.c)
     target_link_libraries(gdTest ${GD_LIB})
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdtest/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdtest/Makemodule.am
    index 5b4e39e6e6f..a68842e4925 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdtest/Makemodule.am
    +++ b/Build/source/libs/gd/libgd-src/tests/gdtest/Makemodule.am
    @@ -1,5 +1,4 @@
     # Note: Library is declared in tests/Makefile.am as it's used by all the tests.
     
     EXTRA_DIST += \
    -	gdtest/CMakeLists.txt \
    -	gdtest/test_config.h.cmake
    +	gdtest/CMakeLists.txt
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdtest/gdtest.c b/Build/source/libs/gd/libgd-src/tests/gdtest/gdtest.c
    index b26d0394a41..b0462fc42d7 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdtest/gdtest.c
    +++ b/Build/source/libs/gd/libgd-src/tests/gdtest/gdtest.c
    @@ -27,7 +27,6 @@
     #include "gd.h"
     
     #include "gdtest.h"
    -#include "test_config.h"
     
     /* max is already defined in windows/msvc */
     #ifndef max
    @@ -47,7 +46,7 @@ gdImagePtr gdTestImageFromPng(const char *filename)
     	FILE *fp;
     
     	/* If the path is relative, then assume it's in the tests/ dir. */
    -	if (filename[0] == '/' 
    +	if (filename[0] == '/' || filename[0] == '.'
     #ifdef _WIN32
     	|| filename[1] == ':'
     #endif
    @@ -590,7 +589,7 @@ int gdTestImageCompareToFile(const char* file, unsigned int line, const char* me
     	expected = gdTestImageFromPng(expected_file);
     
     	if (!expected) {
    -		_gdTestErrorMsg(file, line, "Cannot open PNG <%s>", expected_file);
    +		_gdTestErrorMsg(file, line, "Cannot open PNG <%s>\n", expected_file);
     		res = 0;
     	} else {
     		res = gdTestImageCompareToImage(file, line, message, expected, actual);
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdtest/gdtest.h b/Build/source/libs/gd/libgd-src/tests/gdtest/gdtest.h
    index fbf37bf4ff6..82d2feba305 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gdtest/gdtest.h
    +++ b/Build/source/libs/gd/libgd-src/tests/gdtest/gdtest.h
    @@ -2,7 +2,6 @@
     #define GD_TEST_H
     
     #include <stdarg.h>
    -#include "test_config.h"
     
     #define GDTEST_STRING_MAX 1024
     typedef struct CuTestImageResult CuTestImageResult;
    @@ -72,7 +71,7 @@ int _gdTestErrorMsg(const char* file, unsigned int line, const char* string, ...
     
     #define gdTestAssert(cond) _gdTestAssert(__FILE__, __LINE__, (cond))
     
    -#define gdTestAssertMsg(cond, message, ...) _gdTestAssertMsg(__FILE__, __LINE__, (cond),(message),__VA_ARGS__)
    +#define gdTestAssertMsg(cond, message, ...) _gdTestAssertMsg(__FILE__, __LINE__, (cond), (message), ## __VA_ARGS__)
     
     
     #define gdTestErrorMsg(...) _gdTestErrorMsg(__FILE__, __LINE__, __VA_ARGS__)
    diff --git a/Build/source/libs/gd/libgd-src/tests/gdtest/test_config.h.cmake b/Build/source/libs/gd/libgd-src/tests/gdtest/test_config.h.cmake
    deleted file mode 100644
    index 59d2f0cf7ed..00000000000
    --- a/Build/source/libs/gd/libgd-src/tests/gdtest/test_config.h.cmake
    +++ /dev/null
    @@ -1,4 +0,0 @@
    -/* Define the full path to the top src dir, required to get the path
    - * of each input data */
    -#cmakedefine GDTEST_TOP_DIR "@GDTEST_TOP_DIR@"
    -
    diff --git a/Build/source/libs/gd/libgd-src/tests/gif/bug00006.c b/Build/source/libs/gd/libgd-src/tests/gif/bug00006.c
    index f1a7fe86341..c80d3878e5b 100644
    --- a/Build/source/libs/gd/libgd-src/tests/gif/bug00006.c
    +++ b/Build/source/libs/gd/libgd-src/tests/gif/bug00006.c
    @@ -27,6 +27,10 @@ int main()
     		gdTestErrorMsg("Cannot open <%s> for writing\n", file);
     		return 1;
     	}
    +
    +	gdImageTrueColorToPaletteSetMethod(im, GD_QUANT_JQUANT, 0);
    +	gdImageTrueColorToPalette(im, 1, 256);
    +
     	gdImageGif(im,fp);
     	fclose(fp);
     
    diff --git a/Build/source/libs/gd/libgd-src/tests/test_config.h.in b/Build/source/libs/gd/libgd-src/tests/test_config.h.in
    deleted file mode 100644
    index f29f20a5d64..00000000000
    --- a/Build/source/libs/gd/libgd-src/tests/test_config.h.in
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -#ifndef GD_TEST_CONFIG_H
    -#define GD_TEST_CONFIG_H
    -
    -
    -/* Define the full path to the top src dir, required to get the path
    - * of each input data */
    -#define GDTEST_TOP_DIR "@srcdir@"
    -#endif
    -
    diff --git a/Build/source/libs/gd/libgd-src/tests/tga/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/tga/CMakeLists.txt
    index 695a812a401..af234971183 100644
    --- a/Build/source/libs/gd/libgd-src/tests/tga/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/tga/CMakeLists.txt
    @@ -5,6 +5,8 @@ SET(TESTS_FILES
     	bug00247a
     	bug00248
     	bug00248a
    +	heap_overflow
    +	tga_read
     )
     
     ADD_GD_TESTS()
    diff --git a/Build/source/libs/gd/libgd-src/tests/tga/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/tga/Makemodule.am
    index dff828fe395..ab08dbff2b9 100644
    --- a/Build/source/libs/gd/libgd-src/tests/tga/Makemodule.am
    +++ b/Build/source/libs/gd/libgd-src/tests/tga/Makemodule.am
    @@ -4,7 +4,9 @@ libgd_test_programs += \
     	tga/bug00247a \
     	tga/bug00248 \
     	tga/bug00248a \
    -	tga/tga_null
    +	tga/heap_overflow \
    +	tga/tga_null \
    +	tga/tga_read
     
     EXTRA_DIST += \
     	tga/CMakeLists.txt \
    @@ -12,4 +14,9 @@ EXTRA_DIST += \
     	tga/bug00247.tga \
     	tga/bug00247a.tga \
     	tga/bug00248.tga \
    -	tga/bug00248a.tga
    +	tga/bug00248a.tga \
    +	tga/heap_overflow_1.tga \
    +	tga/heap_overflow_2.tga \
    +	tga/tga_read_rgb.png \
    +	tga/tga_read_rgb.tga \
    +	tga/tga_read_rgb_rle.tga
    diff --git a/Build/source/libs/gd/libgd-src/tests/tga/heap_overflow.c b/Build/source/libs/gd/libgd-src/tests/tga/heap_overflow.c
    new file mode 100644
    index 00000000000..ddd4b63e953
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/tga/heap_overflow.c
    @@ -0,0 +1,59 @@
    +/**
    + * Test that crafted TGA files don't trigger OOB reads.
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +static void check_file(char *basename);
    +static size_t read_test_file(char **buffer, char *basename);
    +
    +
    +int main()
    +{
    +    check_file("heap_overflow_1.tga");
    +    check_file("heap_overflow_2.tga");
    +
    +    return gdNumFailures();
    +}
    +
    +
    +static void check_file(char *basename)
    +{
    +    gdImagePtr im;
    +    char *buffer;
    +    size_t size;
    +
    +    size = read_test_file(&buffer, basename);
    +    im = gdImageCreateFromTgaPtr(size, (void *) buffer);
    +    gdTestAssert(im == NULL);
    +    free(buffer);
    +}
    +
    +
    +static size_t read_test_file(char **buffer, char *basename)
    +{
    +    char *filename;
    +    FILE *fp;
    +    size_t exp_size, act_size;
    +
    +    filename = gdTestFilePath2("tga", basename);
    +    fp = fopen(filename, "rb");
    +    gdTestAssert(fp != NULL);
    +
    +	fseek(fp, 0, SEEK_END);
    +	exp_size = ftell(fp);
    +	fseek(fp, 0, SEEK_SET);
    +
    +    *buffer = malloc(exp_size);
    +    gdTestAssert(*buffer != NULL);
    +    act_size = fread(*buffer, sizeof(**buffer), exp_size, fp);
    +    gdTestAssert(act_size == exp_size);
    +
    +    fclose(fp);
    +    free(filename);
    +
    +    return act_size;
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/tga/heap_overflow_1.tga b/Build/source/libs/gd/libgd-src/tests/tga/heap_overflow_1.tga
    new file mode 100644
    index 00000000000..e9bc0ecb2a8
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/tga/heap_overflow_1.tga differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/tga/heap_overflow_2.tga b/Build/source/libs/gd/libgd-src/tests/tga/heap_overflow_2.tga
    new file mode 100644
    index 00000000000..2b681f2df89
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/tga/heap_overflow_2.tga differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/tga/tga_read.c b/Build/source/libs/gd/libgd-src/tests/tga/tga_read.c
    new file mode 100644
    index 00000000000..310b72f4cb6
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/tga/tga_read.c
    @@ -0,0 +1,40 @@
    +/**
    + * Basic test case for reading TGA files.
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +static void assert_equals(char *exp, char *orig);
    +
    +
    +int main()
    +{
    +    assert_equals("tga_read_rgb.png", "tga_read_rgb.tga");
    +    assert_equals("tga_read_rgb.png", "tga_read_rgb_rle.tga");
    +
    +    return gdNumFailures();
    +}
    +
    +
    +static void assert_equals(char *exp, char *orig)
    +{
    +    gdImagePtr im;
    +    FILE *fp;
    +    char *filename;
    +
    +    fp = gdTestFileOpen2("tga", orig);
    +    gdTestAssertMsg(fp != NULL, "can't open %s", orig);
    +
    +    im = gdImageCreateFromTga(fp);
    +    gdTestAssertMsg(im != NULL, "can't read %s", orig);
    +    fclose(fp);
    +
    +    filename = gdTestFilePath2("tga", exp);
    +    gdAssertImageEqualsToFile(filename, im);
    +    gdFree(filename);
    +
    +    gdImageDestroy(im);
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/tga/tga_read_rgb.png b/Build/source/libs/gd/libgd-src/tests/tga/tga_read_rgb.png
    new file mode 100644
    index 00000000000..bc468e3d927
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/tga/tga_read_rgb.png differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/tga/tga_read_rgb.tga b/Build/source/libs/gd/libgd-src/tests/tga/tga_read_rgb.tga
    new file mode 100644
    index 00000000000..5f11f5a080f
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/tga/tga_read_rgb.tga differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/tga/tga_read_rgb_rle.tga b/Build/source/libs/gd/libgd-src/tests/tga/tga_read_rgb_rle.tga
    new file mode 100644
    index 00000000000..ce845ad0c3d
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/tga/tga_read_rgb_rle.tga differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/tiff/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/tiff/CMakeLists.txt
    index 1f4f4c06f28..e5862ac126f 100644
    --- a/Build/source/libs/gd/libgd-src/tests/tiff/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/tiff/CMakeLists.txt
    @@ -1,6 +1,7 @@
     IF(TIFF_FOUND)
     SET(TESTS_FILES
     	tiff_im2im
    +	tiff_invalid_read
     	tiff_null
     	tiff_dpi
     )
    diff --git a/Build/source/libs/gd/libgd-src/tests/tiff/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/tiff/Makemodule.am
    index fd396990973..670434a7d32 100644
    --- a/Build/source/libs/gd/libgd-src/tests/tiff/Makemodule.am
    +++ b/Build/source/libs/gd/libgd-src/tests/tiff/Makemodule.am
    @@ -2,8 +2,12 @@ if HAVE_LIBTIFF
     libgd_test_programs += \
     	tiff/tiff_dpi \
     	tiff/tiff_im2im \
    +	tiff/tiff_invalid_read \
     	tiff/tiff_null
     endif
     
     EXTRA_DIST += \
    -	tiff/CMakeLists.txt
    +	tiff/CMakeLists.txt \
    +	tiff/tiff_invalid_read_1.tiff \
    +	tiff/tiff_invalid_read_2.tiff \
    +	tiff/tiff_invalid_read_3.tiff
    diff --git a/Build/source/libs/gd/libgd-src/tests/tiff/tiff_dpi.c b/Build/source/libs/gd/libgd-src/tests/tiff/tiff_dpi.c
    index 347abf179a9..d639839c420 100644
    --- a/Build/source/libs/gd/libgd-src/tests/tiff/tiff_dpi.c
    +++ b/Build/source/libs/gd/libgd-src/tests/tiff/tiff_dpi.c
    @@ -66,12 +66,12 @@ int main()
     
     	if (dst->res_x != res_x) {
     		status = 1;
    -		gdTestErrorMsg("mismatch in res_x (got %d, expected %d)", dst->res_x, res_x);
    +		gdTestErrorMsg("mismatch in res_x (got %d, expected %d)\n", dst->res_x, res_x);
     	}
     
     	if (dst->res_y != res_y) {
     		status = 1;
    -		gdTestErrorMsg("mismatch in res_y (got %d, expected %d)", dst->res_y, res_y);
    +		gdTestErrorMsg("mismatch in res_y (got %d, expected %d)\n", dst->res_y, res_y);
     	}
     
     	gdImageDestroy(dst);
    @@ -81,4 +81,4 @@ door0:
     	gdImageDestroy(src);
     	return status;
     }
    -#endif
    \ No newline at end of file
    +#endif
    diff --git a/Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read.c b/Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read.c
    new file mode 100644
    index 00000000000..bed538914b6
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read.c
    @@ -0,0 +1,61 @@
    +/*
    +We're testing that reading corrupt TIFF files doesn't cause any memory issues,
    +and that the operation gracefully fails (i.e. gdImageCreateFromTiffPtr() returns
    +NULL).
    +*/
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +static void check_file(char *basename);
    +static size_t read_test_file(char **buffer, char *basename);
    +
    +
    +int main()
    +{
    +    check_file("tiff_invalid_read_1.tiff");
    +    check_file("tiff_invalid_read_2.tiff");
    +    check_file("tiff_invalid_read_3.tiff");
    +
    +    return gdNumFailures();
    +}
    +
    +
    +static void check_file(char *basename)
    +{
    +    gdImagePtr im;
    +    char *buffer;
    +    size_t size;
    +
    +    size = read_test_file(&buffer, basename);
    +    im = gdImageCreateFromTiffPtr(size, (void *) buffer);
    +    gdTestAssert(im == NULL);
    +    free(buffer);
    +}
    +
    +
    +static size_t read_test_file(char **buffer, char *basename)
    +{
    +    char *filename;
    +    FILE *fp;
    +    size_t exp_size, act_size;
    +
    +    filename = gdTestFilePath2("tiff", basename);
    +    fp = fopen(filename, "rb");
    +    gdTestAssert(fp != NULL);
    +
    +	fseek(fp, 0, SEEK_END);
    +	exp_size = ftell(fp);
    +	fseek(fp, 0, SEEK_SET);
    +
    +    *buffer = malloc(exp_size);
    +    gdTestAssert(*buffer != NULL);
    +    act_size = fread(*buffer, sizeof(**buffer), exp_size, fp);
    +    gdTestAssert(act_size == exp_size);
    +
    +    fclose(fp);
    +    free(filename);
    +
    +    return act_size;
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read_1.tiff b/Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read_1.tiff
    new file mode 100644
    index 00000000000..b3877e337b3
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read_1.tiff differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read_2.tiff b/Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read_2.tiff
    new file mode 100644
    index 00000000000..f9967e54217
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read_2.tiff differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read_3.tiff b/Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read_3.tiff
    new file mode 100644
    index 00000000000..67ca2a7c6e1
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/tiff/tiff_invalid_read_3.tiff differ
    diff --git a/Build/source/libs/gd/libgd-src/tests/webp/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/webp/CMakeLists.txt
    index 32e2c1d8347..d2db95b9698 100644
    --- a/Build/source/libs/gd/libgd-src/tests/webp/CMakeLists.txt
    +++ b/Build/source/libs/gd/libgd-src/tests/webp/CMakeLists.txt
    @@ -1,6 +1,7 @@
     IF(WEBP_FOUND)
     SET(TESTS_FILES
     	bug00111
    +	bug_double_free
     )
     ENDIF(WEBP_FOUND)
     
    diff --git a/Build/source/libs/gd/libgd-src/tests/webp/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/webp/Makemodule.am
    index b03db6e239e..f01f9e672fc 100644
    --- a/Build/source/libs/gd/libgd-src/tests/webp/Makemodule.am
    +++ b/Build/source/libs/gd/libgd-src/tests/webp/Makemodule.am
    @@ -1,7 +1,9 @@
     if HAVE_LIBWEBP
     libgd_test_programs += \
    -	webp/bug00111
    +	webp/bug00111 \
    +	webp/bug_double_free
     endif
     
     EXTRA_DIST += \
    -	webp/CMakeLists.txt
    +	webp/CMakeLists.txt \
    +	webp/bug_double_free.jpg
    diff --git a/Build/source/libs/gd/libgd-src/tests/webp/bug_double_free.c b/Build/source/libs/gd/libgd-src/tests/webp/bug_double_free.c
    new file mode 100644
    index 00000000000..43eececfc19
    --- /dev/null
    +++ b/Build/source/libs/gd/libgd-src/tests/webp/bug_double_free.c
    @@ -0,0 +1,29 @@
    +/**
    + * Test that a too large image doesn't trigger an double-free when written
    + * to memory.
    + */
    +
    +
    +#include "gd.h"
    +#include "gdtest.h"
    +
    +
    +int main()
    +{
    +    gdImagePtr im1, im2;
    +    FILE *fp;
    +    int size;
    +
    +    fp = gdTestFileOpen2("webp", "bug_double_free.jpg");
    +    gdTestAssert(fp != NULL);
    +    im1 = gdImageCreateFromJpeg(fp);
    +    gdTestAssert(im1 != NULL);
    +    fclose(fp);
    +
    +    im2 = gdImageWebpPtr(im1, &size);
    +    gdTestAssert(im2 == NULL);
    +
    +    gdImageDestroy(im1);
    +
    +    return gdNumFailures();
    +}
    diff --git a/Build/source/libs/gd/libgd-src/tests/webp/bug_double_free.jpg b/Build/source/libs/gd/libgd-src/tests/webp/bug_double_free.jpg
    new file mode 100644
    index 00000000000..9b792fb4a7d
    Binary files /dev/null and b/Build/source/libs/gd/libgd-src/tests/webp/bug_double_free.jpg differ
    diff --git a/Build/source/libs/gd/libgd-src/windows/Makefile.vc b/Build/source/libs/gd/libgd-src/windows/Makefile.vc
    index afc0e3c753c..2c72877a25b 100644
    --- a/Build/source/libs/gd/libgd-src/windows/Makefile.vc
    +++ b/Build/source/libs/gd/libgd-src/windows/Makefile.vc
    @@ -41,6 +41,8 @@ BUILD_DIR=$(WITH_BUILD)
     
     GD_DLL=libgd.dll
     GD_LIB=libgd_a.lib
    +GD_CONFIG_H=$(LIBGD_SRC_DIR)\config.h
    +
     
     SDR=$(BUILD_DIR)^\
     TDR=$(BUILD_DIR)\tests^\
    @@ -124,25 +126,25 @@ CFLAGS= $(CFLAGS) \
     	   /DHAVE_LIBXPM=1\
            $(INCLUDES)
     
    -TEST_CFLAGS=$(CFLAGS) /FItest_config.h
    +TEST_CFLAGS=$(CFLAGS)
     TEST_LDFLAGS=$(LDFLAGS) $(SDR)readdir.obj $(SDR)gdtest.obj $(BUILD_DIR)\libgd.lib
    -TEST_CONFIG=tests\test_config.h
     TEST_LIST=$(TDR)testlist.txt
     TEST_MK=$(TDR)Maketests.vc
     
    -# generate test makefile from TESTS macro
    -# generate test makefile from TESTS macro
    +TEST_OBJS=$(TEST_EXES:tests=obj)
    +TEST_OBJS=$(TEST_OBJS:exe=obj)
    +
    +# create buil dir and test exe dir. test ext dir may not be called but easier like this
    +# so we can include the gentest file
     !IF [if not exist $(BUILD_DIR) mkdir $(BUILD_DIR)]
     !ENDIF
    +
     !IF [if not exist $(TDR) mkdir $(TDR)]
     !ENDIF
     
     !IF [$(MAKEDIR)\windows\gentest.bat tests $(BUILD_DIR) "$(TEST_CFLAGS)" "$(TEST_LDFLAGS)" $(CC) $(LD) "$(TEST_MK)" "$(TEST_LIST)"]
     !ENDIF
     
    -TEST_OBJS=$(TEST_EXES:tests=obj)
    -TEST_OBJS=$(TEST_OBJS:exe=obj)
    -
     # pseudotargets
     build_libs: make_dirs $(TARGETDLL) $(TARGETLIB)
     all: build_libs build_tests
    @@ -152,17 +154,46 @@ clean:
       @if exist $(SDR) rd $(SDR) /s /q
       @if exist $(TDR) rd $(TDR) /s /q
       @if exist $(BUILD_DIR)\*.exe del $(BUILD_DIR)\*.exe /q
    -  @if exist tests\test_config.h del tests\test_config.h /q
     
     # helpers
     
     make_dirs:
    -  @if not exist $(BUILD_DIR) mkdir $(BUILD_DIR)
    -  @if not exist $(SDR) mkdir $(SDR)
    -
    -run_tests:
    -  @cd $(TDR)
    -  @$(MAKEDIR)\windows\run_tests
    +	@if not exist $(BUILD_DIR) mkdir $(BUILD_DIR)
    +	@if not exist $(SDR) mkdir $(SDR)
    +	@echo #ifndef HAVE_FT2BUILD_H> $(GD_CONFIG_H)
    +	@echo #define HAVE_FT2BUILD_H>> $(GD_CONFIG_H)
    +	@echo #endif>> $(GD_CONFIG_H)
    +	@echo #ifndef HAVE_ICONV_H>> $(GD_CONFIG_H)
    +	@echo #define HAVE_ICONV_H>> $(GD_CONFIG_H)
    +	@echo #endif>> $(GD_CONFIG_H)
    +	@echo #ifndef HAVE_LIBFREETYPE>> $(GD_CONFIG_H)
    +	@echo #define HAVE_LIBFREETYPE>> $(GD_CONFIG_H)
    +	@echo #endif>> $(GD_CONFIG_H)
    +	@echo #ifndef HAVE_LIBJPEG>> $(GD_CONFIG_H)
    +	@echo #define HAVE_LIBJPEG>> $(GD_CONFIG_H)
    +	@echo #endif>> $(GD_CONFIG_H)
    +	@echo #ifndef HAVE_LIBPNG>> $(GD_CONFIG_H)
    +	@echo #define HAVE_LIBPNG>> $(GD_CONFIG_H)
    +	@echo #endif>> $(GD_CONFIG_H)
    +	@echo #ifndef HAVE_LIBWEBP>> $(GD_CONFIG_H)
    +	@echo #define HAVE_LIBWEBP>> $(GD_CONFIG_H)
    +	@echo #endif>> $(GD_CONFIG_H)
    +	@echo #ifndef HAVE_LIBZ>> $(GD_CONFIG_H)
    +	@echo #define HAVE_LIBZ>> $(GD_CONFIG_H)
    +	@echo #endif>> $(GD_CONFIG_H)
    +	@echo #ifndef HAVE_LIBXPM>> $(GD_CONFIG_H)
    +	@echo #define HAVE_LIBXPM>> $(GD_CONFIG_H)
    +	@echo #endif>> $(GD_CONFIG_H)
    +	@echo #ifndef HAVE_INTTYPES_H>> $(GD_CONFIG_H)
    +	@echo #define HAVE_INTTYPES_H>> $(GD_CONFIG_H)
    +	@echo #endif>> $(GD_CONFIG_H)
    +	@echo #ifndef HAVE_SYS_STAT_H>> $(GD_CONFIG_H)
    +	@echo #define HAVE_SYS_STAT_H>> $(GD_CONFIG_H)
    +	@echo #endif>> $(GD_CONFIG_H)	
    +
    +run_tests: pretest
    +	@cd $(TDR)
    +	@$(MAKEDIR)\windows\run_tests
     
     # libgd
     $(LIBGD_OBJ_DIR):
    @@ -195,23 +226,12 @@ all: $(LIBGD_OBJ_DIR) $(LIBGD_BIN_DIR) $(LIB_OBJS) $(STATICLIB)
     !INCLUDE $(TEST_MK)
     build_tests: $(TEST_LIST) $(SDR)readdir.obj $(SDR)gdtest.obj $(TEST_EXES)
     
    -$(SDR)gdtest.obj: $(TARGETDLL) $(TEST_CONFIG) tests\gdtest\gdtest.c
    -  @$(CC) $(CFLAGS) /c tests\gdtest\gdtest.c /Fo$(SDR)gdtest.obj
    +$(SDR)gdtest.obj: $(TARGETDLL) tests\gdtest\gdtest.c
    +  @$(CC) $(CFLAGS) /DGDTEST_TOP_DIR=\"$(MAKEDIR:\=\\)\\tests\" /c tests\gdtest\gdtest.c /Fo$(SDR)gdtest.obj
     
    -$(SDR)readdir.obj: $(TARGETDLL) $(TEST_CONFIG) tests\gdtest\readdir.c
    +$(SDR)readdir.obj: $(TARGETDLL) tests\gdtest\readdir.c
       @$(CC) $(CFLAGS) /c tests\gdtest\readdir.c /Fo$(SDR)readdir.obj
    -  
    -$(TEST_CONFIG):
    -  @echo #ifndef GD_TEST_CONFIG_H> tests\test_config.h
    -  @echo #define GD_TEST_CONFIG_H>> tests\test_config.h
    -  @echo #ifndef GDTEST_TOP_DIR>> tests\test_config.h
    -  @echo #define GDTEST_TOP_DIR "$(MAKEDIR:\=\\)\\tests">> tests\test_config.h
    -  @echo #endif>> tests\test_config.h
    -  @echo #ifndef _WIN32>> tests\test_config.h
    -  @echo #define snprintf _snprintf>> tests\test_config.h
    -  @echo #endif>> tests\test_config.h
    -  @echo #endif>> tests\test_config.h
    -
    -$(TEST_LIST): $(TARGETDLL)
    -  if not exist $(TDR) mkdir $(TDR)
    -  copy $(TARGETDLL) $(TDR)$(GD_DLL)
    \ No newline at end of file
    +
    +pretest: $(TARGETDLL)
    +	if not exist $(TDR) mkdir $(TDR)
    +	copy $(TARGETDLL) $(TDR)$(GD_DLL)
    \ No newline at end of file
    diff --git a/Build/source/libs/gd/version.ac b/Build/source/libs/gd/version.ac
    index b7e85ca4c09..e5c89ec45e8 100644
    --- a/Build/source/libs/gd/version.ac
    +++ b/Build/source/libs/gd/version.ac
    @@ -8,4 +8,4 @@ dnl
     dnl --------------------------------------------------------
     dnl
     dnl  m4-include this file to define the current gd version
    -m4_define([gd_version], [2.2.3])
    +m4_define([gd_version], [2.2.4])
    -- 
    cgit v1.2.3