<?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();
/** * Resizes an image * * @param string $src Source image path * @param string $dst Destination image path * @param int $width Resize width * @param int $height Resize height * * @return void */ static function resize($src, $dst, $width, $height) { $imageconverter = new eZIEezcImageConverter(self::filter($width, $height)); $imageconverter->perform($src, $dst); }