首页 > 其他 > 详细

改变图象调色板

时间:2017-02-07 13:49:56      阅读:182      评论:0      收藏:0      [点我收藏+]
var
 Bitmap: TBitmap;
begin

 Bitmap:=TBitmap.Create;
 Bitmap.LoadfromFile({‘Whatever.bmp‘});

 With Image2.Picture.bitmap do
 Begin
  Width:=Bitmap.Width;
  height:=Bitmap.Height;
  Palette:=Bitmap.Palette;
  Canvas.draw(0,0,bitmap);
  Refresh;
 end;
end;
如果要往窗体上画
Canvas.Draw(0,0,Bitmap);
SelectPalette(Form1.Canvas.handle,Bitmap.Palette,True);
RealizePalette(Form1.Canvas.Handle);

 

改变图象调色板

原文:http://www.cnblogs.com/yzryc/p/6373588.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!