Voor de volledigheid een stukje code voor als anderen tegen hetzelfde aanlopen.
Code:
var
Png: TPngImage;
x, y: Integer;
RgbSl: pRGBLine;
AlphaSl: PByteArray;
begin
Png := TPngImage.Create;
try
Png.CreateBlank(COLOR_RGBALPHA, 8, 800, 600);
for y := 0 to Png.Height - 1 do
begin
RgbSl := Png.Scanline[y];
AlphaSl := Png.AlphaScanline[y];
for x := 0 to Png.Width - 1 do
begin
RgbSl^[x].rgbtRed := $FF;
RgbSl^[x].rgbtGreen := 0;
RgbSl^[x].rgbtBlue := 0;
AlphaSl^[x] := $80;
end;
end;
Image1.Picture.Graphic := Png;
finally
Png.Free;
end;
end;
Bookmarks