2025年11月10日 星期一  乙巳年 九月廿一 【蛇】丙戌月 癸未日
用户名: 密 码: 保存
您现在的位置:首页 >> 图形媒体 >> 图形媒体 >> 内容

Delphi将位图颜色变浅

时间:2011/9/3 15:03:00 点击: 1202

  核心提示:procedure Light24Bitmap(var B : TBitmap;N : integer);var i,j : integer; pB : PByteArray; Count: Inte...
procedure Light24Bitmap(var B : TBitmap;N : integer);
var
  i,j : integer;
  pB : PByteArray;
  Count: Integer;
begin
  i := Integer(B.PixelFormat);
  if i < 4 then
    i := 4
  else if i = 4 then
    inc(i);
  Count := (i - 3) * B.Width - 1;
  for i:=0 to B.Height-1 do
   begin
     pb:=B.ScanLine[i];
     for j:=0 to  Count do
       begin
         if pb[j]>(255-n) then pb[j]:=255 else inc(pb[j],n);
       end;
   end;
end;

Tags:颜色 
作者:网络 来源:转载
惊讶 欠揍 支持 很棒 愤怒 搞笑 恶心 不解
共有评论 0相关评论
发表我的评论
  • 大名:
  • 内容:
本类推荐
  • 没有
本类固顶
  • 没有
  • 盒子文章 技术支持:深圳市麟瑞科技有限公司(www.2ccc.com) © 2025 版权所有 All Rights Reserved.
  • 粤ICP备10103342号-1