2 Color Gradient - How to emphasize 30/70 distribution
Posted: 2011-10-09T19:03:25-07:00
This command properly draws a 1 pixel x 100 pixel green to transparent gradient which is the echo'd to the screen.
exec ("convert -size 1x100 gradient:green-none ".$_SERVER['DOCUMENT_ROOT']."/temp/FAFAFA_trans2.png");
I have then increased it size and made it viewable. All that worked just fine.
echo "<img src='/temp/FAFAFA_trans2.png' width='100' height='500'>";
However, it's a 50/50 bleed of green and transparent meeting in the middle. I'm looking to have that transparency fade out much sooner. more like a 20/80 gradient. How can I create such an 'on the fly' gradient image weighting the strength of one color vs another.
I have created two simple gradients. Please have a look at this link: http://www.titeurl.com/imagick.
The first one was actually created using the code above ie;
However, I cannot find an example in the Imagemagick documentation showing how I might adjust the length of the green vs the transparent. So for instance, if I am creating a 100 pixel gradient of green and white, what if I wish for 20% to be green and 80% whilte or something like that.
Thanks.
Jay
exec ("convert -size 1x100 gradient:green-none ".$_SERVER['DOCUMENT_ROOT']."/temp/FAFAFA_trans2.png");
I have then increased it size and made it viewable. All that worked just fine.
echo "<img src='/temp/FAFAFA_trans2.png' width='100' height='500'>";
However, it's a 50/50 bleed of green and transparent meeting in the middle. I'm looking to have that transparency fade out much sooner. more like a 20/80 gradient. How can I create such an 'on the fly' gradient image weighting the strength of one color vs another.
I have created two simple gradients. Please have a look at this link: http://www.titeurl.com/imagick.
The first one was actually created using the code above ie;
However, I cannot find an example in the Imagemagick documentation showing how I might adjust the length of the green vs the transparent. So for instance, if I am creating a 100 pixel gradient of green and white, what if I wish for 20% to be green and 80% whilte or something like that.
Thanks.
Jay