From 20a4f848b71cdbe1adc5caff8cd9733cc1dd323e Mon Sep 17 00:00:00 2001 From: Mikael Roos Date: Fri, 21 Nov 2014 19:24:36 +0100 Subject: [PATCH] Moved all test-files into own directory. --- webroot/test/test.php | 73 +++++++++++++++++++++++ webroot/test/test_issue29.php | 75 ++++++++++++++++++++++++ webroot/test/test_issue36_aro.php | 77 ++++++++++++++++++++++++ webroot/test/test_issue36_rb-ra-180.php | 76 ++++++++++++++++++++++++ webroot/test/test_issue36_rb-ra-270.php | 76 ++++++++++++++++++++++++ webroot/test/test_issue36_rb-ra-45.php | 78 +++++++++++++++++++++++++ webroot/test/test_issue36_rb-ra-90.php | 76 ++++++++++++++++++++++++ 7 files changed, 531 insertions(+) create mode 100644 webroot/test/test.php create mode 100644 webroot/test/test_issue29.php create mode 100644 webroot/test/test_issue36_aro.php create mode 100644 webroot/test/test_issue36_rb-ra-180.php create mode 100644 webroot/test/test_issue36_rb-ra-270.php create mode 100644 webroot/test/test_issue36_rb-ra-45.php create mode 100644 webroot/test/test_issue36_rb-ra-90.php diff --git a/webroot/test/test.php b/webroot/test/test.php new file mode 100644 index 0000000..2dbb648 --- /dev/null +++ b/webroot/test/test.php @@ -0,0 +1,73 @@ + + + + Testing img resizing using CImage.php + + +

Testing CImage.php through img.php

+ +

Testcases

+ +'Original image', 'query'=>''), + array('text'=>'Crop out a rectangle of 100x100, start by position 200x200.', 'query'=>'&crop=100,100,200,200'), + array('text'=>'Crop out a full width rectangle with height of 200, start by position 0x100.', 'query'=>'&crop=0,200,0,100'), + array('text'=>'Max width 200.', 'query'=>'&w=200'), + array('text'=>'Max height 200.', 'query'=>'&h=200'), + array('text'=>'Max width 200 and max height 200.', 'query'=>'&w=200&h=200'), + array('text'=>'No-ratio makes image fit in area of width 200 and height 200.', 'query'=>'&w=200&h=200&no-ratio'), + array('text'=>'Crop to fit in width 200 and height 200.', 'query'=>'&w=200&h=200&crop-to-fit'), + array('text'=>'Crop to fit in width 200 and height 100.', 'query'=>'&w=200&h=100&crop-to-fit'), + array('text'=>'Crop to fit in width 100 and height 200.', 'query'=>'&w=100&h=200&crop-to-fit'), + array('text'=>'Quality 70', 'query'=>'&w=200&h=200&quality=70'), + array('text'=>'Quality 40', 'query'=>'&w=200&h=200&quality=40'), + array('text'=>'Quality 10', 'query'=>'&w=200&h=200&quality=10'), + array('text'=>'Filter: Negate', 'query'=>'&w=200&h=200&f=negate'), + array('text'=>'Filter: Grayscale', 'query'=>'&w=200&h=200&f=grayscale'), + array('text'=>'Filter: Brightness 90', 'query'=>'&w=200&h=200&f=brightness,90'), + array('text'=>'Filter: Contrast 50', 'query'=>'&w=200&h=200&f=contrast,50'), + array('text'=>'Filter: Colorize 0,255,0,0', 'query'=>'&w=200&h=200&f=colorize,0,255,0,0'), + array('text'=>'Filter: Edge detect', 'query'=>'&w=200&h=200&f=edgedetect'), + array('text'=>'Filter: Emboss', 'query'=>'&w=200&h=200&f=emboss'), + array('text'=>'Filter: Gaussian blur', 'query'=>'&w=200&h=200&f=gaussian_blur'), + array('text'=>'Filter: Selective blur', 'query'=>'&w=200&h=200&f=selective_blur'), + array('text'=>'Filter: Mean removal', 'query'=>'&w=200&h=200&f=mean_removal'), + array('text'=>'Filter: Smooth 2', 'query'=>'&w=200&h=200&f=smooth,2'), + array('text'=>'Filter: Pixelate 10,10', 'query'=>'&w=200&h=200&f=pixelate,10,10'), + array('text'=>'Multiple filter: Negate, Grayscale and Pixelate 10,10', 'query'=>'&w=200&h=200&&f=negate&f0=grayscale&f1=pixelate,10,10'), + array('text'=>'Crop with width & height and crop-to-fit with quality and filter', 'query'=>'&crop=100,100,100,100&w=200&h=200&crop-to-fit&q=70&f0=grayscale'), +); +?> + +

Test case with image wider.jpg

+ + + + + $val) { + $url = "../img.php?src=wider.jpg{$val['query']}"; + echo ""; +} +?> + +
Test case with image wider.jpg
Testcase:Result:
$key
{$val['text']}
".htmlentities($url)."
+ +

