Something to the tune of:
$gradient->newPseudoImage($width, $height, "gradient:transparent-transparent");
Basically I’m looking to create a wet floor effect for uploaded images. So far, it seems you can only create a gradient into a solid color.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
It turns out if the image you are cloning does not have an alpha channel set you can’t create a gradient from an image to a transparent background (at least, I was unable to find a way) What you can do is test for the alpha channel and set it if need be. Here’s the working code if you’re interested:
This will take a run of the mill jpg and convert it into a png with a reflection fading into a transparent background.