protected function mockBox($im) { imagealphablending($im, true); imagesavealpha($im, true); $box = new Box($im); $box->setFontFace(__DIR__ . '/LinLibertine_R.ttf'); // http://www.dafont.com/franchise.font $box->setFontColor(new Color(255, 75, 140)); $box->setFontSize(16); $box->setBackgroundColor(new Color(0, 0, 0)); $box->setBox(0, 10, imagesx($im), 150); return $box; }