<?php $img = imagecreatefromjpeg('Hydrangeas.jpg'); $imgx = (imagesx($img) / 100)*20; $imgy = (imagesy($img) / 100)*20; $tlo = imagecreatetruecolor(800, 800); $biały = imagecolorallocate($tlo, 255, 255, 255); imagefill($tlo, 0, 0, $biały); for($x=$imgx;$x==800;$x+=$x){ imagecopyresampled($tlo, $img, $x, 0, 0, 0, $imgx, $imgy, imagesx($img), imagesy($img)); } imagejpeg($tlo , null, 100); ?>