$driver = Horde_Util::getFormData('driver', 'Im');
$test = Horde_Util::getFormData('test');
$convert = trim(`which convert`);
+$identify = trim(`which identify`);
$handler = new Horde_Log_Handler_Stream(fopen('/tmp/imagetest.log','a+'));
$logger = new Horde_Log_Logger($handler);
case 'multipage':
$time = xdebug_time_index();
$image = getImageObject(array('filename' => 'two_page.tif.tiff'));
+
$first = true;
foreach ($image as $index => $imObject) {
if (!$first) {
*
* @param array $params Any additional parameters
*
- * @return Horde_Image object | PEAR_Error
+ * @return Horde_Image_Base object | PEAR_Error
*/
function getImageObject($params = array())
{
// Always pass the convert parameter to be consistent when profiling.
$context = array('tmpdir' => Horde::getTempDir(),
- 'convert' => $GLOBALS['convert']);
+ 'convert' => $GLOBALS['convert'],
+ 'logger' => $GLOBALS['logger'],
+ 'identify' => $GLOBALS['identify']);
$params['context'] = $context;
return Horde_Image::factory($GLOBALS['driver'], $params);
}
Horde_Registry::appInit('horde', array('authentication' => 'none'));
$allTests = array(
- 'testInitialState' => 'Test initial state. Solid blue square',
- '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.',
- '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.',
+// 'testInitialState' => 'Test initial state. Solid blue square',
+// '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.',
+// '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',
);
?>
<thead><td>Effect</td><td>Im</td><td>Imagick</td></thead>
<?php
foreach ($allTests as $name => $description) {
- echo '<tr><td text-align="top">' . $description . '</td><td>' . Horde::img('im.php?test=' . $name, '', '', '') . '</td>' .
- '<td text-align="top">' . Horde::img('im.php?test=' . $name . '&driver=Imagick', '', '', '') . '</td></tr>';
+ echo '<tr><td text-align="top">' . $description . '</td><td>' . Horde::img('im.php?test=' . $name, '', '', '') . '</td>' . '</tr>';
+ //'<td text-align="top">' . Horde::img('im.php?test=' . $name . '&driver=Imagick', '', '', '') . '</td></tr>';
}
echo '</table>';
?></body></html>