Page 1 of 1

Transparent Gradients

Posted: 2012-11-05T13:22:41-07:00
by BradChesney79
The end result I am looking for is a ten pixel wide border that goes from fully opaque on the inner edge to fully transparent on the outer edge for all four sides.

Step 1: I think I am going to have to check that the alpha channels are available in conjunction with using the matte property.

Step 2: Then I think I am going to have to define a calculated 1 pixel wide region to set to a partial transparency and repeat that ~40 times to get the corners right.

Step 3: Lastly I will set the image type and compression level before writing to the cache directory on disk.

The problem is that my Google searching is not returning the right results to help me.

Would anyone be so kind as to provide search terms that will help me read up on what I need to know?
(Links to pertinent web pages would also be much appreciated.)

I am having trouble understanding what I need to do for Steps 1 & 2.

This eyesore is just a two minute example of the effect I would like to create programmatically.

Re: Transparent Gradients

Posted: 2012-11-05T13:25:41-07:00
by Bonzo
Is this the sort of thing you are after - Anthony's examples

Re: Transparent Gradients

Posted: 2012-11-05T13:26:58-07:00
by BradChesney79
PHP via Apache on Debian using the PECL implementation of imagick.

@Bonzo, holy crap-- that is it exactly. Thanks.

Re: Transparent Gradients

Posted: 2012-11-05T13:29:20-07:00
by Bonzo
Thanks BradChesney79 - it is just knowing where to look 8)

Things will probably not be as easy using Imagick :(

Re: Transparent Gradients

Posted: 2012-11-05T14:07:55-07:00
by BradChesney79
I can use the code as is, there is no requirement that I use imagic via PECL.
When I was looking at other posts I saw a few people ask about environment specifics.
You replied while I was preemptively providing that info.

Imagic via PECL is just how I have been doing everything else. Scale, crop, store edited image caches...

I just have to start with PHP to trigger the code you linked to and have it run. But, that I can figure out without too much trouble.

I consider my problem squashed... much appreciated.