Skip to content

Instantly share code, notes, and snippets.

@trepmal
Created December 13, 2013 05:12
Show Gist options
  • Save trepmal/7940059 to your computer and use it in GitHub Desktop.
Save trepmal/7940059 to your computer and use it in GitHub Desktop.
imageftbbox() returns an array with 8 elements representing four points making the bounding box of the text http://www.php.net/manual/en/function.imageftbbox.php
// attempting to understand imageftbbox()'s output
// Array
// (
// [0] => -1 lower left corner, X position
// [1] => 6 lower left corner, Y position
// [2] => 115 lower right corner, X position
// [3] => 6 lower right corner, Y position
// [4] => 115 upper right corner, X position
// [5] => -21 upper right corner, Y position
// [6] => -1 upper left corner, X position
// [7] => -21 upper left corner, Y position
// )
/*
|7 |5
___|________________|___
6 | | 4
| |
| |
| |
| |
___|________________|___
0 | | 2
|1 |3
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment