note 116104 added to function.imagettfbbox

From: Date: Mon, 10 Nov 2014 07:50:33 +0000
Subject: note 116104 added to function.imagettfbbox
Groups: php.notes php.notes 
Request: Send a blank email to php-notes+get-200861@lists.php.net to get a copy of this message
the code in the example is wrong. this worked for me to calculate the center of the image. the provided calculation added two random subtractions to the end of the calculation. $x = ceil($text_box[0] + (imagesx($image) / 2) - ($text_box[4] / 2)); $y = ceil($text_box[1] + (imagesy($image) / 2) - ($text_box[5] / 2)); ---- Server IP: 72.52.91.14 Probable Submitter: 173.218.168.124 ---- Manual Page -- http://php.net/manual/en/function.imagettfbbox.php Edit -- https://master.php.net/note/edit/116104 Del: integrated -- https://master.php.net/note/delete/116104/integrated Del: useless -- https://master.php.net/note/delete/116104/useless Del: bad code -- https://master.php.net/note/delete/116104/bad+code Del: spam -- https://master.php.net/note/delete/116104/spam Del: non-english -- https://master.php.net/note/delete/116104/non-english Del: in docs -- https://master.php.net/note/delete/116104/in+docs Del: other reasons-- https://master.php.net/note/delete/116104 Reject -- https://master.php.net/note/reject/116104 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200861) next »