<?php

/**
 * File containing the pixelate tool handler
 *
 * @copyright Copyright (C) eZ Systems AS.
 * @license For full copyright and license information view LICENSE file distributed with this source code.
 * @version //autogentag//
 * @package ezie
 */
$prepare_action = new eZIEImagePreAction();
$http = eZHTTPTool::instance();
$region = null;
if ($prepare_action->hasRegion()) {
    $region = $prepare_action->getRegion();
}
// retrieve image dimensions
$analyzer = new eZIEImageAnalyzer($prepare_action->getImagePath());
$imageconverter = new eZIEezcImageConverter(eZIEImageToolPixelate::filter($analyzer->data->width, $analyzer->data->height, $region));
$imageconverter->perform($prepare_action->getImagePath(), $prepare_action->getNewImagePath());
eZIEImageToolResize::doThumb($prepare_action->getNewImagePath(), $prepare_action->getNewThumbnailPath());
echo (string) $prepare_action;
eZExecution::cleanExit();
<?php
/**
 * File containing the brightness filter handler
 *
 * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved.
 * @license http://ez.no/Resources/Software/Licenses/eZ-Business-Use-License-Agreement-eZ-BUL-Version-2.1 eZ Business Use License Agreement eZ BUL Version 2.1
 * @version 1.4.0
 * @package ezie
 */
$prepare_action = new eZIEImagePreAction();

$http = eZHTTPTool::instance();
$value  = $http->hasPostVariable( 'value' ) ? $http->variable( 'value' ) : 0;
$region = $prepare_action->hasRegion() ? $prepare_action->getRegion() : null;

$imageconverter = new eZIEezcImageConverter( eZIEImageFilterBrightness::filter( $value, $region ) );

$imageconverter->perform(
    $prepare_action->getImagePath(),
    $prepare_action->getNewImagePath()
);

eZIEImageToolResize::doThumb(
    $prepare_action->getNewImagePath(),
    $prepare_action->getNewThumbnailPath()
);

echo (string)$prepare_action;
eZExecution::cleanExit();
?>
Ejemplo n.º 3
0
<?php

/**
 * File containing the watermark tool handler
 *
 * @copyright Copyright (C) 1999-2013 eZ Systems AS. All rights reserved.
 * @license http://ez.no/licenses/gnu_gpl GNU GPL v2
 * @version //autogentag//
 * @package ezie
 */
$prepare_action = new eZIEImagePreAction();
$http = eZHTTPTool::instance();
if ($prepare_action->hasRegion() && $http->hasPostVariable('watermark_image')) {
    $imageconverter = new eZIEezcImageConverter(eZIEImageToolWatermark::filter($prepare_action->getRegion(), $http->variable('watermark_image')));
} else {
    // @todo Error handling
}
$imageconverter->perform($prepare_action->getImagePath(), $prepare_action->getNewImagePath());
eZIEImageToolResize::doThumb($prepare_action->getNewImagePath(), $prepare_action->getNewThumbnailPath());
echo (string) $prepare_action;
eZExecution::cleanExit();
Ejemplo n.º 4
0
<?php

/**
 * File containing the crop tool handler
 *
 * @copyright Copyright (C) eZ Systems AS.
 * @license For full copyright and license information view LICENSE file distributed with this source code.
 * @version 2014.07.0
 * @package ezie
 */
$prepare_action = new eZIEImagePreAction();
$http = eZHTTPTool::instance();
if ($prepare_action->hasRegion()) {
    $imageconverter = new eZIEezcImageConverter(eZIEImageToolCrop::filter($prepare_action->getRegion()));
} else {
    // @todo Error handling
}
$imageconverter->perform($prepare_action->getImagePath(), $prepare_action->getNewImagePath());
eZIEImageToolResize::doThumb($prepare_action->getNewImagePath(), $prepare_action->getNewThumbnailPath());
echo (string) $prepare_action;
eZExecution::cleanExit();
Ejemplo n.º 5
0
 * File containing the watermark tool handler
 *
 * @copyright Copyright (C) eZ Systems AS.
 * @license For full copyright and license information view LICENSE file distributed with this source code.
 * @version 2014.11.1
 * @package ezie
 */
$prepare_action = new eZIEImagePreAction();

$http = eZHTTPTool::instance();

if ( $prepare_action->hasRegion() && $http->hasPostVariable( 'watermark_image' ) )
{
    $imageconverter = new eZIEezcImageConverter(
        eZIEImageToolWatermark::filter(
            $prepare_action->getRegion(),
            $http->variable( 'watermark_image' )
        )
    );
}
else
{
    // @todo Error handling
}

$imageconverter->perform(
    $prepare_action->getImagePath(),
    $prepare_action->getNewImagePath()
);

eZIEImageToolResize::doThumb(
Ejemplo n.º 6
0
<?php
/**
 * File containing the blur filter handler
 *
 * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved.
 * @license http://ez.no/Resources/Software/Licenses/eZ-Business-Use-License-Agreement-eZ-BUL-Version-2.1 eZ Business Use License Agreement eZ BUL Version 2.1
 * @version 1.4.0
 * @package ezie
 * @todo Check if this is used/implemented at all (not referenced by the GUI)
 */
$prepare_action = new eZIEImagePreAction();

$http = eZHTTPTool::instance();
$value = $http->hasPostVariable( 'value' ) ? $http->variable( 'value' ) : 1;

$imageconverter = new eZIEezcImageConverter( eZIEImageFilterBlur::filter( $prepare_action->getRegion() ) );

$imageconverter->perform(
    $prepare_action->getImagePath(),
    $prepare_action->getNewImagePath()
);

eZIEImageToolResize::doThumb(
    $prepare_action->getNewImagePath(),
    $prepare_action->getNewThumbnailPath()
);

echo (string)$prepare_action;
eZExecution::cleanExit();
?>