����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 3.16.125.156
Web Server : LiteSpeed
System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : builderbox ( 1072)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/cpanel/ea-php74/root/usr/share/tests/pecl/imagick/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/cpanel/ea-php74/root/usr/share/tests/pecl/imagick/tests/077_Imagick_frameImage_im7.phpt
--TEST--
Test Imagick, frameImageWithComposite
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x700;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$color = 'rgba(255,0,255,50)';
$width = 5;
$height = 5;
$innerBevel = 3;
$outerBevel = 3;

function frameImage($color, $width, $height, $innerBevel, $outerBevel, $blendOption) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");

    $width = $width + $innerBevel + $outerBevel;
    $height = $height + $innerBevel + $outerBevel;

    if ($blendOption === null) {
        $imagick->frameimage(
            $color,
            $width,
            $height,
            $innerBevel,
            $outerBevel
        );
    }
    else {
        $imagick->frameImageWithComposite(
                $color,
                $width,
                $height,
                $innerBevel,
                $outerBevel,
                $blendOption
        );
    }

    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) {
        echo "Failed to generate image.";
    }

    return $imagick;
}

$blendOptions = [
    "null" => null,
    "COMPOSITE_NO" => Imagick::COMPOSITE_NO,
    "COMPOSITE_BLEND" => Imagick::COMPOSITE_BLEND,
    "COMPOSITE_COPYRED" => Imagick::COMPOSITE_COPYRED,
    "COMPOSITE_ATOP" => Imagick::COMPOSITE_ATOP,
    "COMPOSITE_OVER" => Imagick::COMPOSITE_OVER,
];

foreach ($blendOptions as $name => $blendOption) {
    $imagick = frameImage($color, $width, $height, $innerBevel, $outerBevel, $blendOption) ;
    $filename = "077_frame_" . $name . ".png";
    // $imagick->writeImage($filename);
}

echo "Ok";
?>
--EXPECTF--
Ok

Youez - 2016 - github.com/yon3zu
LinuXploit