On delphi XE3 the "ImagingFmx.pas" by 4 error.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
procedure TForm5.Button1Click(Sender: TObject);
var
I,y,x: LongInt;
T: Int64;
io:Tmemorystream;
Dest, Src: PByte;
Alpha: Byte;
begin
try
FImage := TMultiImage.Create;
FImage2 := TMultiImage.Create;
// Load all subimages in file
T := ImagingUtility.GetTimeMicroseconds;
FImage.LoadMultiFromFile('E:\espulso.gif');
FImage2.LoadMultiFromFile('E:\espulso.gif');
for I := 0 to FImage.ImageCount - 1 do
begin
FImage.ActiveImage := I;
if not (FImage.Format in TImagingCanvas.GetSupportedFormats) then
FImage.Format := ifA8R8G8B8;
for Y := 0 to Height - 1 do
begin
Src := FImage.Scanline[y];
Dest := FImage2.ScanLine[y];
for X := 0 to Width - 1 do
begin
Alpha := Src[X * 4 + 3];
Dest[X * 4 + 0] := Src[x * 4 + 0] * Alpha div 255;
Dest[X * 4 + 1] := Src[x * 4 + 1] * Alpha div 255;
Dest[X * 4 + 2] := Src[x * 4 + 2] * Alpha div 255;
Dest[X * 4 + 3] := Alpha;
end;
end;
io:=Tmemorystream.Create;
FImage2.SaveToStream('gif',io);
image1.Bitmap.LoadFromStream(io);
............
break;
end;
// Activate first image and update UI
FImage.ActiveImage := 0;
except
raise;
end;
end;
Page created in 0.009 seconds with 21 queries.