关于ICON色深的问题

                            
我用这段代码从exe文件中读取其ICON   
  var  
      myIcon:   TIcon;  
  begin  
      myIcon   :=   TIcon.Create;  
      try  
          myIcon.ReleaseHandle;  
          myIcon.Handle   :=   ExtractIcon(hInstance,   PChar('c:\aaa.exe'),   0);  
          myIcon.Palette   :=   HALFTONE;     //1处  
          Image1.Canvas.Draw(0,   0,   myIcon);  
          if   SaveDlg.Execute   then  
              myIcon.SaveToFile(OpenDlg.FileName);  
      finally  
          myIcon.Free;  
      end;  
  end;  
  但是发现,画在Image1画布上的图像为真彩,而保存的.ico文件却只有16色?  
  查询Delphi   Help,其中有这样一句话:  
  If   your   application   supports   256   colors,   you   should   use   the   Windows   halftone   palette,   as   the   shell   does.   It   helps   system   performance,   because   the   system   does   not   need   to   load   a   new   palette   every   time   the   execution   focus   switches   between   the   shell   and   your   application.  
  因此我在1处增加  
  myIcon.Palette   :=   HALFTONE;  
  但是程序运行结果并未有改变?  
  请问如何实现8bit以上颜色的ICON?

查看回复