当前位置: 首页>>代码示例>>PHP>>正文


PHP eZIEImagePreAction类代码示例

本文整理汇总了PHP中eZIEImagePreAction的典型用法代码示例。如果您正苦于以下问题:PHP eZIEImagePreAction类的具体用法?PHP eZIEImagePreAction怎么用?PHP eZIEImagePreAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了eZIEImagePreAction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: eZIEImagePreAction

<?php

/**
 * File containing the ezie no save & quit menu item 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();
// @todo Use the cluster handler code
// delete all the images in working directory
// delete working directory
$working_folder = eZDir::dirpath($prepare_action->getImagePath());
// deletes the working folder recursively
eZDir::recursiveDelete($working_folder);
// @todo delete the user directory if empty
echo json_encode(new StdClass());
eZExecution::cleanExit();
开发者ID:ezsystemstraining,项目名称:ez54training,代码行数:20,代码来源:no_save_and_quit.php

示例2: eZIEImagePreAction

<?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();
开发者ID:ezsystemstraining,项目名称:ez54training,代码行数:23,代码来源:tool_pixelate.php

示例3: eZIEImagePreAction

<?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();
?>
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:30,代码来源:filter_brightness.php

示例4: eZIEImagePreAction

<?php

/**
 * File containing the rotation tool handler
 *
 * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved.
 * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
 * @version 1.4.0
 * @package kernel
 */
$prepare_action = new eZIEImagePreAction();
$http = eZHTTPTool::instance();
// @todo change hasvariable to haspostvariable
$angle = $http->hasVariable('angle') ? $http->variable('angle') : 0;
$color = $http->hasVariable('color') ? $http->variable('color') : 'FFFFFF';
// @todo change hasvariable to haspostvariable
if ($http->hasVariable('clockwise') && $http->variable('clockwise') == 'yes') {
    $angle = 360 - intval($angle);
}
$imageconverter = new eZIEezcImageConverter(eZIEImageToolRotation::filter($angle, $color));
$imageconverter->perform($prepare_action->getImagePath(), $prepare_action->getNewImagePath());
eZIEImageToolResize::doThumb($prepare_action->getNewImagePath(), $prepare_action->getNewThumbnailPath());
echo (string) $prepare_action;
eZExecution::cleanExit();
开发者ID:legende91,项目名称:ez,代码行数:24,代码来源:tool_rotation.php

示例5: eZIEImagePreAction

<?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();
开发者ID:heliopsis,项目名称:ezie,代码行数:21,代码来源:tool_watermark.php

示例6: eZIEImagePreAction

<?php

/**
 * File containing the brightness filter handler
 *
 * @copyright Copyright (C) 1999-2013 eZ Systems AS. All rights reserved.
 * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
 * @version 5.2.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();
开发者ID:jordanmanning,项目名称:ezpublish,代码行数:19,代码来源:filter_brightness.php

示例7: eZIEImagePreAction

<?php
/**
 * File containing the ezie horizontal flip 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();

$imageconverter = new eZIEezcImageConverter( eZIEImageToolFlipVertically::filter() );

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

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

echo (string)$prepare_action;
eZExecution::cleanExit();
?>
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:26,代码来源:tool_flip_ver.php

示例8: eZIEImagePreAction

<?php

/**
 * File containing the saturation 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 kernel
 * @todo Check if this is actually used/implemented
 */
$prepare_action = new eZIEImagePreAction();
$http = eZHTTPTool::instance();
if ($http->hasPostVariable("saturation")) {
    $saturation = $http->variable("saturation");
}
eZIEImageToolSaturation::toolSaturation($prepare_action->getImagePath(), $prepare_action->getNewImagePath(), $saturation);
eZIEImageToolResize::doThumb($prepare_action->getNewImagePath(), $prepare_action->getNewThumbnailPath());
echo (string) $prepare_action;
eZExecution::cleanExit();
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:20,代码来源:tool_saturation.php

示例9: eZIEImagePreAction

<?php
/**
 * 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()
);
开发者ID:ataxel,项目名称:tp,代码行数:31,代码来源:tool_watermark.php

示例10: eZIEImagePreAction

<?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();
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:21,代码来源:tool_crop.php

示例11: eZIEImagePreAction

<?php
/**
 * File containing the black & white 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 kernel
 */
$prepare_action = new eZIEImagePreAction();

$http = eZHTTPTool::instance();

$region = null;
if ( $prepare_action->hasRegion() )
{
    $region = $prepare_action->getRegion();
}

$imageconverter = new eZIEezcImageConverter( eZIEImageFilterBW::filter( $region ) );

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

eZIEImageToolResize::doThumb(
    $prepare_action->getNewImagePath(),
    $prepare_action->getNewThumbnailPath()
);
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:30,代码来源:filter_bw.php

示例12: eZIEImagePreAction

<?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 2014.11.1
 * @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(
开发者ID:ataxel,项目名称:tp,代码行数:31,代码来源:tool_pixelate.php

示例13: eZIEImagePreAction

<?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();
?>
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:30,代码来源:filter_blur.php

示例14: eZIEImagePreAction

<?php

/**
 * File containing the ezie no save & quit menu item 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();
$imageId = $prepare_action->getImageId();
$imageVersion = $prepare_action->getImageVersion();
$imageAttribute = eZContentObjectAttribute::fetch($imageId, $imageVersion);
// Save the class attribute
$imageHandler = $prepare_action->getImageHandler();
$imageHandler->initializeFromFile($prepare_action->getImagePath(), $imageHandler->attribute('alternative_text'), $imageHandler->attribute('original_filename'));
// TODO: what's $contentobjectattribute (ask jerome) ?
$imageHandler->store($imageAttribute);
// remove view cache if needed
eZContentCacheManager::clearObjectViewCacheIfNeeded($imageAttribute->attribute('contentobject_id'));
// delete all the images in working directory
// delete working directory
$working_folder = eZDir::dirpath($prepare_action->getImagePath());
// deletes the working folder recursively
eZDir::recursiveDelete($working_folder);
// new attribute
$imageAttribute = eZContentObjectAttribute::fetch($imageId, $imageVersion);
// @todo Use proper JSON, but this will do for now.
$tpl = eZTemplate::factory();
$tpl->setVariable('ezie_ajax_response', true);
开发者ID:ezsystemstraining,项目名称:ez54training,代码行数:31,代码来源:save_and_quit.php

示例15: eZIEImagePreAction

<?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.11.1
 * @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()
);
开发者ID:ataxel,项目名称:tp,代码行数:31,代码来源:tool_crop.php


注:本文中的eZIEImagePreAction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。