php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58810 Uncaught exception 'ImagickException' with message 'Unable to annotate image'
Submitted: 2009-08-14 23:40 UTC Modified: 2009-10-05 09:23 UTC
From: itw1 at 163 dot com Assigned:
Status: Not a bug Package: imagick (PECL)
PHP Version: 5.2.6 OS:
Private report: No CVE-ID: None
 [2009-08-14 23:40 UTC] itw1 at 163 dot com
Description:
------------
Fatal error: Uncaught exception 'ImagickException' with message 'Unable to annotate image' in /www/dlsite/1.php:16 Stack trace: #0 /www/xxx/xxx.php(16): Imagick->annotateimage(Object(ImagickDraw), 10, 45, 0, '1111') #1 {main} thrown in /www/xxx/xxx.php on line 16


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-15 07:40 UTC] mkoppanen@php.net
How is this a bug?
 [2009-10-05 09:20 UTC] nilayanand at gmail dot com
This exception usually occurs when you do have unavailable (wrong) font set in Draw object.
 [2009-10-05 09:23 UTC] mkoppanen@php.net
Still, 

try-catch block can be used to catch the exception. I don't see how this is a bug.
 [2010-10-01 19:12 UTC] s dot m dot boser at gmail dot com
I am having same problem. The script is running fine in XAMPP with imagick 2.3 (windows dll). But When I upload the same script in Linux server, with same font settings, its showing this error. The server imagick version is 3.0 (PECL's Imagick 3.0)
 [2012-10-11 15:33 UTC] aditya19897 at gmail dot com
hi i was facing the same problem, 

but i just made changes to the font setting line "$draw->setFont('Bookman-
DemiItalic');"in the script i.e use only those fonts that are installed on your 
server/pc or for 
testing purpose remove the font setting line all together

hope this solves your problem
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Aug 07 13:01:24 2020 UTC