Witam w jaki sposób z grafiki o wymiarach 1280x960 wyciąć 20px z prawej strony i 80 z dołu?
Może ktoś mi podać jakieś funkcje? Pozdrawiam.
<?php ?>
<?php imagecopy ( $dst_im, $src_im, 0, 0, 0, 0, 1260, 880 ) ?>
<?php $img = imagecreatefromjpeg('portfolio/kiki.jpg'); $w = imagesx($img); $h = imagesy($img); $trans = imagecolortransparent($img); if($trans >= 0) { $rgb = imagecolorsforindex($img, $trans); $oldimg = $img; $img = imagecreatetruecolor(50,20); $color = imagecolorallocate($img,$rgb['red'],$rgb['green'],$rgb['blue']); //imagefilledrectangle($img,0,0,50,20,$color); //imagecopyresampled($img,$oldimg,50,50,0,0,$w-50,$h-100,$w,$h); imagecopy($img,$oldimg,0,0,0,0,40,40); //imagecopyresampled($img,$oldimg,0,0,0,0,50,20,$w,$h); } imagegif($img,'portfolio/out.gif'); ?>
<?php $lewo = 50; $prawo = 100; $gora = 30; $dol = 100; $fotka = 'obraz.jpg'; $f = imagecreatefromjpeg($fotka); $x = imagesx($f); $y = imagesy($f); $nowa = imagecreatetruecolor(70,70); imagecopyresampled($nowa,$f,0,0,0+$lewo,0+$gora,$x,$y,$x,$y); //header("Content-type: image/jpg"); imagejpeg($nowa,"obraz_s.jpg",90); ?>