unit JPEGProp;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, RXSpin;

type
  TJPEGForm = class(TForm)
    GroupBox1: TGroupBox;
    OKBtn: TButton;
    CancelBtn: TButton;
    Label1: TLabel;
    Quality1: TRxSpinEdit;
    Grayscale1: TCheckBox;
    Progressive1: TCheckBox;
    procedure OKBtnClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  JPEGForm: TJPEGForm;

implementation

{$R *.DFM}

uses Main;

procedure TJPEGForm.OKBtnClick(Sender: TObject);
begin
  with MainForm.JPEGProperties do
   begin
     Grayscale := Grayscale1.Checked;
     Quality := Round(Quality1.Value);
   end;
end;

procedure TJPEGForm.FormCreate(Sender: TObject);
begin
  with MainForm.JPEGProperties do
   begin
     Grayscale1.Checked := Grayscale;
     Quality1.Value := Quality;
     Progressive1.Checked := Progressive;
   end;
end;

end.
