clean up trailing whitespace/newlines

This is preparation for adding some linting checks for new commits from
people.  Shouldn't be any functional changes here (tests still pass!).
master
Mike Frysinger 2018-06-21 22:47:42 -04:00
parent aac77143dd
commit fd06f7f83c
102 changed files with 356 additions and 423 deletions

View File

@ -32,24 +32,24 @@ endif(BUILD_TEST)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra -O0") # will be added to CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug"
ENDIF(CMAKE_COMPILER_IS_GNUCC)
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/Bin
CACHE PATH
"Single Directory for all Libraries"
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/Bin
CACHE PATH
"Single Directory for all Libraries"
)
# --------- Setup the Executable output Directory -------------
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/Bin
CACHE PATH
"Single Directory for all Executables."
# --------- Setup the Executable output Directory -------------
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/Bin
CACHE PATH
"Single Directory for all Executables."
)
# --------- Setup the Executable output Directory -------------
SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/Bin
CACHE PATH
"Single Directory for all static libraries."
# --------- Setup the Executable output Directory -------------
SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/Bin
CACHE PATH
"Single Directory for all static libraries."
)
if (USE_EXT_GD)
@ -106,7 +106,7 @@ else (USE_EXT_GD)
if (ENABLE_PNG)
FIND_PACKAGE(PNG REQUIRED)
endif (ENABLE_PNG)
if (ENABLE_ICONV)
FIND_PACKAGE(ICONV REQUIRED)
endif (ENABLE_ICONV)
@ -167,7 +167,7 @@ else (USE_EXT_GD)
INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
SET(HAVE_LIBPNG 1)
ENDIF(PNG_FOUND)
IF(ICONV_FOUND)
INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR})
SET(HAVE_ICONV 1)
@ -302,4 +302,3 @@ set(CPACK_SOURCE_IGNORE_FILES
)
install(FILES ${top_level_DOCFILES} DESTINATION ${DOC_DIR})
INCLUDE(CPack)

View File

