There is not, but the code would be as follows:
var
px: pbyte;
y, x, l: integer;
alphaCount, denom: Integer;
bmp: TIEBitmap;
begin
bmp := ImageEnView1.IEBitmap;
alphaCount := 0;
if bmp.HasAlphaChannel() then
begin
l := IEBitmapRowLen( bmp.AlphaChannel.Width, bmp.AlphaChannel.BitCount, 8);
for y := 0 to bmp.AlphaChannel.Height - 1 do
begin
px := bmp.AlphaChannel.Scanline[y];
for x := 0 to l - 1 do
begin
if px^ < 255 then
Inc( alphaCount );
inc(px);
end;
end;
end;
denom := bmp.Width * bmp.Height;
ShowMessage( format( 'Image has %d%% transparent pixels', [ Round( alphaCount / denom * 100 )]));
end;
Nigel
Xequte Software
www.imageen.com