|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-11-15 06:23 UTC] lcalvert at mn dot rr dot com
Description: ------------ After a day or so (100plus refreshes) of running this code the following two errors come up quite often Warning: imagepstext(): libt1 returned error 11 Warning: imagepstext(): libt1 returned error 14 Reproduce code: --------------- http://pastebin.com/429956 Actual result: -------------- After a day or so (100plus refreshes) of running this code the following two errors come up quite often Warning: imagepstext(): libt1 returned error 11 Warning: imagepstext(): libt1 returned error 14 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 09:00:01 2025 UTC |
<?php session_start(); $alphanum = "ACDEFGHJKLMNPQRSTUVWXYZ346789abcdefghijkmnopqrtuvwxy"; $rand = substr(str_shuffle($alphanum), 0, 5); $width=100; $height=40; $font = imagepsloadfont("fonts/new.pfb"); $im = @imagecreate ($width,$height); $background_color = imagecolorallocate ($im, 53, 12, 28); $text_color = imagecolorallocate ($im, rand(200,255),rand(200,255),rand(200,255)); // Random Text $r=0.20;$g=0.60;$b=0.20; for ($i=1;$i<=3;$i++) { $value=rand(200, 255); $randomcolor = imagecolorallocate ($im , $value*$r, $value*$g,$value*$b); imagefilledellipse($im,rand(0,$width-10),rand(0,$height-3),rand(20,70),rand(20,70),$randomcolor); } imagerectangle($im,0,0,$width-1,$height-1,$text_color); imagepstext($im, $rand, $font, 32, $text_color, $black, 12, 28); imagepsfreefont($font); $rand = strtolower($rand); $_SESSION['image_random_value'] = md5($rand); header("Pragma: no-cache"); header('Content-type: image/jpeg'); imagejpeg($im,'',100); imagedestroy($im); ?>How about trying to pass the FULL path to new.pfb here: $font = imagepsloadfont("fonts/new.pfb");