@ -18,7 +18,7 @@
* [Git Commit Messages](#git-commit-messages)
* [Coding standard](#coding-standard)
* [Documentation Styleguide](#documentation-styleguide)
## What should I know before I get started?
### Code of Conduct
@ -49,7 +49,7 @@ Before creating bug reports, please check [this list](#before-submitting-a-bug-r
#### How Do I Submit A (Good) Bug Report?
For security related bugs, github does not support private issues, that's why we have to handle security issues outside the issues tracker for now. Please drop a mail to [security@libg.org](mailto:security@libgd.org).
For security related bugs, github does not support private issues, that's why we have to handle security issues outside the issues tracker for now. Please drop a mail to [security@libg.org](mailto:security@libgd.org).
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined [which repository](#repositories) your bug is related to, create an issue on that repository and provide the following information.

View File

@ -70,4 +70,3 @@ 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.

12
NEWS
View File

@ -12,7 +12,7 @@ GD 2.0.36 (2007-11-xx)
(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
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)
@ -37,17 +37,17 @@ GD 2.0.36 (2007-11-xx)
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)
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
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
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
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)
@ -58,7 +58,7 @@ GD 2.0.35 (2007-06-21)
(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
87, Fixed segfault when an invalid color index is present in a GIF
image data, reported by Elliot <wccode at gmail dot com> (Pierre)
89, Possible integer overflow in gdImageCreateTrueColor (Pierre)
94, gdImageCreateXbm can crash if gdImageCreate fails (Pierre)

View File

@ -1,6 +1,6 @@
$! (c) Alexey Chupahin 18-APR-2006, 15-DEC-2007
$! OpenVMS 8.2 Alpha DEC 2000 model 300
$! OpenVMS 8.3 Itanium rx1620
$! OpenVMS 8.3 Itanium rx1620
$! GNU
$!
$!
@ -26,9 +26,9 @@ $ SHARED=32
$ENDIF
$DECC = F$SEARCH("SYS$SYSTEM:DECC$COMPILER.EXE") .NES. ""
$IF (DECC) THEN $WRITE SYS$OUTPUT "Compiler ... DEC C"
$IF (.NOT. DECC) THEN $WRITE SYS$OUTPUT "BAD compiler" GOTO EXIT
$IF (.NOT. DECC) THEN $WRITE SYS$OUTPUT "BAD compiler" GOTO EXIT
$MMS = F$SEARCH("SYS$SYSTEM:MMS.EXE") .NES. ""
$MMK = F$TYPE(MMK)
$MMK = F$TYPE(MMK)
$IF (MMS .OR. MMK.NES."") THEN GOTO TEST_LIBRARIES
$WRITE SYS$OUTPUT "Please install MMS from DECSET or MMK"
$! I cant find any make tool
@ -150,7 +150,7 @@ $ CC/OBJECT=TEST.OBJ/INCLUDE=(FREETYPE2) SYS$INPUT
int main(int argc, char *argv[])
{
#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR <= 1
#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR <= 1
printf("This version is too old. Please get newest\n");
printf("From fafner.dyndns.org/~alexey/libsdl/required.html\n");
exit(2);
@ -220,8 +220,8 @@ $ CC/OBJECT=TEST.OBJ/INCLUDE=(PNG,ZLIB) SYS$INPUT
n=png_access_version_number();
n3=n%100; n=n/100;
n2=n%100; n=n/100;
n1=n%100;
if ( (n1<=1)&&(n2<2) )
n1=n%100;
if ( (n1<=1)&&(n2<2) )
{ printf("checking version libPNG: %d.%d.%d\n",n1,n2,n3);
printf("This version is too old. Please get newest\n");
printf("From fafner.dyndns.org/~alexey/libsdl/public.html\n");
@ -252,7 +252,7 @@ $ LIBPNG_STATIC=0
$ HAVE_LIBPNG=0
$ GOTO NEXT2
$ ELSE
$ HAVE_LIBPNG=1
$ HAVE_LIBPNG=1
$ LIBPNG_STATIC=1
$ ENDIF
$ ELSE
@ -287,7 +287,7 @@ $ CC/OBJECT=TEST.OBJ/INCLUDE=(JPEG) SYS$INPUT
#include <stdlib.h>
#include <stdio.h>
#include <jpeglib.h>
#include <jversion.h>
#include <jversion.h>
int main()
{
printf("checking version jpeg: %s\n",JVERSION);
@ -805,7 +805,7 @@ $ THEN
$ IF (ZLIB_STATIC.EQ.0)
$ THEN
$ APP SYS$INPUT [.SRC]LIBGD.OPT
SYS$SHARE:LIBZSHR/SHARE
SYS$SHARE:LIBZSHR/SHARE
$ ELSE
$ APP SYS$INPUT [.SRC]LIBGD.OPT
ZLIB:LIBZ/LIB
@ -954,29 +954,29 @@ $ APP SYS$INPUT [.SRC]CONFIG.H
/* Define if <iconv.h> defines iconv_t. */
#define HAVE_ICONV_T_DEF 1
$ENDIF
$IF HAVE_TIFF.EQ.1
$ THEN
$IF HAVE_TIFF.EQ.1
$ THEN
$ APP SYS$INPUT [.SRC]CONFIG.H
#define HAVE_LIBTIFF 1
$ENDIF
$IF HAVE_LIBPNG.EQ.1
$ THEN
$IF HAVE_LIBPNG.EQ.1
$ THEN
$ APP SYS$INPUT [.SRC]CONFIG.H
#define HAVE_LIBPNG 1
$ENDIF
$IF HAVE_FREETYPE.EQ.1
$ THEN
$ THEN
$ APP SYS$INPUT [.SRC]CONFIG.H
#define HAVE_LIBFREETYPE 1
#define HAVE_FT2BUILD_H 1
$ENDIF
$IF HAVE_JPEG.EQ.1
$ THEN
$IF HAVE_JPEG.EQ.1
$ THEN
$ APP SYS$INPUT [.SRC]CONFIG.H
#define HAVE_LIBJPEG 1
$ENDIF
$IF HAVE_ZLIB.EQ.1
$ THEN
$IF HAVE_ZLIB.EQ.1
$ THEN
$ APP SYS$INPUT [.SRC]CONFIG.H
#define HAVE_LIBZ 1
$ENDIF
@ -994,7 +994,7 @@ $COP SYS$INPUT [.SRC]DESCRIP.MMS
# Alexey Chupahin elvis_75@mail.ru
# OpenVMS 7.3-1,8.2 DEC 2000 mod.300
# OpenVMS 8.3 HP rx1620
.FIRST
DEF LIBGD []

View File

@ -1,6 +1,6 @@
Dear OpenVMS user,
Installation process is identical to one in *nix* world and consist to
Installation process is identical to one in *nix* world and consist to
four simple steps:
1. Installing required libraries
2. Configuration
@ -18,7 +18,7 @@ four simple steps:
All may be found at OpenVMS libSDL porting project site
http://fafner.dyndns.org/~alexey/libsdl/required.html
Also, system should have MMS make utility from DEC or
Also, system should have MMS make utility from DEC or
free analogue MMK. And C compiler with runtime, of course. ;)
@ -27,14 +27,14 @@ free analogue MMK. And C compiler with runtime, of course. ;)
$@[.VMS]CONFIGURE
The script detects hardware,system and required libraries have been installed.
Compilation stage will be prepeared to create shared and static libraries.
Alpha,IA64 or VAX platform are supported. Optional argument "static"
Compilation stage will be prepeared to create shared and static libraries.
Alpha,IA64 or VAX platform are supported. Optional argument "static"
tells to configurator to make static libraries only:
$@[.VMS]CONFIGURE STATIC
CONFIGURE script checks your ZLIB, FREETYPE, JPEG, PNG libraries.
If it detects any troubles, you may get and install good and tested ones
CONFIGURE script checks your ZLIB, FREETYPE, JPEG, PNG libraries.
If it detects any troubles, you may get and install good and tested ones
from OpenVMS libSDL porting project site:
http://fafner.dyndns.org/~alexey/libsdl/required.html
@ -54,7 +54,7 @@ $@LIBGD$STARTUP
LIBGD and its utilites are ready to using.
Optionally you may insert this startup file into your LOGIN.COM
Optionally you may insert this startup file into your LOGIN.COM
to set libGD environment every time you login automatically.
To learn libGD please refer libGD official documentation.

View File

@ -69,16 +69,16 @@
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#
# * The names of Kitware, Inc., the Insight Consortium, or the names of
# any consortium members, or of any contributors, may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

View File

@ -7,16 +7,16 @@
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#
# * The names of Kitware, Inc., the Insight Consortium, or the names of
# any consortium members, or of any contributors, may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@ -39,7 +39,7 @@
# the AC_HEADER_DIRENT test programme rather than the CheckSymbolExists.cmake
# test programme which always fails since DIR tends to be typedef'd
# rather than #define'd.
#
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
@ -53,7 +53,7 @@ MACRO(CHECK_DIRSYMBOL_EXISTS FILES VARIABLE)
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
SET(MACRO_CHECK_DIRSYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_DIRSYMBOL_EXISTS_LIBS
SET(CHECK_DIRSYMBOL_EXISTS_LIBS
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ELSE(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_DIRSYMBOL_EXISTS_LIBS)
@ -79,7 +79,7 @@ MACRO(CHECK_DIRSYMBOL_EXISTS FILES VARIABLE)
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS
CMAKE_FLAGS
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_DIRSYMBOL_EXISTS_FLAGS}
"${CHECK_DIRSYMBOL_EXISTS_LIBS}"
"${CMAKE_DIRSYMBOL_EXISTS_INCLUDES}"
@ -87,7 +87,7 @@ MACRO(CHECK_DIRSYMBOL_EXISTS FILES VARIABLE)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for DIR in ${FILES} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol DIR")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
"Determining if the DIR symbol is defined as in AC_HEADER_DIRENT "
"passed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c:\n"
@ -95,7 +95,7 @@ MACRO(CHECK_DIRSYMBOL_EXISTS FILES VARIABLE)
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for DIR in ${FILES} - not found.")
SET(${VARIABLE} "" CACHE INTERNAL "Have symbol DIR")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Determining if the DIR symbol is defined as in AC_HEADER_DIRENT "
"failed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c:\n"

View File

@ -7,16 +7,16 @@
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#
# * The names of Kitware, Inc., the Insight Consortium, or the names of
# any consortium members, or of any contributors, may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@ -66,4 +66,3 @@ int main()
")
CHECK_CXX_SOURCE_COMPILES("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT})
ENDMACRO(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)

View File

@ -1,17 +1,17 @@
# Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org>
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
#
# 1. Redistributions of source code must retain the copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.

View File

@ -21,16 +21,16 @@
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#
# * The names of Kitware, Inc., the Insight Consortium, or the names of
# any consortium members, or of any contributors, may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

View File

@ -1,11 +1,11 @@
# - Try to find Iconv
# Once done this will define
#
# ICONV_FOUND - system has Iconv
# ICONV_INCLUDE_DIR - the Iconv include directory
# ICONV_LIBRARIES - Link these to use Iconv
# - Try to find Iconv
# Once done this will define
#
# ICONV_FOUND - system has Iconv
# ICONV_INCLUDE_DIR - the Iconv include directory
# ICONV_LIBRARIES - Link these to use Iconv
# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const
#
#
include(CheckCCompilerFlag)
include(CheckCSourceCompiles)
@ -14,13 +14,13 @@ IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
SET(ICONV_FIND_QUIETLY TRUE)
ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
FIND_PATH(ICONV_INCLUDE_DIR iconv.h HINTS /sw/include/ PATHS /opt/local)
FIND_PATH(ICONV_INCLUDE_DIR iconv.h HINTS /sw/include/ PATHS /opt/local)
FIND_LIBRARY(ICONV_LIBRARIES NAMES libiconv_a iconv libiconv c PATHS /opt/local)
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
SET(ICONV_FOUND TRUE)
ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
SET(ICONV_FOUND TRUE)
ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
@ -47,18 +47,18 @@ ENDIF(ICONV_FOUND)
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_LIBRARIES)
IF(ICONV_FOUND)
IF(NOT ICONV_FIND_QUIETLY)
MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}")
ENDIF(NOT ICONV_FIND_QUIETLY)
ELSE(ICONV_FOUND)
IF(Iconv_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Iconv")
ENDIF(Iconv_FIND_REQUIRED)
ENDIF(ICONV_FOUND)
IF(ICONV_FOUND)
IF(NOT ICONV_FIND_QUIETLY)
MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}")
ENDIF(NOT ICONV_FIND_QUIETLY)
ELSE(ICONV_FOUND)
IF(Iconv_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Iconv")
ENDIF(Iconv_FIND_REQUIRED)
ENDIF(ICONV_FOUND)
MARK_AS_ADVANCED(
ICONV_INCLUDE_DIR
ICONV_LIBRARIES
ICONV_SECOND_ARGUMENT_IS_CONST
)
)

View File

@ -16,16 +16,16 @@
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#
# * The names of Kitware, Inc., the Insight Consortium, or the names of
# any consortium members, or of any contributors, may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

View File

@ -25,16 +25,16 @@
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#
# * The names of Kitware, Inc., the Insight Consortium, or the names of
# any consortium members, or of any contributors, may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

View File

@ -85,16 +85,16 @@
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#
# * The names of Kitware, Inc., the Insight Consortium, or the names of
# any consortium members, or of any contributors, may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

View File

@ -17,16 +17,16 @@
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#
# * The names of Kitware, Inc., the Insight Consortium, or the names of
# any consortium members, or of any contributors, may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

View File

@ -17,16 +17,16 @@
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#
# * The names of Kitware, Inc., the Insight Consortium, or the names of
# any consortium members, or of any contributors, may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

View File

@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2006 Alan W. Irwin
*
* This file is part of PLplot.

View File

@ -19,11 +19,11 @@
# Check if ctype.h macros work on characters with the high bit set.
if(NOT DEFINED CMAKE_HIGH_BIT_CHARACTERS)
message(STATUS
message(STATUS
"Check for whether ctype.h macros work on characters with the\n"
" high bit set."
)
try_compile(CMAKE_HIGH_BIT_CHARACTERS
try_compile(CMAKE_HIGH_BIT_CHARACTERS
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/CMakeModules/TestForHighBitCharacters.c
OUTPUT_VARIABLE OUTPUT)

View File

@ -367,4 +367,3 @@ operates.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

View File

@ -25,7 +25,7 @@ export CMAKE_LIBRARY_PATH=/path/to/the/gd/lib
then call cmake using:
$ cmake -DUSE_EXT_GD=1 -DBUILD_TEST=1
$ cmake -DUSE_EXT_GD=1 -DBUILD_TEST=1
$ make
and finally:
@ -33,10 +33,10 @@ $ 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?
What to do if tests fail on your platform and you use the last GD release?
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
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
to run the tests using the source releases available at:

View File

@ -55,7 +55,7 @@ you can use the following command line options:
--with-xpm=DIR
Dto. for xpm library.
--with-tiff=DIR
Dto. for TIFF library.

View File

@ -55,4 +55,3 @@ sub unslurp {
or die "Error writing file '$filename'\n";
close ($fh);
}

View File

@ -62,14 +62,14 @@ program; it demonstrates additional features!)
> /* 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);
> black = gdImageColorAllocate(im, 0, 0, 0);
>
> /* Allocate the color white (red, green and blue all maximum). */
> white = gdImageColorAllocate(im, 255, 255, 255);
>
> 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);
> gdImageLine(im, 0, 0, 63, 63, white);
>
> /* Open a file for writing. "wb" means "write binary", important
> under MSDOS, harmless under Unix. */

View File

@ -27,22 +27,22 @@ Format: 1.52
# --------------------------------------------------------------------------
#
#
# Cut and paste the lines below to change the order in which your files
# appear on the menu. Don't worry about adding or removing files, Natural
# Docs will take care of that.
#
#
# You can further organize the menu by grouping the entries. Add a
# "Group: [name] {" line to start a group, and add a "}" to end it.
#
#
# You can add text and web links to the menu by adding "Text: [text]" and
# "Link: [name] ([URL])" lines, respectively.
#
#
# The formatting and comments are auto-generated, so don't worry about
# neatness when editing the file. Natural Docs will clean it up the next
# time it is run. When working with groups, just deal with the braces and
# forget about the indentation and comments.
#
#
# --------------------------------------------------------------------------
@ -106,4 +106,3 @@ Group: Index {
Macro Index: Macros
Type Index: Types
} # Group: Index

View File

@ -74,5 +74,3 @@ $(nd) --rebuild --rebuild-output --documented-only \
# And cleanup the temp files.
rm -rf Data tmp

View File

@ -49,4 +49,4 @@ int main(void)
fclose(out);
return 0;
}
}

View File

@ -56,4 +56,4 @@ int main (int argc, char *argv[]) {
gdImageDestroy(out);
return 0;
}
}

View File

@ -18,7 +18,7 @@ endif
ifndef LIBBASE
LIBBASE = ../..
endif
# All library code is statically linked to avoid problems with other lib NLMs.
# All library code is statically linked to avoid problems with other lib NLMs.
# Edit the path below to point to your libpng sources or set environment var.
ifndef LIBPNG
@ -135,7 +135,7 @@ NDK_ROOT = $(NDKBASE)/ndk
SDK_CLIB = $(NDK_ROOT)/nwsdk
SDK_LIBC = $(NDK_ROOT)/libc
INCLUDES = -I. -I$(LIBGD) -I$(LIBPNG) -I$(LIBJPEG) -I$(LIBFT2)/include -I$(ZLIBSDK)
INCLUDES = -I. -I$(LIBGD) -I$(LIBPNG) -I$(LIBJPEG) -I$(LIBFT2)/include -I$(ZLIBSDK)
ifeq ($(LIBARCH),LIBC)
INCLUDES += -I$(SDK_LIBC)/include
@ -549,5 +549,3 @@ help:
@echo $(DL)$(MAKE) test-cmds$(DL)
@echo $(DL)$(MAKE) patch$(DL)
@echo $(DL)===========================================================$(DL)

View File

@ -33,5 +33,3 @@ BEGIN {
print " " $0 ",";
}
}

View File

@ -24,5 +24,3 @@ BEGIN {
print "LIBGD_VERSION = " libgd_ver "";
print "LIBGD_VERSION_STR = " libgd_ver_str "";
}

View File

@ -23,5 +23,3 @@ void _NonAppStop()
printf("<Press any key to close screen> ");
getcharacter();
}

