pen1Click (Sender: TObject); CompressionClick (Sender: TObject); DecompressionClick (Sender: TObject); ConvertClick (Sender: TObject); Exit1Click (Sender: x, y: Integer; S: ShortInt); TD (var x, y: Integer; S: ShortInt); TLD (var x, y: Integer; S: ShortInt); TRU (var x, y: Integer; S: ShortInt); Zigzag (Style:
{Private declarations}
{Public declarations};: TForm1;: TPImage;: Array [0 .. 7,0 .. 7] Of Byte;: Array [0 .. 7,0 .. 7] Of Integer ;: Array [0 .. 63] Of Integer;: Array [0 .. 7,0 .. 7] Of Integer;: Array [0 .. 7,0 .. 7] Of Integer;: TextFile;: Byte; , Sym12, Sym2: Integer;: Array [0 .. 191] Of Integer;: String;: Integer;: integer;: String; Unit2;
{$ R *. DFM} TForm1.Exit1Click (Sender: TObject);. Close;; TForm1.Open1Click (Sender: TObject); F: File;, j: integer;: Byte; OpenDialog1 . Execute Then Begin (F, OpenDialog1.FileName); (F, 1); PImage Do to biWidth do Beginj: = 1 to biHeight do.Image1.Canvas.Pixels [j, i]: = (red or
{***************************************** ******************}
0) And (j> 0) Then d: = 1If (i = 0) And (j = 0) Then d: = 1/2d: = 1 /Sqrt (2); x: = 0 To 7 Doy: = 0 To 7 Do To 7 Doy: = 0 To 7 Do: = 0; i: = 0 To 7 Doj: = 0 To 7 Do (i> 0) And (j> 0) Then d: = 1If (i = 0) And (j = 0) Then d: = 1/2d: = 1/Sqrt (2);: = s + d * TOC [i, j] * Cos ((2 * x +1) * i * Pi/16) * Cos ((2 * y +1) * j * Pi/16); [x, y]: = Round (s/4); i: = 0 To 7 Doj: = 0 To 7 Do TOC [i, j]: = T [i, j]; TForm1.TKwant; i, j: Byte; i: = 0 To 7 Doj: = 0 To 7 Do TKW [i, j]: = 1 + ((1 + i + j) * Form1.Quality.Value);; TForm1.ToKwant;// Квантовательi, j: Byte; i: = 0 To 7 Doj: = 0 To 7 Do TOC [i, j]: = Trunc (TOC [i, j]/ TKW [i, j]); TForm1.KwantTo;// Деквантовательi, j: Byte; i: = 0 To 7 Doj: = 0 To 7 Do TOC [i, j]: = TOC [i, j] * TKW [ i, j];
{***************************************** ******************} TForm1.TR (var x: Integer; var y: Integer; S: ShortInt); (x); (Posit); S = 1 Then Zgzg [Posit]: = TOC [x, y] TOC [x, y]: = DcD [Posit];; TForm1.TD (var x: Integer; var y: Integer; S: ShortInt); (y); ( Posit); S = 1 Then Zgzg [Posit]: = TOC [x, y] TOC [x, y]: = DcD [Posit];; TForm1.TLD (var x: Integer; var y: Integer; S: ShortInt ); (y); (x); (Posit); S = 1 Then Zgzg [Posit]: = TOC [x, y] TOC [x, y]: = DcD [Posit];; TForm1.TRU (var x : Integer; var y: Integer; S: ShortInt); (x); (y); (Posit); S = 1 Then Zgzg [Posit]: = TOC [x, y] TOC ...