note 29564 added to function.imagerectangle

From: Date: Mon, 17 Feb 2003 19:59:40 +0000
Subject: note 29564 added to function.imagerectangle
Groups: php.notes 
Request: Send a blank email to php-notes+get-44108@lists.php.net to get a copy of this message
In reply to carl dot luvs dot spam at strategySPAMMEforward dot com: Think about it. You have an image with width and height 100 px. Let's count them, thats 1,2,3,4,5,6,...,100 = 100 pixels But with imagerectangle, you start at 0. so your count for an image 100x100px goes more like this: 0,1,2,3,4,...., 99 = 100 pixels So the rightmost bottom pixel of yours is named 99x99, but it is the 100th pixel from left, and the 100th pixel from the top. Confusing, ah? So decrementing width and height by 1 to have a line all around the image is correct, ain't it? -- http://www.php.net/manual/en/function.imagerectangle.php http://master.php.net/manage/user-notes.php?action=edit+29564 http://master.php.net/manage/user-notes.php?action=delete+29564 http://master.php.net/manage/user-notes.php?action=reject+29564

« previous php.notes (#44108) next »