unit Global;

interface
uses IOGraphics,SysUtils,extctrls;

var Img:pointer;   //zpracovany obraz
    Info,InfoNEW:TImgRec;  //info o obraze
    Stretch:integer=1; //zkresleni 1 2(1:2) 3
    Black,White,Gamma:Integer;
    Image:TImage;
    f:file;
    ImgWordNEW: PWordArr;

procedure SaveUMF (Filename: AnsiString; Width, Height, BytesPerPixel: integer; Img: pointer);


implementation

procedure SaveUMF (Filename: AnsiString; Width, Height, BytesPerPixel: integer; Img: pointer);
var FileHandle  : integer;
    ImgSize     : Integer;
    ID          : integer;
begin
  ID:=2727;
  ImgSize:=Width*Height*BytesPerPixel;
  FileHandle:=FileCreate(Filename);
  FileWrite(FileHandle,ID,4);           //4=SizeOfInteger
  FileWrite(FileHandle,Width,4);
  FileWrite(FileHandle,Height,4);
  FileWrite(FileHandle,BytesPerPixel,4);
  FileWrite(FileHandle,Img^,ImgSize);
  FileClose(FileHandle);
end;
end.
