⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pluginunit.pas

📁 delphi的图片处理控件 看图方面的功能很强
💻 PAS
字号:


unit PlugInUnit;

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



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



implementation

//垂直镜像
procedure flipx(ABmp:Tbitmap);
var
  i:Integer;
  SrcRow: pRGBArray;

  p,p1:Pointer;
  Buffer: PChar;

  ScanlineBytes:integer;

begin
  ScanlineBytes:=ABmp.Width*3 ;

  getmem(buffer,ScanlineBytes);
      for i := 0 to (ABmp.Height - 1)div 2 do
      begin
        p:= ABmp.ScanLine[i];
        p1:= ABmp.ScanLine[ABmp.Height - 1-i];

        StrMove(buffer,p,ScanlineBytes);
        StrMove(p,p1,ScanlineBytes);
        StrMove(p1,buffer,ScanlineBytes);
      end;
   freemem(buffer,ScanlineBytes);

end;



end.

⌨️ 快捷键说明

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