Einzelnen Beitrag anzeigen

Benutzerbild von chaosben
chaosben

Registriert seit: 27. Apr 2005
Ort: Görlitz
1.358 Beiträge
 
Delphi XE2 Professional
 
#16

Re: Randpixel von Icons glätten oder Imagelist mit PNG?

  Alt 23. Apr 2007, 07:42
so funktioniert das bei mir:

Delphi-Quellcode:
procedure TForm1.btn_Button1Click(Sender: TObject);
var
  Gif : TGIFImage;
  bmp : TBitmap;
begin
  gif:=TGIFImage.Create;
  gif.LoadFromFile('c:\test.gif');
  bmp:=TBitmap.Create;
  bmp.Width:=gif.Width;
  bmp.Height:=gif.Height;
  bmp.PixelFormat:=pf24bit;
  bmp.Canvas.Brush.Color:=clRed;
  bmp.Canvas.FillRect(bmp.Canvas.ClipRect);
  bmp.Canvas.Draw(0,0, gif);
  Image1.Picture.Graphic:=bmp;
  gif.Free;
  bmp.Free;
end;
Benjamin Schwarze
If I have seen further it is by standing on the shoulders of Giants. (Isaac Newton)
  Mit Zitat antworten Zitat