png - Transparent rounded corners in PHP -


is possible create transparent corners image on fly php? think possible, missing function preserve alpha values when copy image.

my idea create image of same width , height, apply transparent corners, need preserve alpha channel , copy image on mask, leaving transparent still transparent, colors changed copied image (or vice versa, put mask on image).

is possible , commands if there any?

update: helping this. time ago, , forgot if cross question find solution visit one: http://www.pc-siete.g6.cz/galery.html . made functions gradient, radial gradient , rounded corners feel free use :) . i'm not using on webstie, it's have them prepared.

for reason downloaded file had ad in it. it's stored inside zip , downloads properly.

as far know there no built-in function this. can create 1 along these lines:

function imageapplyroundedcorners(&$img,$radius) {     // each corner         // loop through pixels between corner , (corner +- radius)             // if distance between pixel , radius > radius, make transparent             // elseif distance > radius-1 make partially transparent (for antialiasing) } 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -