ico para bmp

Delphi

12/04/2003

alguém conhece alguma forma de converter icone para bmp???


Fer

Fer

Curtidas 0

Respostas

Suemar

Suemar

12/04/2003

Há métodos mais otimizados, mas esse já quebra o galho...

Falow,
Suemar.

procedure TFPrincipal.Converter_ICO_BMP(Arquivo : String);
var Pic : TPicture;
Ico : TIcon;
Bmp : TBitmap;
begin
try
Ico := TIcon.Create;
Pic := TPicture.Create;
Bmp := TBitmap.Create;

Ico.Handle := ExtractIcon(HInstance, PChar(Arquivo), 0);
Pic.Icon := Ico;
Bmp.Width := Ico.Width;
Bmp.Height := Ico.Height;
Bmp.Canvas.Draw(0, 0, Pic.Icon);
Bmp.SaveToFile(ChangeFileExt(Arquivo,´.bmp´));

Ico.Free;
Pic.Free;
Bmp.Free;
except
MessageDlg(´Problemas encontrados durante a conversão do arquivo ´ + Arquivo,mtInformation,[mbOk],0);
end;
end;


GOSTEI 0
Debora

Debora

12/04/2003

http://superdownloads.ubbi.com.br/
Tem vários programas que fazem isso, inclusive tem uns programinhas que permite vc fazer seus próprios ícones.

Alguns são free.


GOSTEI 0
POSTAR