pluginunit.pas

来自「图象处理的一些相关内容 不是很难的,实现简单,希望对大家有帮助」· PAS 代码 · 共 42 行

PAS
42
字号

unit PlugInUnit;

interface
Uses Windows,Graphics,extdlgs;
const
  MaxPixelCount=32768;
type
  pRGBArray  =  ^TRGBArray;
  TRGBArray  =  ARRAY[0..MaxPixelCount-1] OF TRGBTriple;



procedure notcolor(ABmp:Tbitmap);export; stdcall;



implementation

procedure notcolor(ABmp:Tbitmap);
var
  i,j:Integer;
  SrcRow: pRGBArray;

begin
      SrcRow := ABmp.ScanLine[0];
      for i := 0 to ABmp.Height - 1 do
      begin
        for j := 0 to ABmp.Width - 1 do
        begin
          SrcRow[j].rgbtRed :=not SrcRow[j].rgbtRed ;
          SrcRow[j].rgbtGreen :=not SrcRow[j].rgbtGreen;
          SrcRow[j].rgbtBlue :=not SrcRow[j].rgbtBlue;
        end;
        SrcRow := ABmp.ScanLine[i];
      end;
end;


end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?