*
* @package Horde_Image
*/
-define('HORDE_BASE', '/var/www/html/horde');
-$horde_authentication = 'none';
-require_once HORDE_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/../../../horde/lib/Application.php';
+Horde_Registry::appInit('horde', array('authentication' => 'none'));
$db = $GLOBALS['injector']->getInstance('Horde_Db_Adapter_Base');
// Putting these here so they don't interfere with timing/memory data when
$logger = new Horde_Log_Logger($handler);
switch ($test) {
+
+case 'multipage':
+ $time = xdebug_time_index();
+ $image = getImageObject(array('filename' => 'two_page.tif.tiff'));
+ $first = true;
+ foreach ($image as $index => $imObject) {
+ if (!$first) {
+ $image->display();
+ } else {
+ $first = false;
+ }
+ }
+ logThis($test, $time, xdebug_peak_memory_usage());
+
case 'testInitialState':
// Solid blue background color - basically tests initial state of the
// Horde_Image object.
* Test harness for generating the test images for Horde_Image tests
*/
-define('HORDE_BASE', '/var/www/html/horde');
-require_once HORDE_BASE . '/lib/Application.php';
+require_once dirname(__FILE__) . '/../../../horde/lib/Application.php';
+Horde_Registry::appInit('horde', array('authentication' => 'none'));
$allTests = array(
'testInitialState' => 'Test initial state. Solid blue square',
'testPolaroidstackBlueBG' => 'Polaroid stack on a blue background',
//'testInitialStateAfterLoad' => 'Initial state after loading an existing image.',
'testResize' => 'Test resize method.',
+ 'multipage' => 'Test Multipage tiffs',
);
?>
<html>
<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>';
+ 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 '</table>';
?></body></html>