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

  • Home
  • SEARCH
  • 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 1030645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:44:04+00:00 2026-05-16T12:44:04+00:00

PROBLEM When using Imagick::newPseudoImage to create a radial gradient, this error appears in the

  • 0

PROBLEM
When using Imagick::newPseudoImage to create a radial gradient, this error appears in the Apache HTTP error log and the radial gradient is not created:

PHP Fatal error: Uncaught exception
‘ImagickException’ with message
‘Unable to create new pseudo image:
radial-gradient:#FF0000-#FFFFFF’ in
/var/www/html/energy/scripts/rg.php:6\nStack
trace:\n#0
/var/www/html/energy/scripts/rg.php(6):
Imagick->newpseudoimage(150,150,
‘radial-gradient…’)\n#1 {main}\n
thrown in
/var/www/html/energy/scripts/rg.php on
line 6

RESEARCH
The PHP documentation for Imagick::newPseudoImage is lacking but according to link text (search for “radial”):

RADIAL_GRADIENT…Gradual radial
passing from one shade to
another…Returns a rendered radial
gradient image using the specified
image size. Specify the desired
shading as part of the filename (e.g.
radial-gradient:red-blue or
radial-gradient:#F00-#00F).

I’ve tried using “RADIAL_GRADIENT” instead of “radial-gradient” and every other combination I could think of. Utimately, I would like to feed Imagick::newPseudoImage RGB values instead of hex and save the created images to disk.

My PHP script

// Create a new imagick object.
$image = new Imagick();

// A new image with radial gradient fading from red to white, 150 by 150 pixels.
$image->newPseudoImage(150,150,’radial-gradient:#FF0000-#FFFFFF’);

// Set the image format to PNG.
$image->setImageFormat(‘png’);

// Output the image.
header(“Content-Type: image/png”);
echo $image;

My Environment
imagick 3.0.1RC1
ImageMagick 6.2.8.0
PHP 5.2.14
RedHat Enterprise Linux 5.5

Thank you 🙂

  • 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-05-16T12:44:05+00:00Added an answer on May 16, 2026 at 12:44 pm

    You are using ImageMagick 6.2.8; the latest is 6.6.3. There have been a lot of enhancements between those two versions. The documentation page you reference describes the latest version (as far as I know).

    Their download page has RPMs for installing the latest version on CentOS 5.4 (which is essentially identical to RedHat Enterprise Linux 5.4). These may well work on 5.5 as well – give them a try 🙂

    (I don’t know much about the PHP bindings, so can’t help you with that I’m afraid 🙂

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

Sidebar

Related Questions

I'm importing SVGs with imagick using this syntax $graphic = new Imagick($this->img); The problem
I am using this code, but is not working correctly. The problem is that
i have a problem using AS3 - Flash CS3 gives me this Error message:
i encountered a problem using the apache commons-net telnet api, and hope you can
I have a problem using preg_match. (I'm very new to regular expressions) if(preg_match('^/http:\/\/myWebsite\.com\/', $_SERVER['HTTP_REFERER']))
I have a syntax problem using Actionscript. Can I create new objects from inside
Answer Summary: Solved this problem using Jon Skeet's answer below. Here is the finished
I'm having a problem using iModelBinder with url in the format of http://localhost/controller/action/id/value the
I have a problem using Semaphore in threading.. this is my situation, i want
i have the following problem using jquery. I have sth like this <div id=yxz

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.