Fatten Alpha - RealWorld forums

Log-in or register.

Fatten Alpha

PAEz
on October 31st 2013

Flatten Alpha
This will change any pixel that has an alpha above 0 to have an alpha of 255.
This is useful for the Shape Burst script.
One thing you can do is make a shape on a transparent background.
Run the Shape Burst script.
Everythings a little jagged so blur it....
Before blurring, Mask from opacity, to keep the shape after blurring.
Prob is the blur also blurs the alpha of the edges.
So, run this script after and that will fix that.

Code
Execution

var image = Document.RasterImage;
var w = image.sizeX;
var h = image.sizeY;
var alpha;

for (var x=0; x<w; x++){
for (var y=0; y<h; y++){
alpha = image.GetPixelAlpha(x, y, 0, 0);
if(alpha>0)image.SetPixelAlpha(x, y, 0, 0, 255);
}}
Page views: 977       Posts: 1      
Select background
Vista & Win 7 icons
What about ICL files?