home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hráč 1997 February
/
Hrac_09_1997-02_cd.bin
/
UTILS
/
PROGRAM
/
1SVGA.ZIP
/
RESIZE.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-04-28
|
1KB
|
33 lines
{ Resize Font & Picture }
uses Txt; {$I+}
var A,B:array[0..16383] of byte; { Max: 128x128 }
File1,File2:file;
I,J,M,N,X1,Y1,X2,Y2,Size1,Size2:integer;
begin
Writeln;
Writeln('Resize Font & Picture (Max size: 128*128)');
Writeln('Copyright (C) 1994 by Jou-Nan Chen');
Val(ParamStr(3),X1,I); Val(ParamStr(4),Y1,I); Size1:=X1*Y1;
Val(ParamStr(5),X2,I); Val(ParamStr(6),Y2,I); Size2:=X2*Y2;
Val(ParamStr(7),M,I); Val(ParamStr(8),N,I);
Assign(File1,ParamStr(1)); {$I-} Reset(File1,Size1); {$I+}
if (ParamCount<>8) or (I<>0) or (IOResult<>0) or (X1<1) or (X2<1)
or (Y1<1) or (Y2<1) or (M<0) or (N<1) then begin
Writeln;
Writeln('Usage: Resize InFile OutFile InX InY OutX OutY StartChar CharCount');
Writeln(' InX, InY, OutX, OutY ─── byte');
Halt(1);
end;
Seek(File1,M);
Assign(File2,ParamStr(2)); Rewrite(File2,Size2);
for I:=0 to N-1 do begin
BlockRead(File1,A,1);
FillChar(B,Size2,0);
for J:=0 to Y1-1 do Move(A[X1*J],B[X2*J],X1);
BlockWrite(File2,B,1);
end;
Close(File1); Close(File2);
end.