note 62029 added to ref.image

From: Date: Fri, 17 Feb 2006 19:14:21 +0000
Subject: note 62029 added to ref.image
Groups: php.notes 
Request: Send a blank email to php-notes+get-103929@lists.php.net to get a copy of this message
<?php // This is a correction to the image-flipping function I posted previously. // The bitwise ands (&) were incorrectly written as logical ands (&&). // Needless to say, that breaks the function in obnoxious--if amusing--ways. define("VERTICAL", 1); define("HORIZONTAL", 2); function imageflip($image, $mode) { $w = imagesx($image); $h = imagesy($image); $flipped = imagecreate($w, $h); if ($mode & VERTICAL) { for ($y = 0; $y < $h; $y++) { imagecopy($flipped, $image, 0, $y, 0, $h - $y - 1, $w, 1); } } if ($mode & HORIZONTAL) { for ($x = 0; $x < $w; $x++) { imagecopy($flipped, $image, $x, 0, $w - $x - 1, 0, 1, $h); } } return $flipped; } ?> ---- Server IP: 216.194.113.175 Probable Submitter: 66.92.15.102 ---- Manual Page -- http://www.php.net/manual/en/ref.image.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+62029 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+62029&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+62029&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+62029&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+62029&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+62029&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+62029&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+62029&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+62029&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#103929) next »