View File

@ -286,5 +286,3 @@ void DisposeThreadData
free(data);
}
}

View File

@ -21,7 +21,7 @@ INSTDIR = ../libgd-$(LIBGD_VERSION_STR)-bin-nw
endif
# Edit the vars below to change NLM target settings.
TARGETS = gddemo.nlm gdtest.nlm gdtestft.nlm gdtopng.nlm gdcmpgif.nlm
TARGETS = gddemo.nlm gdtest.nlm gdtestft.nlm gdtopng.nlm gdcmpgif.nlm
TARGETS += gd2time.nlm gd2togif.nlm gd2topng.nlm gd2copypal.nlm
TARGETS += gifanimtest.nlm giftogd2.nlm pngtogd2.nlm pngtogd.nlm webpng.nlm
TARGETS += annotate.nlm circletexttest.nlm fontsizetest.nlm fontwheeltest.nlm
@ -159,7 +159,7 @@ endif
.PHONY: all prebuild dist install clean
.PRECIOUS: $(OBJDIR)/%.o $(OBJDIR)/%.def $(OBJDIR)/%.xdc $(LTARGET) $(DTARGET)
all: prebuild $(TARGETS)
all: prebuild $(TARGETS)
prebuild: $(OBJDIR) $(OBJDIR)/version.inc
ifdef LSTATIC
@ -281,5 +281,3 @@ ifdef LSTATIC
endif
@echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
endif

View File

@ -1,25 +1,25 @@
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.
P41-RR02188 by the National Institutes of Health.
Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 by
Boutell.Com, Inc.
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
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 relating to gdft.c copyright 2001, 2002 John Ellson
(ellson@lucent.com).
Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
2008 Pierre-Alain Joye (pierre@libgd.org).
2008 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,
@ -35,19 +35,18 @@
provided that this notice is present in user-accessible supporting
documentation.
This does not affect your ownership of the derived work itself, and
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
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
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
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.

View File

