谁知道BMP或者其他图片怎么转为ICO???

解决方案 »

  1.   

    procedure bmp2ico(Image: TImage; FileName: TFilename);
    var    Bmp: TBitmap;
     Icon: TIcon;
     ImageList: TImageList;
    begin
     Bmp  := TBitmap.Create;
     Icon := TIcon.Create;
     try
       Bmp.Assign(Image.Picture);
       ImageList := TImageList.CreateSize(Bmp.Width, Bmp.Height);
       try
         ImageList.AddMasked(Bmp, Bmp.TransparentColor);
         ImageList.GetIcon(0, Icon);
         // Save it to a file  C
         Icon.SaveToFile(FileName);
       finally
         ImageList.Free;
       end;
     finally
       Bmp.Free;
       Icon.Free;
     end;
    end;http://www.0470a.net/cgi-bin/topic.cgi?forum=2&topic=286&show=0