<?php
	ini_set('display_errors', 1);
	ini_set('display_startup_errors', 1);
	error_reporting(E_ALL);
	
	
	
	$src = imagecreatefrompng('./items/src/icon_is1-min.png');
	$dest = imagecreatetruecolor(42,42);
	imagesavealpha($dest, true);
	$trans_color = imagecolorallocatealpha($dest, 0, 0, 0, 127);
    imagefill($dest, 0, 0, $trans_color);
	
	/* - - - >dest,  src, dest_x, dest_y, src_pos_x, src_pos_y, src_w, src_h */
	imagecopy($dest, $src, 0,0, 0, 0, 42, 42);

	header('Content-Type: image/png');
	imagepng($dest);
	
	imagedestroy($dest);
	imagedestroy($src);
	
?>