@ -126,4 +126,3 @@ libgd_la_LDFLAGS = -version-info $(GDLIB_LT_CURRENT):$(GDLIB_LT_REVISION):$(GDLI
libgd_la_LIBADD = $(LTLIBICONV)
LDADD = libgd.la $(LIBICONV)

View File

@ -46,18 +46,18 @@ while (<>)
my ($tag, $value) = split / /, $_, 2;
die "Font is not fixed width\n"
if $tag eq 'SPACING' and not $value =~ /[CM]/i;
$currentchar = $value if $tag eq 'ENCODING';
$minchar = $currentchar if not defined $minchar
or $currentchar < $minchar;
$maxchar = $currentchar if not defined $maxchar
or $currentchar > $maxchar;
if ($tag eq 'ENDCHAR')
{
$gobitmap = 0;
my $bottom = $globaltop - $bottom[$currentchar];
if ($bottom > 0)
{ $data[$currentchar] = substr $data[$currentchar], 0, length($data[$currentchar]) - $bottom * $width; }
@ -80,7 +80,7 @@ while (<>)
{ $fontdef = $value; }
if ($tag eq 'COPYRIGHT' and not defined $copyright)
{ $copyright = $value; }
if ($tag eq 'BBX')
{
my ($tag, $wid, $hei, $left, $bottom) = split / /;
@ -100,7 +100,7 @@ while (<>)
$bits = substr $bits, 0, $width;
$data[$currentchar] .= $bits;
}
if ($tag eq 'BITMAP')
{
$gobitmap = 1;
@ -150,7 +150,7 @@ for (my $i = $minchar; $i <= $maxchar; $i++)
{
$data[$i] = '' unless defined $data[$i];
$data[$i] = '0' x ($width * $height - length $data[$i]) . $data[$i];
print FILEC "/* Char $i */\n";
for my $line (0 .. $height - 1)
{ print FILEC join ',', split(//, substr($data[$i], $line * $width, $width)), "\n"; }
@ -158,7 +158,7 @@ for (my $i = $minchar; $i <= $maxchar; $i++)
print FILEC "\n";
next;
for my $line (0 .. $height - 1)
{ print substr($data[$i], $line * $width, $width), "\n"; }
}
@ -202,4 +202,3 @@ extern gdFontPtr $gdname;
EOF
1;

View File

@ -11,7 +11,7 @@
<body>
<div class="navbar" align="center">&nbsp;<a href="http://www.w3.org/TR/REC-html40/sgml/framesetdtd.html">
previous</a> &nbsp; <a href="http://www.w3.org/TR/REC-html40/appendix/changes.html">next</a> &nbsp; <a href="http://www.w3.org/TR/REC-html40/cover.html#minitoc">contents</a> &nbsp; <a href="http://www.w3.org/TR/REC-html40/index/elements.html">
elements</a> &nbsp; <a href="http://www.w3.org/TR/REC-html40/index/attributes.html">attributes</a> &nbsp; <a href="http://www.w3.org/TR/REC-html40/index/list.html">index</a>
elements</a> &nbsp; <a href="http://www.w3.org/TR/REC-html40/index/attributes.html">attributes</a> &nbsp; <a href="http://www.w3.org/TR/REC-html40/index/list.html">index</a>
<hr></div>
@ -26,7 +26,7 @@ references in HTML 4</a></h1>
references</a></li>
<li><a class="tocxref" href="#h-24.2">Character entity references for ISO
8859-1 characters</a>
8859-1 characters</a>
<ol>
<li><a class="tocxref" href="#h-24.2.1">The list of characters</a></li>
@ -34,7 +34,7 @@ references</a></li>
</li>
<li><a class="tocxref" href="#h-24.3">Character entity references for symbols,
mathematical symbols, and Greek letters</a>
mathematical symbols, and Greek letters</a>
<ol>
<li><a class="tocxref" href="#h-24.3.1">The list of characters</a></li>
@ -42,7 +42,7 @@ mathematical symbols, and Greek letters</a>
</li>
<li><a class="tocxref" href="#h-24.4">Character entity references for
markup-significant and internationalization characters</a>
markup-significant and internationalization characters</a>
<ol>
<li><a class="tocxref" href="#h-24.4.1">The list of characters</a></li>
@ -55,7 +55,7 @@ markup-significant and internationalization characters</a>
A <a href="http://www.w3.org/TR/REC-html40/charset.html#entities">character entity reference</a> is an SGML
construct that references a character of the <a href="http://www.w3.org/TR/REC-html40/charset.html">document
character set.</a>
character set.</a>
<p>This version of HTML supports several sets of character entity
references:</p>
@ -345,7 +345,7 @@ occasional Greek letters used in technical and mathematical works.</em></p>
existing ISO 8879 entity names. ISO 10646 character numbers
are given for each character, in hex. CDATA values are decimal
conversions of the ISO 10646 values and refer to the document
character set. Names are ISO 10646 names.
character set. Names are ISO 10646 names.
--&gt;
@ -472,7 +472,7 @@ occasional Greek letters used in technical and mathematical works.</em></p>
&lt;!ENTITY uArr CDATA "&amp;#8657;" -- upwards double arrow, U+21D1 ISOamsa --&gt;
&lt;!ENTITY rArr CDATA "&amp;#8658;" -- rightwards double arrow,
U+21D2 ISOtech --&gt;
&lt;!-- ISO 10646 does not say this is the 'implies' character but does not have
&lt;!-- ISO 10646 does not say this is the 'implies' character but does not have
another character with this function so ?
rArr can be used for 'implies' as ISOtech suggests --&gt;
&lt;!ENTITY dArr CDATA "&amp;#8659;" -- downwards double arrow, U+21D3 ISOamsa --&gt;
@ -525,9 +525,9 @@ occasional Greek letters used in technical and mathematical works.</em></p>
U+2265 ISOtech --&gt;
&lt;!ENTITY sub CDATA "&amp;#8834;" -- subset of, U+2282 ISOtech --&gt;
&lt;!ENTITY sup CDATA "&amp;#8835;" -- superset of, U+2283 ISOtech --&gt;
&lt;!-- note that nsup, 'not a superset of, U+2283' is not covered by the Symbol
&lt;!-- note that nsup, 'not a superset of, U+2283' is not covered by the Symbol
font encoding and is not included. Should it be, for symmetry?
It is in ISOamsn --&gt;
It is in ISOamsn --&gt;
&lt;!ENTITY nsub CDATA "&amp;#8836;" -- not a subset of, U+2284 ISOamsn --&gt;
&lt;!ENTITY sube CDATA "&amp;#8838;" -- subset of or equal to, U+2286 ISOtech --&gt;
&lt;!ENTITY supe CDATA "&amp;#8839;" -- superset of or equal to,
@ -550,11 +550,11 @@ occasional Greek letters used in technical and mathematical works.</em></p>
&lt;!ENTITY rfloor CDATA "&amp;#8971;" -- right floor, U+230B ISOamsc --&gt;
&lt;!ENTITY lang CDATA "&amp;#9001;" -- left-pointing angle bracket = bra,
U+2329 ISOtech --&gt;
&lt;!-- lang is NOT the same character as U+003C 'less than'
&lt;!-- lang is NOT the same character as U+003C 'less than'
or U+2039 'single left-pointing angle quotation mark' --&gt;
&lt;!ENTITY rang CDATA "&amp;#9002;" -- right-pointing angle bracket = ket,
U+232A ISOtech --&gt;
&lt;!-- rang is NOT the same character as U+003E 'greater than'
&lt;!-- rang is NOT the same character as U+003E 'greater than'
or U+203A 'single right-pointing angle quotation mark' --&gt;
&lt;!-- Geometric Shapes --&gt;
@ -614,7 +614,7 @@ that contains the requisite glyphs.</p>
existing ISO 8879 entity names. ISO 10646 character numbers
are given for each character, in hex. CDATA values are decimal
conversions of the ISO 10646 values and refer to the document
character set. Names are ISO 10646 names.
character set. Names are ISO 10646 names.
--&gt;
@ -679,4 +679,4 @@ that contains the requisite glyphs.</p>
<div class="navbar" align="center">
<hr><a href="http://www.w3.org/TR/REC-html40/sgml/framesetdtd.html">previous</a> &nbsp; <a href="http://www.w3.org/TR/REC-html40/appendix/changes.html">next</a> &nbsp; <a href="http://www.w3.org/TR/REC-html40/cover.html#minitoc">
contents</a> &nbsp; <a href="http://www.w3.org/TR/REC-html40/index/elements.html">elements</a> &nbsp; <a href="http://www.w3.org/TR/REC-html40/index/attributes.html">attributes</a> &nbsp; <a href="http://www.w3.org/TR/REC-html40/index/list.html">index</a></div>
</body></html>
</body></html>

View File

@ -40,4 +40,3 @@ int main (int argc, char *argv[])
#endif /* HAVE_LIBPNG */
return 0;
}

View File

@ -177,7 +177,7 @@ BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y);
See Also:
<gdImageCreateTrueColor>
<gdImageCreateTrueColor>
*/
BGD_DECLARE(gdImagePtr) gdImageCreate (int sx, int sy)
@ -285,7 +285,7 @@ BGD_DECLARE(gdImagePtr) gdImageCreate (int sx, int sy)
See Also:
<gdImageCreateTrueColor>
<gdImageCreateTrueColor>
*/
BGD_DECLARE(gdImagePtr) gdImageCreateTrueColor (int sx, int sy)
@ -416,7 +416,7 @@ BGD_DECLARE(void) gdImageDestroy (gdImagePtr im)
/**
* Function: gdImageColorClosest
*
*
* Gets the closest color of the image
*
* This is a simplified variant of <gdImageColorClosestAlpha> where the alpha
@ -1489,7 +1489,7 @@ BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
/*
Function: gdImageAABlend
NO-OP, kept for library compatibility.
*/
BGD_DECLARE(void) gdImageAABlend (gdImagePtr im)
@ -1542,7 +1542,7 @@ static void gdImageVLine(gdImagePtr im, int x, int y1, int y2, int col)
/*
Function: gdImageLine
Bresenham as presented in Foley & Van Dam.
*/
BGD_DECLARE(void) gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
@ -1587,7 +1587,7 @@ BGD_DECLARE(void) gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, in
if (dy <= dx) {
/* More-or-less horizontal. use wid for vertical stroke */
/* Doug Claar: watch out for NaN in atan2 (2.0.5) */
/* 2.0.12: Michael Schwartz: divide rather than multiply;
TBB: but watch out for /0! */
double ac = cos (atan2 (dy, dx));
@ -1940,7 +1940,7 @@ BGD_DECLARE(void) gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c
/**
* Function: gdImageString
*
*
* Draws a character string.
*
* Parameters:
@ -2299,7 +2299,7 @@ BGD_DECLARE(void) gdImageFillToBorder (gdImagePtr im, int x, int y, int border,
} else if (y < 0) {
y = 0;
}
for (i = x; (i >= 0); i--) {
if (gdImageGetPixel (im, i, y) == border) {
break;
@ -3094,7 +3094,7 @@ BGD_DECLARE(void) gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, in
* 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.
@ -3175,7 +3175,7 @@ BGD_DECLARE(void) gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX
*
* 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.
@ -3432,7 +3432,7 @@ BGD_DECLARE(void) gdImageCopyRotated (gdImagePtr dst,
* 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.
@ -4340,8 +4340,8 @@ static void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int co
/* keep them as 32bits */
long x, y, inc, frac;
long dx, dy,tmp;
int w, wid, wstart;
int thick = im->thick;
int w, wid, wstart;
int thick = im->thick;
if (!im->trueColor) {
/* TBB: don't crash when the image is of the wrong type */

View File

@ -29,7 +29,7 @@ extern "C" {
GDXXX_STR(GD_RELEASE_VERSION), \
GD_EXTRA_VERSION)
/* Do the DLL dance: dllexport when building the DLL,
dllimport when importing from it, nothing when
not on Silly Silly Windows (tm Aardman Productions). */
@ -79,20 +79,20 @@ extern "C" {
#define BGD_DECLARE(rt) BGD_EXPORT_DATA_PROT rt BGD_STDCALL
/* VS2012+ disable keyword macroizing unless _ALLOW_KEYWORD_MACROS is set
We define inline, snprintf, and strcasecmp if they're missing
We define inline, snprintf, and strcasecmp if they're missing
*/
#ifdef _MSC_VER
# define _ALLOW_KEYWORD_MACROS
# ifndef inline
# define inline __inline
# endif
# endif
# ifndef strcasecmp
# define strcasecmp _stricmp
# endif
# endif
#if _MSC_VER < 1900
extern int snprintf(char*, size_t, const char*, ...);
#endif
#endif
#endif
#ifdef __cplusplus
extern "C"
@ -131,9 +131,9 @@ extern "C" {
must be 32 bits wide or more.
True colors are repsented as follows:
ARGB
Where 'A' (alpha channel) occupies only the
LOWER 7 BITS of the MSB. This very small
loss of alpha channel resolution allows gd 2.x
@ -209,7 +209,7 @@ extern "C" {
* Group: Effects
*
* The layering effect
*
*
* When pixels are drawn the new colors are "mixed" with the background
* depending on the effect.
*
@ -286,7 +286,7 @@ enum gdPaletteQuantizationMethod {
*
* GD_BELL - Bell
* GD_BESSEL - Bessel
* GD_BILINEAR_FIXED - fixed point bilinear
* GD_BILINEAR_FIXED - fixed point bilinear
* GD_BICUBIC - Bicubic
* GD_BICUBIC_FIXED - fixed point bicubic integer
* GD_BLACKMAN - Blackman
@ -346,7 +346,7 @@ typedef double (* interpolation_method )(double);
/*
Group: Types
typedef: gdImage
typedef: gdImagePtr
@ -513,7 +513,7 @@ gdPointF, *gdPointFPtr;
structure.
Please see the files gdfontl.c and gdfontl.h for an example of
the proper declaration of this structure.
the proper declaration of this structure.
> typedef struct {
> // # of characters in font
@ -710,7 +710,7 @@ BGD_DECLARE(void) gdImageDestroy (gdImagePtr im);
alpha channel value of 'color'; default is to overwrite.
Tiling and line styling are also implemented
here. All other gd drawing functions pass through this call,
allowing for many useful effects.
allowing for many useful effects.
Overlay and multiply effects are used when gdImageAlphaBlending
is passed gdEffectOverlay and gdEffectMultiply */
@ -808,7 +808,7 @@ typedef struct {
then, on return, xshow is a malloc'ed
string containing xshow position data for
the last string.
NB. The caller is responsible for gdFree'ing
the xshow string.
*/
@ -817,7 +817,7 @@ typedef struct {
string containing the actual font file path name
used, which can be interesting when fontconfig
is in use.
The caller is responsible for gdFree'ing the
fontpath string.
*/
@ -977,16 +977,16 @@ BGD_DECLARE(void) gdImageColorDeallocate (gdImagePtr im, int color);
anything up to 256. If the original source image
includes photographic information or anything that
came out of a JPEG, 256 is strongly recommended.
Better yet, don't use these function -- write real
truecolor PNGs and JPEGs. The disk space gain of
conversion to palette is not great (for small images
it can be negative) and the quality loss is ugly.
DIFFERENCES: gdImageCreatePaletteFromTrueColor creates and
returns a new image. gdImageTrueColorToPalette modifies
an existing image, and the truecolor pixels are discarded.
gdImageTrueColorToPalette() returns TRUE on success, FALSE on failure.
*/
@ -1092,7 +1092,7 @@ BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantiza
/**
* Group: GifAnim
*
*
* Legal values for Disposal. gdDisposalNone is always used by
* the built-in optimizer if previm is passed.
*
@ -1318,7 +1318,7 @@ BGD_DECLARE(gdImagePtr) gdImageCopyGaussianBlurred(gdImagePtr src, int radius,
* Macro: gdImageSX
*
* Gets the width (in pixels) of an image.
*
*
* Parameters:
* im - The image.
*/

View File

@ -43,4 +43,3 @@ int main(int argc, char **argv)
return 0;
}

View File

@ -6,7 +6,7 @@
* 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);
@ -183,7 +183,7 @@ BGD_DECLARE(gdImagePtr) gdImageCropAuto(gdImagePtr im, const unsigned int mode)
* im - The image.
* color - The crop color.
* threshold - The crop threshold.
*
*
* Returns:
* The newly created cropped image, or NULL on failure.
*

View File

@ -28,7 +28,7 @@ static void BGD_STDCALL writejpeg(gdImagePtr im, FILE *out) {
static void BGD_STDCALL writewbmp(gdImagePtr im, FILE *out) {
int fg = gdImageColorClosest(im, 0, 0, 0);
gdImageWBMP(im, fg, out);
}/* writejpeg*/
@ -61,7 +61,7 @@ static struct FileType {
{".jpeg", gdImageCreateFromJpeg, writejpeg, NULL},
#endif
#ifdef HAVE_LIBTIFF
#ifdef HAVE_LIBTIFF
{".tiff", gdImageCreateFromTiff, gdImageTiff, NULL},
{".tif" , gdImageCreateFromTiff, gdImageTiff, NULL},
#endif
@ -90,7 +90,7 @@ ftype(const char *filename) {
/* Find the file extension (i.e. the last period in the string. */
ext = strrchr(filename, '.');
if (!ext) return NULL;
for (n = 0; Types[n].ext; n++) {
if (strcasecmp(ext, Types[n].ext) == 0) {
return &Types[n];
@ -103,7 +103,7 @@ ftype(const char *filename) {
/*
Function: gdSupportsFileType
Tests if a given file type is supported by GD.
Given the name of an image file (which does not have to exist),
@ -145,7 +145,7 @@ ftype(const char *filename) {
GD_TRUE (1) if the file type is supported, GD_FALSE (0) if not.
*/
BGD_DECLARE(int)
BGD_DECLARE(int)
gdSupportsFileType(const char *filename, int writing) {
struct FileType *entry = ftype(filename);
return !!entry && (!writing || !!entry->writer);
@ -159,7 +159,7 @@ gdSupportsFileType(const char *filename, int writing) {
Given the path to a file, <gdImageCreateFromFile> will open the
file, read its contents with the appropriate _gdImageCreateFrom*_
function and return it.
function and return it.
File type is determined by the filename extension, so having an
incorrect extension will probably not work. For example, renaming
@ -179,12 +179,12 @@ gdSupportsFileType(const char *filename, int writing) {
*/
BGD_DECLARE(gdImagePtr)
BGD_DECLARE(gdImagePtr)
gdImageCreateFromFile(const char *filename) {
struct FileType *entry = ftype(filename);
FILE *fh;
gdImagePtr result;
if (!entry) return NULL;
if (entry->loader) return entry->loader((char *)filename);
if (!entry->reader) return NULL;
@ -193,7 +193,7 @@ gdImageCreateFromFile(const char *filename) {
if (!fh) return NULL;
result = entry->reader(fh);
fclose(fh);
return result;
@ -235,7 +235,7 @@ gdImageCreateFromFile(const char *filename) {
*/
BGD_DECLARE(int)
BGD_DECLARE(int)
gdImageFile(gdImagePtr im, const char *filename) {
struct FileType *entry = ftype(filename);
FILE *fh;
@ -251,4 +251,3 @@ gdImageFile(gdImagePtr im, const char *filename) {
return GD_TRUE;
}/* gdImageFile*/

View File

@ -898,7 +898,7 @@ applyCoeffsLine(gdImagePtr src, gdImagePtr dst, int line, int linelen,
const int srcpx = (axis == HORIZONTAL) ?
src->tpixels[line][rndx] :
src->tpixels[rndx][line];
r += coeff * (double)gdTrueColorGetRed(srcpx);
g += coeff * (double)gdTrueColorGetGreen(srcpx);
b += coeff * (double)gdTrueColorGetBlue(srcpx);
@ -912,7 +912,7 @@ applyCoeffsLine(gdImagePtr src, gdImagePtr dst, int line, int linelen,
static void
applyCoeffs(gdImagePtr src, gdImagePtr dst, double *coeffs, int radius,
applyCoeffs(gdImagePtr src, gdImagePtr dst, double *coeffs, int radius,
gdAxis axis)
{
int line, numlines, linelen;
@ -939,7 +939,7 @@ applyCoeffs(gdImagePtr src, gdImagePtr dst, double *coeffs, int radius,
_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
@ -987,10 +987,10 @@ applyCoeffs(gdImagePtr src, gdImagePtr dst, double *coeffs, int radius,
FILE *in;
gdImagePtr result, src;
in = fopen("foo.png", "rb");
src = gdImageCreateFromPng(in);
result = gdImageCopyGaussianBlurred(im, src->sx / 10, -1.0);
(end code)
@ -1034,7 +1034,7 @@ gdImageCopyGaussianBlurred(gdImagePtr src, int radius, double sigma)
gdFree(coeffs);
return NULL;
}/* if */
freeSrc = 1;
}/* if */
@ -1059,4 +1059,3 @@ gdImageCopyGaussianBlurred(gdImagePtr src, int radius, double sigma)
return result;
}/* gdImageCopyGaussianBlurred*/

View File

@ -24,7 +24,7 @@
* count - 1 byte (the number of used palette colors)
* transparent - 1 word (257 signals no transparency)
* palette - 256×3 bytes (RGB triplets)
*
*
* GD 2.x file header structure:
* signature - 1 word ("\xFF\xFE" for truecolor, "\xFF\xFF" for palette)
* width - 1 word
@ -234,7 +234,7 @@ fail1:
> in = fopen("mygd.gd", "rb");
> im = gdImageCreateFromGd(in);
> fclose(in);
> // ... Use the image ...
> // ... Use the image ...
> gdImageDestroy(im);
*/
BGD_DECLARE(gdImagePtr) gdImageCreateFromGd (FILE * inFile)

View File

@ -47,7 +47,7 @@
* offset - 1 dword
* size - 1 dword
*
* There are x_chunk_count * y_chunk_count chunk headers.
* There are x_chunk_count * y_chunk_count chunk headers.
*
* Truecolor image color header:
* truecolor - 1 byte (always "\001")
@ -407,7 +407,7 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ptr (int size, void *data)
Function: gdImageCreateFromGd2Ctx
Reads in a GD2 image via a <gdIOCtx> struct. See
<gdImageCreateFromGd2>.
<gdImageCreateFromGd2>.
*/
BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ctx (gdIOCtxPtr in)
{

View File

@ -149,7 +149,7 @@ static void ReadImage (gdImagePtr im, gdIOCtx *fd, int len, int height, unsigned
> in = fopen("mygif.gif", "rb");
> im = gdImageCreateFromGif(in);
> fclose(in);
> // ... Use the image ...
> // ... Use the image ...
> gdImageDestroy(im);
*/

View File

@ -546,18 +546,18 @@ BGD_DECLARE(void *) gdImageGifAnimAddPtr(gdImagePtr im, int *size, int LocalCM,
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
@ -566,7 +566,7 @@ BGD_DECLARE(void *) gdImageGifAnimAddPtr(gdImagePtr im, int *size, int LocalCM,
// 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
@ -578,7 +578,7 @@ BGD_DECLARE(void *) gdImageGifAnimAddPtr(gdImagePtr im, int *size, int LocalCM,
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);

View File

@ -87,4 +87,3 @@ gdImagePtr gdImageRotate270(gdImagePtr src, int ignoretransparent);
#endif

View File

@ -41,8 +41,8 @@
downscaling using the fixed point implementations are usually much faster
than the existing gdImageCopyResampled while having a similar or better
quality.
For image rotations, the optimized versions have a lazy antialiasing for
For image rotations, the optimized versions have a lazy antialiasing for
the edges of the images. For a much better antialiased result, the affine
function is recommended.
*/
@ -78,7 +78,7 @@ TODO:
# include <emmintrin.h>
#endif
static gdImagePtr gdImageScaleBilinear(gdImagePtr im,
static gdImagePtr gdImageScaleBilinear(gdImagePtr im,
const unsigned int new_width,
const unsigned int new_height);
static gdImagePtr gdImageScaleBicubicFixed(gdImagePtr src,
@ -278,7 +278,7 @@ static double KernelBessel_Q1(const double x)
static double KernelBessel_Order1(double x)
{
double p, q;
if (x == 0.0)
return (0.0f);
p = x;
@ -617,7 +617,7 @@ static double filter_welsh(const double x)
#if defined(_MSC_VER) && !defined(inline)
# define inline __inline
#endif
#endif
/* keep it for future usage for affine copy over an existing image, targetting fix for 2.2.2 */
#ifdef FUNCTION_NOT_USED_YET
@ -654,7 +654,7 @@ static inline int _color_blend (const int dst, const int src)
}
}
static inline int _setEdgePixel(const gdImagePtr src, unsigned int x, unsigned int y, gdFixed coverage, const int bgColor)
static inline int _setEdgePixel(const gdImagePtr src, unsigned int x, unsigned int y, gdFixed coverage, const int bgColor)
{
const gdFixed f_127 = gd_itofx(127);
register int c = src->tpixels[y][x];
@ -948,8 +948,8 @@ _gdScaleOneAxis(gdImagePtr pSrc, gdImagePtr dst,
double r = 0, g = 0, b = 0, a = 0;
const int left = contrib->ContribRow[ndx].Left;
const int right = contrib->ContribRow[ndx].Right;
int *dest = (axis == HORIZONTAL) ?
&dst->tpixels[row][ndx] :
int *dest = (axis == HORIZONTAL) ?
&dst->tpixels[row][ndx] :
&dst->tpixels[ndx][row];
int i;
@ -958,7 +958,7 @@ _gdScaleOneAxis(gdImagePtr pSrc, gdImagePtr dst,
for (i = left; i <= right; i++) {
const int left_channel = i - left;
const int srcpx = (axis == HORIZONTAL) ?
pSrc->tpixels[row][i] :
pSrc->tpixels[row][i] :
pSrc->tpixels[i][row];
r += contrib->ContribRow[ndx].Weights[left_channel]
@ -1686,7 +1686,7 @@ static int gdRotatedImageSize(gdImagePtr src, const float angle, gdRectPtr bbox)
return GD_TRUE;
}
static gdImagePtr
static gdImagePtr
gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees,
const int bgColor)
{
@ -1799,7 +1799,7 @@ gdImageRotateGeneric(gdImagePtr src, const float degrees, const int bgColor)
return dst;
}
/**
/**
* Function: gdImageRotateInterpolated
*
* Rotate an image
@ -1821,7 +1821,7 @@ gdImageRotateGeneric(gdImagePtr src, const float degrees, const int bgColor)
*/
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
/* round to two decimals and keep the 100x multiplication to use it in the common square angles
case later. Keep the two decimal precisions so smaller rotation steps can be done, useful for
slow animations, f.e. */
const int angle_rounded = fmod((int) floorf(angle * 100), 360 * 100);
@ -1953,7 +1953,7 @@ BGD_DECLARE(int) gdTransformAffineGetImage(gdImagePtr *dst,
if (!src->trueColor) {
gdImagePaletteToTrueColor(src);
}
/* Translate to dst origin (0,0) */
gdAffineTranslate(m, -bbox.x, -bbox.y);
gdAffineConcat(m, affine, m);
@ -2010,7 +2010,7 @@ BGD_DECLARE(int) gdTransformAffineCopy(gdImagePtr dst,
/* These methods use special implementations */
if (src->interpolation_id == GD_BILINEAR_FIXED || src->interpolation_id == GD_BICUBIC_FIXED || src->interpolation_id == GD_NEAREST_NEIGHBOUR) {
interpolation_id_bak = src->interpolation_id;
gdImageSetInterpolationMethod(src, GD_BICUBIC);
}

View File

@ -17,7 +17,7 @@ extern "C" {
typedef: 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>.
@ -45,14 +45,14 @@ extern "C" {
> {
> 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!
>
> // 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;

View File

@ -6,7 +6,7 @@
*******************************************************************************/
/** \file gd_io_stream.cxx
\brief Implementation of the methods of the gdIOCtx std stream specialization.
Implements the derived specializations of gdIOCtx.
These methods are not called by users of libgd, they
are internal implementation.
@ -22,7 +22,7 @@
#include "gd_io_stream.h"
/** Read into buffer from stream
Return the number of bytes successfully read.
Return the number of bytes successfully read.
If an error occurs, or the end-of-file is reached, the return value
is a short byte count (or zero).
*/
@ -33,7 +33,7 @@ int istreamIOCtx::Getbuf (struct gdIOCtx * ctx, void * buf, int size)
return _str->gcount();
}
/** Write from buffer to stream
Return the number of bytes successfully written.
Return the number of bytes successfully written.
If an error occurs, or the end-of-file is reached, the return value
is a short byte count (or zero).
*/
@ -58,7 +58,7 @@ void istreamIOCtx::Putchar (struct gdIOCtx * , int )
}
/** Seek to position offset from the beginning of the stream
must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek!
must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek!
*/
int istreamIOCtx::Seek (struct gdIOCtx * ctx, const int pos)
{
@ -82,7 +82,7 @@ void istreamIOCtx::FreeCtx (struct gdIOCtx * ctx)
}
/** Read into buffer from stream
Return the number of bytes successfully read.
Return the number of bytes successfully read.
If an error occurs, or the end-of-file is reached, the return value
is a short byte count (or zero).
*/
@ -91,7 +91,7 @@ int ostreamIOCtx::Getbuf (struct gdIOCtx * , void * , int )
return 0;
}
/** Write from buffer to stream
Return the number of bytes successfully written.
Return the number of bytes successfully written.
If an error occurs, or the end-of-file is reached, the return value
is a short byte count (or zero).
*/
@ -119,7 +119,7 @@ void ostreamIOCtx::Putchar (struct gdIOCtx * ctx, int c)
}
/** Seek to position offset from the beginning of the stream
must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek!
must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek!
*/
int ostreamIOCtx::Seek (struct gdIOCtx * ctx, const int pos)
{

View File

@ -255,7 +255,7 @@ void jpeg_gdIOCtx_dest(j_compress_ptr cinfo, gdIOCtx *outfile);
im - The image to write.
outfile - The output sink.
quality - Image quality.
quality - Image quality.
*/
BGD_DECLARE(void) gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality)
@ -496,7 +496,7 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegEx(FILE *inFile, int ignore_warning
Function: gdImageCreateFromJpegPtr
Parameters:
size - size of JPEG data in bytes.
data - pointer to JPEG data.
@ -511,7 +511,7 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegPtr(int size, void *data)
Function: gdImageCreateFromJpegPtrEx
Parameters:
size - size of JPEG data in bytes.
data - pointer to JPEG data.
ignore_warning - if true, ignore recoverable warnings

View File

@ -333,4 +333,3 @@ BGD_DECLARE(int) gdAffineEqual (const double m1[6], const double m2[6])
fabs (m1[4] - m2[4]) < GD_EPSILON &&
fabs (m1[5] - m2[5]) < GD_EPSILON);
}

View File

@ -464,7 +464,7 @@ int verbose;
radius = initradius;
rad = radius >> radiusbiasshift;
for (i=0; i<rad; i++)
nnq->radpower[i] = alpha*(((rad*rad - i*i)*radbias)/(rad*rad));

View File

@ -15,5 +15,3 @@
#define prime4 503
#define minpicturebytes (4*prime4) /* minimum size for input image */

View File

@ -592,7 +592,7 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromPngCtx (gdIOCtx * infile)
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

View File

@ -790,7 +790,7 @@ static int createFromTiffRgba(TIFF * tif, gdImagePtr im)
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);
}
@ -993,10 +993,10 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffCtx(gdIOCtx *infile)
goto error;
}
if (TIFFGetField(tif, TIFFTAG_XRESOLUTION, &res_float)) {
if (TIFFGetField(tif, TIFFTAG_XRESOLUTION, &res_float)) {
im->res_x = (unsigned int)res_float; //truncate
}
if (TIFFGetField(tif, TIFFTAG_YRESOLUTION, &res_float)) {
if (TIFFGetField(tif, TIFFTAG_YRESOLUTION, &res_float)) {
im->res_y = (unsigned int)res_float; //truncate
}

View File

@ -1383,7 +1383,7 @@ zeroHistogram (hist3d histogram)
* 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.
*
@ -1451,7 +1451,7 @@ static int gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int colors
*
* Returns:
* A newly create palette image; NULL on failure.
*
*
* See also:
* - <gdImageCreatePaletteFromTrueColor>
* - <gdImageTrueColorToPaletteSetMethod>
@ -1586,7 +1586,7 @@ static int gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int colors
nim = gdImageNeuQuant(oim, colorsWanted, oim->paletteQuantizationSpeed ? oim->paletteQuantizationSpeed : 2);
if (cimP) {
*cimP = nim;
}
}
if (!nim) {
return FALSE;
} else {

View File

@ -120,5 +120,3 @@ BGD_DECLARE(void) gdImageFlipBoth(gdImagePtr im)
gdImageFlipVertical(im);
gdImageFlipHorizontal(im);
}

View File

@ -134,7 +134,7 @@ BGD_DECLARE(void) gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out)
Function: gdImageCreateFromWBMPCtx
Reads in a WBMP image via a <gdIOCtx> struct. See
<gdImageCreateFromWBMP>.
<gdImageCreateFromWBMP>.
*/
BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMPCtx(gdIOCtx *infile)
{

View File

@ -212,7 +212,7 @@ static int _gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
}
*(p++) = gdTrueColorGetRed(c);
*(p++) = gdTrueColorGetGreen(c);
*(p++) = gdTrueColorGetBlue(c);
*(p++) = gdTrueColorGetBlue(c);
*(p++) = a;
}
}

View File

@ -220,7 +220,7 @@ static void gdCtxPrintf(gdIOCtx * out, const char *format, ...)
* gd - Which color to use as forground color. All pixels with another
* color are unset.
* out - The <gdIOCtx> to write the image file to.
*
*
*/
BGD_DECLARE(void) gdImageXbmCtx(gdImagePtr image, char* file_name, int fg, gdIOCtx * out)
{

View File

@ -89,5 +89,3 @@ void CompareImages(char *msg, gdImagePtr im1, gdImagePtr im2)
printf("-%s: INFO actual colours of pixels differ\n",msg);
}
}

View File

@ -973,13 +973,13 @@ BGD_DECLARE(int) gdFontCacheSetup (void)
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;
@ -1083,7 +1083,7 @@ BGD_DECLARE(int) gdFontCacheSetup (void)
> flags | gdFTEX_FONTPATHNAME;
For more information, see <gdImageStringFT>.
For more information, see <gdImageStringFT>.
*/
/* the platform-independent resolution used for size and position calculations */
@ -1923,4 +1923,3 @@ BGD_DECLARE(int) gdFTUseFontConfig(int flag)
return 0;
#endif /* HAVE_LIBFONTCONFIG */
}

View File

@ -522,4 +522,3 @@ gdImageSharpen (gdImagePtr im, int pct)
}
}
}

View File

@ -114,5 +114,3 @@ BGD_DECLARE(void) gdFree (void *ptr)
{
free (ptr);
}

View File

@ -6,7 +6,7 @@
*******************************************************************************/
/** \file gdpp.cxx
\brief Implements the non-trivial methods of GD::Image.
Implementation of the more complex methods defined
in gdpp.h.
Notably includes the methods which determine the image file
@ -19,13 +19,13 @@ namespace GD
{
/**
Load an image from a file, after attempting to
determine it's image file format.
determine it's image file format.
Invoke CreateFrom with an already opened
pointer to a file containing the desired image.
pointer to a file containing the desired image.
CreateFrom does not close the file.
\param[in] in An opened FILE * pointer.
\return true for success, or false if unable to load the image (most often because the
file is corrupt or does not contain a recognized image format).
\return true for success, or false if unable to load the image (most often because the
file is corrupt or does not contain a recognized image format).
You can call Width() and Height() member functions of the image to determine its size.
*/
bool Image::CreateFrom(FILE * in)
@ -54,36 +54,36 @@ namespace GD
#ifdef HAVE_LIBJPEG
/* JPEG
A JFIF-standard file will start with the four bytes (hex) FF D8 FF E0,
followed by two variable bytes (often hex 00 10), followed by 'JFIF'.
followed by two variable bytes (often hex 00 10), followed by 'JFIF'.
*/
case 0xFF: // JPEG
rtn = CreateFromJpeg(in);
break;
#endif
/* WBMP
WBMP Type 0: B/W, Uncompressed bitmap is the only gd supported type
WBMP Type 0: B/W, Uncompressed bitmap is the only gd supported type
*/
case 0x00: // WBMP
rtn = CreateFromWBMP(in);
break;
/* GD2
0x67 0x64 0x32 0x00
0x67 0x64 0x32 0x00
== GD2\0
Starts with gd2
Starts with gd2
*/
case 0x67: // GD2
rtn = CreateFromGd2(in);
break;
/* GD
0xFF 0xFE
or
0xFF 0xFF
or
0xFF 0xFF
Conflicts with Jpeg
*/
/* XBM
#define test_width 16
#define test_height 7
*/
*/
case 0x23: // XBM
rtn = CreateFromXbm(in);
break;
@ -91,18 +91,18 @@ namespace GD
rtn = false;
break;
}
return rtn;
return rtn;
}
/**
Load an image from a standard input stream, after attempting to
determine it's image file format.
determine it's image file format.
Invoke CreateFrom with an already opened stream
containing the desired image.
containing the desired image.
CreateFrom does not close the stream.
\param[in] in An opened standard library input stream.
\return true for success, or false if unable to load the image (most often because the
file is corrupt or does not contain a recognized image format).
\return true for success, or false if unable to load the image (most often because the
file is corrupt or does not contain a recognized image format).
You can call Width() and Height() member functions of the image to determine its size.
Example usage, convert anything to gif:
#include <fstream>
@ -143,7 +143,7 @@ namespace GD
#ifdef HAVE_LIBJPEG
/* JPEG
A JFIF-standard file will start with the four bytes (hex) FF D8 FF E0,
followed by two variable bytes (often hex 00 10), followed by 'JFIF'.
followed by two variable bytes (often hex 00 10), followed by 'JFIF'.
*/
case 0xFF: // JPEG
rtn = CreateFromJpeg(in);
@ -151,40 +151,40 @@ namespace GD
#endif
/* WBMP
WBMP Type 0: B/W, Uncompressed bitmap is the only gd supported type
WBMP Type 0: B/W, Uncompressed bitmap is the only gd supported type
*/
case 0x00: // WBMP
rtn = CreateFromWBMP(in);
break;
/* GD2
0x67 0x64 0x32 0x00
0x67 0x64 0x32 0x00
== GD2\0
Starts with gd2
Starts with gd2
*/
case 0x67: // GD2
rtn = CreateFromGd2(in);
break;
/* GD
0xFF 0xFE
or
0xFF 0xFF
or
0xFF 0xFF
Conflicts with Jpeg
*/
default:
rtn = false;
break;
}
return rtn;
return rtn;
}
/**
Load an image from an in-RAM memory block, after attempting to
determine it's image format.
determine it's image format.
CreateFrom does not de-allocate the memory.
\param[in] size The byte count of the memory block.
\param[in] data A pointer to the memory block.
\return true for success, or false if unable to load the image (most often because the
formatting is corrupt or does not contain a recognized image format).
\return true for success, or false if unable to load the image (most often because the
formatting is corrupt or does not contain a recognized image format).
You can call Width() and Height() member functions of the image to determine its size.
*/
bool Image::CreateFrom(int size, void * data)
@ -213,7 +213,7 @@ namespace GD
#ifdef HAVE_LIBJPEG
/* JPEG
A JFIF-standard file will start with the four bytes (hex) FF D8 FF E0,
followed by two variable bytes (often hex 00 10), followed by 'JFIF'.
followed by two variable bytes (often hex 00 10), followed by 'JFIF'.
*/
case 0xFF: // JPEG
rtn = CreateFromJpeg(size, data);
@ -221,34 +221,34 @@ namespace GD
#endif
/* WBMP
WBMP Type 0: B/W, Uncompressed bitmap is the only gd supported type
WBMP Type 0: B/W, Uncompressed bitmap is the only gd supported type
*/
case 0x00: // WBMP
rtn = CreateFromWBMP(size, data);
break;
/* GD2
0x67 0x64 0x32 0x00
0x67 0x64 0x32 0x00
== GD2\0
Starts with gd2
Starts with gd2
*/
case 0x67: // GD2
rtn = CreateFromGd2(size, data);
break;
/* GD
0xFF 0xFE
or
0xFF 0xFF
or
0xFF 0xFF
Conflicts with Jpeg
*/
default:
rtn = false;
break;
}
return rtn;
return rtn;
}
} // namespace GD
/**
Load an image from a standard input stream, regardless of it's image file format.
Load an image from a standard input stream, regardless of it's image file format.
You can call Width() and Height() member functions of the image to determine its size.
Example usage, convert anything to gif:
#include <fstream>

View File

@ -87,12 +87,12 @@ main (int argc, char **argv)
}
im2 = gdImageCreateFromPng (in);
fclose (in);
if (!im2) {
fprintf(stderr, "gdImageCreateFromPng failed.\n");
exit (1);
}
CompareImages ("GD->PNG File->GD", ref, im2);
unlink (of);
@ -196,7 +196,7 @@ main (int argc, char **argv)
fprintf(stderr, "gdImageCreateFromGdPtr failed.\n");
exit (1);
}
CompareImages ("GD->GD ptr->GD", ref, im2);
gdImageDestroy (im2);

View File

@ -32,4 +32,3 @@ int main(void)
gdImageDestroy(im);
return 0;
}

View File

@ -49,4 +49,3 @@ int main(int argc, char **argv)
return 0;
}

View File

@ -1,32 +1,32 @@
// ISO C9x compliant inttypes.h for Microsoft Visual Studio
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Copyright (c) 2006 Alexander Chemeris
//
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
//
// 3. The name of the author may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSC_VER // [

View File

@ -1,32 +1,32 @@
// ISO C9x compliant stdint.h for Microsoft Visual Studio
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Copyright (c) 2006-2008 Alexander Chemeris
//
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
//
// 3. The name of the author may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSC_VER // [

View File

@ -1,5 +1,5 @@
if HAVE_LIBFREETYPE
if HAVE_LIBPNG
if HAVE_LIBPNG
libgd_test_programs += \
freetype/bug00132
endif

View File

@ -1,10 +1,10 @@
/**
* Test that invalid transparent colors can't be read
*
*
* We're reading a corrupt palette image in GD format, which has only a single
* palette entry, but claims that the transparent color would be 1. We check
* that the transparency is simply ignored in this case.
*
*
* See also <https://github.com/libgd/libgd/issues/383>
*/

View File

@ -1,10 +1,10 @@
/**
* Test that invalid transparent colors can't be read
*
*
* We're reading a corrupt palette image in GD2 format, which has only a single
* palette entry, but claims that the transparent color would be 1. We check
* that the transparency is simply ignored in this case.
*
*
* See also <https://github.com/libgd/libgd/issues/383>
*/

View File

@ -29,7 +29,7 @@ int main()
im = gdImageCreateFromGd2(fp);
fclose(fp);
gdTestAssertMsg(im == NULL, "Image should have failed to be loaded\n");
return gdNumFailures();

View File

@ -48,23 +48,23 @@ int main()
fp = gdTestFileOpen2("gdimagecopyresampled", "bug00201_src.png");
logo_source = gdImageCreateFromPng(fp);
fclose(fp);
logo = blank_image(SRC_WIDTH,SRC_HEIGHT);
gdImageAlphaBlending(logo, 0);
gdImageCopy(logo, logo_source, 0,0, 0,0, SRC_WIDTH,SRC_HEIGHT);
gdImageDestroy(logo_source);
scaled_logo = blank_image(DEST_WIDTH,DEST_HEIGHT);
gdImageAlphaBlending(scaled_logo, 0);
gdImageCopyResampled(scaled_logo, logo, 0,0, 0,0, 200,105, SRC_WIDTH,SRC_HEIGHT);
gdImageDestroy(logo);
layers[0] = background;
layers[1] = scaled_logo;
img = flatten(layers, 2, DEST_WIDTH, DEST_HEIGHT);
gdImageDestroy(background);
gdImageDestroy(scaled_logo);
gdAssertImageEqualsToFile("gdimagecopyresampled/bug00201_exp.png", img);
gdImageDestroy(img);
return gdNumFailures();

View File

@ -1,6 +1,6 @@
/**
* Test that gdImageCrop() retains transparency
*
*
* We create an image with transparent pixels, crop the image, and check whether
* all pixels are identical to the respective source image.
*
@ -26,7 +26,7 @@ int main()
src = gdImageCreateTrueColor(WIDTH, HEIGHT);
gdImageAlphaBlending(src, gdEffectReplace);
gdImageFilledRectangle(src, 0, 0, WIDTH-1, HEIGHT-1,
gdImageFilledRectangle(src, 0, 0, WIDTH-1, HEIGHT-1,
gdTrueColorAlpha(gdRedMax, gdGreenMax, gdBlueMax, gdAlphaMax));
dst = gdImageCrop(src, &crop);

View File

@ -37,4 +37,3 @@ int main()
return error;
}

View File

@ -46,4 +46,3 @@ int main()
gdImageDestroy(tile);
return error;
}

View File

@ -51,4 +51,3 @@ int main()
gdImageDestroy(tile);
return error;
}

View File

@ -8,26 +8,26 @@ int main()
gdImagePtr im, tile;
int tile_red, tile_blue;
int error = 0;
im = gdImageCreate(200, 150);
tile = gdImageCreateTrueColor(2, 2);
tile_red = gdImageColorAllocate(tile, 255, 0, 0);
tile_blue = gdImageColorAllocate(tile, 0, 0, 255);
gdImageSetPixel(tile, 0, 0, tile_red);
gdImageSetPixel(tile, 1, 1, tile_red);
gdImageSetPixel(tile, 1, 0, tile_blue);
gdImageSetPixel(tile, 0, 1, tile_blue);
gdImageSetTile(im, tile);
gdImageFill(im, 11, 12, gdTiled);
if (!gdAssertImageEqualsToFile("gdimagefill/bug00104_1_exp.png", im)) {
error = 1;
}
gdImageDestroy(im);
gdImageDestroy(tile);
return error;

View File

@ -12,7 +12,7 @@ int main()
goto exit;
}
gdImageAlphaBlending(im, gdEffectNormal);
gdImageAlphaBlending(im, gdEffectNormal);
gdImageFilledRectangle(im, 0, 0, 140, 199, gdTrueColorAlpha(0,0,0,127));
gdImageAlphaBlending(im, gdEffectAlphaBlend);

View File

@ -24,4 +24,3 @@ int main()
return 1;
}
}

View File

@ -36,4 +36,3 @@ int main()
gdImageDestroy(im);
return 0;
}

View File

@ -24,4 +24,3 @@ int main()
return 1;
}
}

View File

@ -27,4 +27,3 @@ int main()
}
}

View File

@ -143,7 +143,7 @@ void do_crosstest()
{
gdImagePtr im = mkcross();
gdImagePtr blurred;
const int RADIUS = 16;
const int RADIUS = 16;
gdTestAssert(!!im);

View File

@ -15,7 +15,7 @@ int main()
return 1;
}
gdImageSetInterpolationMethod(im, GD_BELL);
/* here the call may pass if the system has enough memory (physical or swap)
or fails (overflow check or alloc fails.
in both cases the tests pass */

View File

@ -5,7 +5,7 @@
* GD_QUANT_NEUQUANT has its trueColor flag unset.
*/
#include "gd.h"
#include "gdtest.h"

View File

@ -60,7 +60,7 @@ gdImagePtr gdTestImageFromPng(const char *filename)
if (fp == NULL) {
return NULL;
}
image = gdImageCreateFromPng(fp);
fclose(fp);
return image;
@ -306,7 +306,7 @@ char *gdTestTempFile(const char *template)
ret);
gdTestAssert(error != 0);
} else {
sprintf(ret, "%s\\%s", tempdir, template);
sprintf(ret, "%s\\%s", tempdir, template);
}
}
#else

View File

@ -29,4 +29,3 @@ int main()
gdImageDestroy(tile);
return 0;
}

View File

@ -10,7 +10,7 @@ int main()
gdRect bbox;
gdRect area;
double affine[6];
affine[0] = -0.965926;
affine[1] = -0.258819;
affine[2] = 0.258819;

View File

@ -1,6 +1,6 @@
/**
* Test that GIF reading does not loop infinitely
*
*
* We are reading a crafted GIF image which has been truncated. This would
* trigger an infinite loop formerly, but know bails out early, returning
* NULL from gdImageCreateFromGif().

View File

@ -24,7 +24,7 @@ int main()
gdImageDestroy(im);
return 1;
}
gdImageDestroy(im);
return 0;
}

View File

@ -47,4 +47,4 @@ int main()
gdTestAssertMsg(length == 250, "expected to write 250 bytes; %jd bytes written", (intmax_t) length);
return gdNumFailures();
}
#endif
#endif

View File

@ -38,7 +38,7 @@ BEGIN
VALUE "FileDescription", "LIBGD" "\0"
VALUE "FileVersion", GD_VERSION_STRING "\0"
VALUE "InternalName", "bgd.dll" "\0"
VALUE "LegalCopyright", "Copyright © 1997-2008 Thomas Boutell, Pierre A. Joye and contributors, see COPYING\0"
VALUE "LegalCopyright", "Copyright © 1997-2008 Thomas Boutell, Pierre A. Joye and contributors, see COPYING\0"
VALUE "LegalTrademarks", "Thomas Boutell, Pierre A. Joye and contributors\0"
VALUE "OriginalFilename", "bgd.dll" "\0"
VALUE "PrivateBuild", "\0"
@ -56,4 +56,3 @@ END
#ifdef MC_INCLUDE
#include MC_INCLUDE
#endif

View File

@ -131,13 +131,3 @@ $(TARGET): $(OBJ)
$(OBJ) $(LIBS)
include deps.mk

Some files were not shown because too many files have changed in this diff Show More