note 47035 deleted from ref.image by tularis

From: Date: Sun, 29 Jun 2008 21:11:00 +0000
Subject: note 47035 deleted from ref.image by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-140967@lists.php.net to get a copy of this message
Note Submitter: andreaskalsch at gmx dot de ---- These two are functions to flip an image (in true color) - vertically: function image_flip_vertical($im) { $x_i = imagesx($im); $y_i = imagesy($im); $im_ = imagecreatetruecolor($x_i, $y_i); for ($x = 0; $x < $x_i; $x++) { for ($y = 0; $y < $y_i; $y++) { imagecopy($im_, $im, $x_i - $x - 1, $y, $x, $y, 1, 1); } } return $im_; } - horizontally: function image_flip_horizontal($im) { $x_i = imagesx($im); $y_i = imagesy($im); $im_ = imagecreatetruecolor($x_i, $y_i); for ($x = 0; $x < $x_i; $x++) { for ($y = 0; $y < $y_i; $y++) { imagecopy($im_, $im, $x, $y_i - $y - 1, $x, $y, 1, 1); } } return $im_; } I think there is no gd function to do the same.

« previous php.notes (#140967) next »