note 41314 added to function.imagecopyresampled

From: Date: Tue, 06 Apr 2004 10:05:15 +0000
Subject: note 41314 added to function.imagecopyresampled
Groups: php.notes 
Request: Send a blank email to php-notes+get-67701@lists.php.net to get a copy of this message
The PHP/GD2 combo included with Debian Woody still seems to ignore the srcX and srcY, so I whipped up this drop-in replacement to get around it: <?php function _imagecopyresampled( $dst_im, $src_im, $dstX, $dstY, $srcX, $srcY, $dstW, $dstH, $srcW, $srcH) { // to fix gd2 not using the srcX and srcY with imagecopyresampled :X $image = imagecreatetruecolor($srcW, $srcH); imagecopy($image, $src_im, 0, 0, $srcX, $srcY, $srcW, $srcH); imagecopyresampled( $dst_im, $image, $dstX, $dstY, 0, 0, $dstW, $dstH, $srcW, $srcH); imagedestroy($image); } ?> ---- Manual Page -- http://www.php.net/manual/en/function.imagecopyresampled.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41314 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41314&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41314&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67701) next »