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 6104199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:48:53+00:00 2026-05-23T13:48:53+00:00

I need to create a PNG radial gradient with opacity. I’ve looked through GDLib

  • 0

I need to create a PNG radial gradient with opacity. I’ve looked through GDLib but I can’t see a way to generate radial gradients. Does anyone know of a way with GDlib or any other graphics library for PHP?

I suppose worst-case I could generate it pixel-by-pixel using GDLib but how does one even start to do the math on that?

The goal is to generate sexy lighting effect background PNGs for web pages. An example of the effect can be seen on the header here which uses this background image. I’ve tried generic white lighting effect PNGs but it doesn’t look anywhere near as good as tinted lighting, so my generated PNGs will take into account the website’s color scheme.

I assume server-side is the way to go because browser support for CSS radial gradients is so patchy.

  • 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-23T13:48:53+00:00Added an answer on May 23, 2026 at 1:48 pm

    Why not use a combination of imagecolorallocatealpha() and imageellipse() or imagefilledellipse()?

    Edit:

    See this class for an example of what I mean. You should be able to extend this to support alpha.

    Edit2:

    I have made some modifications to the class above to yield alpha support. It’s not perfect, but it works for ellipses and such:

    http://codepad.org/1eZ3Km0J

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

Sidebar

Related Questions

i need to create a object Image from import javax.microedition.lcdui.Image; using a file .png
I need to batch create images with text. Requirements: arbitrary size of bitmap PNG
I need to create a div with rounded corners containing an image that can
Probably this is often problem, but I can't solve it. I need to automaticallly
I need to create a sharp gradient for both the header and navigation text
I need to create a special category for magazine, but I don't know how.
I need to create an algorithm to layout some hierarchical data but have never
I need to create a box-shadow on some block element, but only (for example)
As part of a UI .net library I need to create corner PNG images
I need to create a silhouette of a PNG with Javascript/CSS. Is this possible?

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.