summaryrefslogtreecommitdiff
path: root/ext/gd
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gd')
-rw-r--r--ext/gd/libgd/gd.h2
-rw-r--r--ext/gd/libgd/gd_arc_f_buggy.c2
-rw-r--r--ext/gd/libgd/gdft.c2
-rw-r--r--ext/gd/libgd/webpimg.c4
-rw-r--r--ext/gd/libgd/webpimg.h2
-rw-r--r--ext/gd/tests/imagealphablending_error1.phpt19
-rw-r--r--ext/gd/tests/imagecolorresolvealpha_error3.phpt19
-rw-r--r--ext/gd/tests/imagesavealpha_error2.phpt19
8 files changed, 63 insertions, 6 deletions
diff --git a/ext/gd/libgd/gd.h b/ext/gd/libgd/gd.h
index b61d972e8..0ace31ba0 100644
--- a/ext/gd/libgd/gd.h
+++ b/ext/gd/libgd/gd.h
@@ -782,7 +782,7 @@ int gdImageBrightness(gdImagePtr src, int brightness);
/* Set the contrast level <contrast> for the image <src> */
int gdImageContrast(gdImagePtr src, double contrast);
-/* Simply adds or substracts respectively red, green or blue to a pixel */
+/* Simply adds or subtracts respectively red, green or blue to a pixel */
int gdImageColor(gdImagePtr src, const int red, const int green, const int blue, const int alpha);
/* Image convolution by a 3x3 custom matrix */
diff --git a/ext/gd/libgd/gd_arc_f_buggy.c b/ext/gd/libgd/gd_arc_f_buggy.c
index c26e42171..ffab55123 100644
--- a/ext/gd/libgd/gd_arc_f_buggy.c
+++ b/ext/gd/libgd/gd_arc_f_buggy.c
@@ -1,6 +1,6 @@
/* This is potentially great stuff, but fails against the test
program at the end. This would probably be much more
- efficent than the implementation currently in gd.c if the
+ efficient than the implementation currently in gd.c if the
errors in the output were corrected. TBB */
#if 0
diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c
index 3d7b46c41..ba905dc0a 100644
--- a/ext/gd/libgd/gdft.c
+++ b/ext/gd/libgd/gdft.c
@@ -464,7 +464,7 @@ static void *fontFetch (char **error, void *key)
return NULL;
}
- /* FIXME - This mapping stuff is imcomplete - where is the spec? */
+ /* FIXME - This mapping stuff is incomplete - where is the spec? */
/* EAM - It's worse than that. It's pointless to match character encodings here.
* As currently written, the stored a->face->charmap only matches one of
* the actual charmaps and we cannot know at this stage if it is the right
diff --git a/ext/gd/libgd/webpimg.c b/ext/gd/libgd/webpimg.c
index 01bef93c4..95a8081e0 100644
--- a/ext/gd/libgd/webpimg.c
+++ b/ext/gd/libgd/webpimg.c
@@ -169,7 +169,7 @@ static inline uint32 get_le32(const uint8* const data) {
* Y2/U2/V2: The Y/U/V data of the second image
*
* Returns the PSNR (http://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio)
- * value computed bewteen the two images
+ * value computed between the two images
*/
double GetPSNRYuv(const uint8* Y1,
const uint8* U1,
@@ -210,7 +210,7 @@ double GetPSNRYuv(const uint8* Y1,
* imgdata: data buffer containing webp image
* imgdata_size: size of the imgdata buffer
*
- * Returns the PSNR value computed bewteen the two images
+ * Returns the PSNR value computed between the two images
*/
double WebPGetPSNR(const uint8* Y1,
const uint8* U1,
diff --git a/ext/gd/libgd/webpimg.h b/ext/gd/libgd/webpimg.h
index db23de5bb..bc0f9722b 100644
--- a/ext/gd/libgd/webpimg.h
+++ b/ext/gd/libgd/webpimg.h
@@ -57,7 +57,7 @@ typedef enum WebPResultType {
* 3. p_Y/p_U/p_V : pointer to the Y/U/V data buffer (this routine will
* allocate memory for the buffer, fill the buffer with
* appropriate data and transfer owner ship of the buffer
- * to caller. Caller is reponsible for freeing the memory).
+ * to caller. Caller is responsible for freeing the memory).
* Note that the memory for Y, U, V buffers is alloacted
* in one chunk, hence one should call free(*p_Y) only.
* Do not try to free the U and V buffers.
diff --git a/ext/gd/tests/imagealphablending_error1.phpt b/ext/gd/tests/imagealphablending_error1.phpt
new file mode 100644
index 000000000..6d49f32b0
--- /dev/null
+++ b/ext/gd/tests/imagealphablending_error1.phpt
@@ -0,0 +1,19 @@
+--TEST--
+test imagealphablending without arguments
+
+--CREDITS--
+Marcelo Diniz <marcelo.leo27 [at] gmail [dot] com
+‪#‎phpspMaisTestFest PHPSP on 2014-07-05
+
+--SKIPIF--
+<?php
+ if (!extension_loaded('gd')) die("skip gd extension not available.");
+?>
+
+--FILE--
+<?php
+imagealphablending();
+?>
+
+--EXPECTF--
+Warning: imagealphablending() expects exactly 2 parameters, 0 given in %s on line %d \ No newline at end of file
diff --git a/ext/gd/tests/imagecolorresolvealpha_error3.phpt b/ext/gd/tests/imagecolorresolvealpha_error3.phpt
new file mode 100644
index 000000000..735b4c97d
--- /dev/null
+++ b/ext/gd/tests/imagecolorresolvealpha_error3.phpt
@@ -0,0 +1,19 @@
+--TEST--
+test imagecolorresolvealpha without arguments
+
+--CREDITS--
+Marcelo Diniz <marcelo.leo27 [at] gmail [dot] com
+‪#‎phpspMaisTestFest PHPSP on 2014-07-05
+
+--SKIPIF--
+<?php
+ if (!extension_loaded('gd')) die("skip gd extension not available.");
+?>
+
+--FILE--
+<?php
+imagecolorresolvealpha();
+?>
+
+--EXPECTF--
+Warning: imagecolorresolvealpha() expects exactly 5 parameters, 0 given in %s on line %d \ No newline at end of file
diff --git a/ext/gd/tests/imagesavealpha_error2.phpt b/ext/gd/tests/imagesavealpha_error2.phpt
new file mode 100644
index 000000000..1a7083d52
--- /dev/null
+++ b/ext/gd/tests/imagesavealpha_error2.phpt
@@ -0,0 +1,19 @@
+--TEST--
+test imagesavealpha without arguments
+
+--CREDITS--
+Marcelo Diniz <marcelo.leo27 [at] gmail [dot] com
+‪#‎phpspMaisTestFest PHPSP on 2014-07-05
+
+--SKIPIF--
+<?php
+ if (!extension_loaded('gd')) die("skip gd extension not available.");
+?>
+
+--FILE--
+<?php
+imagesavealpha();
+?>
+
+--EXPECTF--
+Warning: imagesavealpha() expects exactly 2 parameters, 0 given in %s on line %d \ No newline at end of file