Test case with image higher.jpg

+ + + + + $val) { + $url = "../img.php?src=higher.jpg{$val['query']}"; + echo ""; +} +?> + +
Test case with image higher.jpg
Testcase:Result:
$key
{$val['text']}
".htmlentities($url)."
+ + + + \ No newline at end of file diff --git a/webroot/test/test_issue29.php b/webroot/test/test_issue29.php new file mode 100644 index 0000000..54d00df --- /dev/null +++ b/webroot/test/test_issue29.php @@ -0,0 +1,75 @@ + + + + Testing img for issue 29 + + + +

Testing issue 29

+ +Version of PHP is: " . phpversion(); + +$imgphp = "../img.php?src="; + +$images = array( + 'issue29/400x265.jpg', + 'issue29/400x268.jpg', + 'issue29/400x300.jpg', + 'issue29/465x304.jpg', + 'issue29/640x273.jpg', +); + + +$testcase = array( + '&w=300&cf&q=80&nc', + '&w=75&h=75&cf&q=80&nc', + '&w=75&h=75&q=80', +); +?> + + +

Images used in test

+ +

The following images are used for this test.

+ + +


+

+ + + + +

Testcases used for each image

+ +

The following testcases are used for each image.

+ + +
+ + + + +

Applying testcase for each image

+ + +

+ +


+

+ + +

+ +


+

+ + + + diff --git a/webroot/test/test_issue36_aro.php b/webroot/test/test_issue36_aro.php new file mode 100644 index 0000000..969d9fc --- /dev/null +++ b/webroot/test/test_issue36_aro.php @@ -0,0 +1,77 @@ + + + + Testing img for issue 36 - autoRotate + + + +

Testing issue 36 - autoRotate

+ + + + +

Images used in test

+ +

The following images are used for this test.

+ + +


+

+ + + + +

Testcases used for each image

+ +

The following testcases are used for each image.

+ + +
+ + + + +

Applying testcase for each image

+ + +

+ +


+

+ + +

+ +


+

+ + + + diff --git a/webroot/test/test_issue36_rb-ra-180.php b/webroot/test/test_issue36_rb-ra-180.php new file mode 100644 index 0000000..8e6b305 --- /dev/null +++ b/webroot/test/test_issue36_rb-ra-180.php @@ -0,0 +1,76 @@ + + + + Testing img for issue 36 - rotateBefore, rotateAfter <?=$angle?> + + + +

Testing issue 36 - rotateBefore, rotateAfter

+ + + + +

Images used in test

+ +

The following images are used for this test.

+ + +


+

+ + + + +

Testcases used for each image

+ +

The following testcases are used for each image.

+ + +
+ + + + +

Applying testcase for each image

+ + +

+ +


+

+ + +

+ +


+

+ + + + diff --git a/webroot/test/test_issue36_rb-ra-270.php b/webroot/test/test_issue36_rb-ra-270.php new file mode 100644 index 0000000..e3d07ba --- /dev/null +++ b/webroot/test/test_issue36_rb-ra-270.php @@ -0,0 +1,76 @@ + + + + Testing img for issue 36 - rotateBefore, rotateAfter <?=$angle?> + + + +

Testing issue 36 - rotateBefore, rotateAfter

+ + + + +

Images used in test

+ +

The following images are used for this test.

+ + +


+

+ + + + +

Testcases used for each image

+ +

The following testcases are used for each image.

+ + +
+ + + + +

Applying testcase for each image

+ + +

+ +


+

+ + +

+ +


+

+ + + + diff --git a/webroot/test/test_issue36_rb-ra-45.php b/webroot/test/test_issue36_rb-ra-45.php new file mode 100644 index 0000000..a75dce8 --- /dev/null +++ b/webroot/test/test_issue36_rb-ra-45.php @@ -0,0 +1,78 @@ + + + + Testing img for issue 36 - rotateBefore, rotateAfter <?=$angle?> + + + +

Testing issue 36 - rotateBefore, rotateAfter

+ + + + +

Images used in test

+ +

The following images are used for this test.

+ + +


+

+ + + + +

Testcases used for each image

+ +

The following testcases are used for each image.

+ + +
+ + + + +

Applying testcase for each image

+ + +

+ +


+

+ + +

+ +


+

+ + + + diff --git a/webroot/test/test_issue36_rb-ra-90.php b/webroot/test/test_issue36_rb-ra-90.php new file mode 100644 index 0000000..3dce95f --- /dev/null +++ b/webroot/test/test_issue36_rb-ra-90.php @@ -0,0 +1,76 @@ + + + + Testing img for issue 36 - rotateBefore, rotateAfter <?=$angle?> + + + +

Testing issue 36 - rotateBefore, rotateAfter

+ + + + +

Images used in test

+ +

The following images are used for this test.

+ + +


+

+ + + + +

Testcases used for each image

+ +

The following testcases are used for each image.

+ + +
+ + + + +

Applying testcase for each image

+ + +

+ +


+

+ + +

+ +


+

+ + + +