note 29564 deleted from function.imagerectangle by didou

From: Date: Tue, 19 Aug 2003 11:39:58 +0000
Subject: note 29564 deleted from function.imagerectangle by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-54653@lists.php.net to get a copy of this message
Note Submitter: julian@netzkind.at ---- 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?

« previous php.notes (#54653) next »