Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8829229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:47:16+00:00 2026-06-14T07:47:16+00:00

I have attempted to create a png with imagemagick with the following code. <?php

  • 0

I have attempted to create a png with imagemagick with the following code.

<?php
/* Create some objects */
$image = new Imagick();
$draw = new ImagickDraw();
$pixel = new ImagickPixel( 'gray' );

/* New image */
$image->newImage(800, 75, $pixel);

/* Black text */
$draw->setFillColor('black');

/* Font properties */
$draw->setFont('Oxin_free_promo.ttf');
$draw->setFontSize( 30 );

/* Create text */
$image->annotateImage($draw, 10, 45, 0, 'The quick brown fox jumps over the lazy dog');

/* Give image a format */
$image->setImageFormat('png');

/* Output the image with headers */
header('Content-type: image/png');
echo $image;

But I keep getting the errors below. /usr/local/zend/tmp/ is chmod’d to be 777 and owned by daemon:zend and magick-* doesnt exist. Any ideas?

httpd: FreeType library is not available `/Users/gareth.williams/Sites/_tests/texttoimg/Oxin_free_promo.ttf'.
httpd: Postscript delegate failed `/usr/local/zend/tmp/magick-tmfNBDIx': No such file or directory.
PHP Fatal error:  Uncaught exception 'ImagickException' with message 'Unable to annotate image'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T07:47:17+00:00Added an answer on June 14, 2026 at 7:47 am

    Look at the error messages given, it says the problem right there.

    “FreeType library is not available” – ImageMagick uses the FreeType library to render fonts, you have given it a TTF to use, and it says FreeType is not installed, so it can not use the font. Install FreeType, then reinstall/recompile ImageMagick to get FreeType support.

    The second error is probably ImageMagick trying to fallback to rendering the font using its postscript rasterisation support, usually this is via ghostscript (gs), hence “Postscript delegate failed”. Either ghostscript is not available, or the path for the temporary file it asks ghostscript to render too/from is not writable. Could be fixed by installing ghostscript and making sure that temporary directory has full write access, as people mention in the comments to the question.

    To confirm these causes, use the -list option of convert.

    • convert -list format : This will show you the supported file types, look for TTF, make sure it has at least r-- status, it should say something like "TTF* TTF r-- TrueType font (Freetype 2.2.1)" if FreeType is installed correctly.

    • convert -list delegate : This will show handling of delegated types and the command line used. It will be using one of the ps converters as a fallback.

    As I say, easiest fix is to install FreeType, then recompile/reinstall ImageMagick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the following code, upload.php, to try to have someone upload a
This is the first time I have attempted to create a .dll, that will
I'm new to regex, i have attempted a preg_match and the result should display
Like lots of askers on SO, I'm relatively new to java and have attempted
I have some code that attempts to test whether my application is running with
I have attempted to create a function that will replace multiple regular expression values
I'm working with a SQL database (still fairly new to it) and have attempted
I have created a skin for DotNetNuke 5.x and I attempted to do as
I have attempted to make my first 3 tier application. In the process I
I have a two-column primary key on a table. I have attempted to alter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.