diff options
author | Marcus Boerger <helly@php.net> | 2002-11-18 16:51:02 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2002-11-18 16:51:02 +0000 |
commit | 301330ff883f3b9183b5351e0f8d6d142f1f1100 (patch) | |
tree | 5dd201e8f79d7b02a18759458b64a8f2479f3364 /ext | |
parent | a3d821c69551851ae9be8203897b1d4c02d74ff8 (diff) | |
download | php-git-301330ff883f3b9183b5351e0f8d6d142f1f1100.tar.gz |
-Added colordepth for png
-Added tests for width/heidth for unsigned/signed problems
Diffstat (limited to 'ext')
-rw-r--r-- | ext/standard/tests/image/246x247.png | bin | 0 -> 360 bytes | |||
-rw-r--r-- | ext/standard/tests/image/384x385.png | bin | 0 -> 267 bytes | |||
-rw-r--r-- | ext/standard/tests/image/getimagesize.phpt | 4 | ||||
-rw-r--r-- | ext/standard/tests/image/getimagesize_246x247.phpt | 42 | ||||
-rw-r--r-- | ext/standard/tests/image/getimagesize_384x385.phpt | 42 |
5 files changed, 87 insertions, 1 deletions
diff --git a/ext/standard/tests/image/246x247.png b/ext/standard/tests/image/246x247.png Binary files differnew file mode 100644 index 0000000000..648a64e0aa --- /dev/null +++ b/ext/standard/tests/image/246x247.png diff --git a/ext/standard/tests/image/384x385.png b/ext/standard/tests/image/384x385.png Binary files differnew file mode 100644 index 0000000000..843ddfaf08 --- /dev/null +++ b/ext/standard/tests/image/384x385.png diff --git a/ext/standard/tests/image/getimagesize.phpt b/ext/standard/tests/image/getimagesize.phpt index 57310c32f7..9d28acf7ac 100644 --- a/ext/standard/tests/image/getimagesize.phpt +++ b/ext/standard/tests/image/getimagesize.phpt @@ -121,7 +121,7 @@ array(10) { string(9) "image/iff" } ["test4pix.png"]=> - array(5) { + array(6) { [0]=> int(4) [1]=> @@ -130,6 +130,8 @@ array(10) { int(3) [3]=> string(20) "width="4" height="1"" + ["bits"]=> + int(4) ["mime"]=> string(9) "image/png" } diff --git a/ext/standard/tests/image/getimagesize_246x247.phpt b/ext/standard/tests/image/getimagesize_246x247.phpt new file mode 100644 index 0000000000..e5a0aea779 --- /dev/null +++ b/ext/standard/tests/image/getimagesize_246x247.phpt @@ -0,0 +1,42 @@ +--TEST-- +GetImageSize() with 246x247 pixels +--SKIPIF-- +<?php + require_once('skipif_imagetype.inc'); +?> +--FILE-- +<?php + // Note: SWC requires zlib + $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); + $result = array(); + $files = array(); + while (($file = readdir($dir)) !== FALSE) { + if (preg_match('/^246x247\./',$file)) { + $files[] = $file; + } + } + closedir($dir); + sort($files); + foreach($files as $file) { + $result[$file] = getimagesize(dirname(__FILE__)."/$file"); + } + var_dump($result); +?> +--EXPECT-- +array(1) { + ["246x247.png"]=> + array(6) { + [0]=> + int(246) + [1]=> + int(247) + [2]=> + int(3) + [3]=> + string(24) "width="246" height="247"" + ["bits"]=> + int(4) + ["mime"]=> + string(9) "image/png" + } +} diff --git a/ext/standard/tests/image/getimagesize_384x385.phpt b/ext/standard/tests/image/getimagesize_384x385.phpt new file mode 100644 index 0000000000..0051df71e0 --- /dev/null +++ b/ext/standard/tests/image/getimagesize_384x385.phpt @@ -0,0 +1,42 @@ +--TEST-- +GetImageSize() with 384x385 pixels +--SKIPIF-- +<?php + require_once('skipif_imagetype.inc'); +?> +--FILE-- +<?php + // Note: SWC requires zlib + $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); + $result = array(); + $files = array(); + while (($file = readdir($dir)) !== FALSE) { + if (preg_match('/^384x385\./',$file)) { + $files[] = $file; + } + } + closedir($dir); + sort($files); + foreach($files as $file) { + $result[$file] = getimagesize(dirname(__FILE__)."/$file"); + } + var_dump($result); +?> +--EXPECT-- +array(1) { + ["384x385.png"]=> + array(6) { + [0]=> + int(384) + [1]=> + int(385) + [2]=> + int(3) + [3]=> + string(24) "width="384" height="385"" + ["bits"]=> + int(1) + ["mime"]=> + string(9) "image/png" + } +} |