1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
<?php
/**
* Test harness for generating the test images for Horde_Image tests
*/
require_once __DIR__ . '/conf.php';
require_once $horde . '/lib/Application.php';
Horde_Registry::appInit(
'horde',
array('authentication' => 'none', 'session_control' => 'none')
);
header('Content-Type: text/html');
$allTests = array(
'testInitialState' => 'Test initial state. Solid blue square',
'testDefaultImageFormatDuringLoad' => 'Should load as default image type of PNG even though source file is JPG',
'testForceImageFormatDuringLoad' => 'Forces image format to JPG during loadFile (Default is PNG)',
'testChangeImageFormatAfterLoad' => 'Changes image format after loaded from file (Should be JPG)',
'testPrimitivesTransparentBG' => 'Transparent background, various primitives. Cirlce should be above the rectangles.',
'testTransparentBGWithBorder' => 'Test transparent background with border preserving transparency.',
'testTransparentPrimitivesReversed' => 'Test ordering of primitives. This should show the circle *below* the rectangles.',
'testAnnotateImage' => 'Annotate Image with Hello World in center left',
'testPolylineCircleLineText' => 'various other primitives, as well as state of stroke color, width etc...',
'testRoundCorners' => 'Rounded corners with transparent background.',
'testRoundCornersRedBG' => 'Rounded corners with red background.',
'testRoundCornersDropShadowTransparentBG' => 'Rounded corners with a drop shadow on a transparent background.',
'testRoundCornersDropShadowYellowBG' => 'Rounded corners, with a drop shadow on a yellow background',
'testBorderedDropShadowTransparentBG' => 'Thumbnail with border and drop shadow over a transparent background.',
'testBorderedDropShadowTransparentLoadString' => 'Same as above, but using loadString after the image has been instantiated.',
'testBorderedDropShadowBlueBG' => 'Thumbnail with border, drop shadow over a blue background.',
'testPolaroidTransparentBG' => 'Polaroid effect with transparent background.',
'testPolaroidBlueBG' => 'Polaroid effect with blue background.',
'testPlainstackTransparentBG' => 'Thumbnail stack on transparent background.',
'testPlainstackBlueBG' => 'Thumbnail stack on a blue background.',
'testRoundstackTransparentBG' => 'Thumbnail stack with rounded borders on a transparent background',
'testRoundstackBlueBG' => 'Thumbnail stack, rounded corners on a blue background',
'testPolaroidstackTransparentBG' => 'Polaroid stack on a transparent background.',
'testPolaroidstackBlueBG' => 'Polaroid stack on a blue background',
'testInitialStateAfterLoad' => 'Initial state after loading an existing image.',
'testResize' => 'Test resize method.',
'multipage' => 'Test Multipage tiffs',
'liquid' => 'Test Seam Carving',
'smart' => 'Test Smart Crop (Center of Edginess)',
'crop' => 'Basic Crop Test'
);
?>
<html>
<head>
<title>Horde_Image Tests</title>
<style type="text/css">
img {
max-width: 600px;
}
</style>
</head>
<body style="background-color:gray">
<table>
<thead><td>Effect</td><td>Im</td><td>Imagick</td><td>Gd</td><td>Svg</td></thead>
<?php
$url = new Horde_Url('im.php');
foreach ($allTests as $name => $description) {
echo '<tr><td text-align="top">' . $description . '</td><td>';
echo '<img src="' . $url->copy()->add('test', $name) . '" />';
echo '</td><td text-align="top">';
echo '<img src="' . $url->copy()->add(array('test' => $name, 'driver' => 'Imagick')) . '" />';
echo '</td><td text-align="top">';
echo '<img src="' . $url->copy()->add(array('test' => $name, 'driver' => 'Gd')) . '" />';
echo '</td><td text-align="top">';
echo '<img src="' . $url->copy()->add(array('test' => $name, 'driver' => 'Svg')) . '" />';
echo '</td></tr>';
}
echo '</table>';
?></body></html>
|