        jcbx_Papier
        if GetDataSize('PaperCol') >= 4 then
        begin
          for iCount := 0 to (Length(aiVals) - 1) do
          begin
            AddItem := jcbx_Papierformat.Items.Add;
            AddItem.ImageIndex := 14;
            case aiVals[iCount] of
              IETW_NONE:          AddItem.Text := 'Unbekannt';
              IETW_A4LETTER:      AddItem.Text := 'DIN A4 / Letter';
              IETW_B5LETTER:      AddItem.Text := 'DIN B5';
              IETW_USLETTER:      AddItem.Text := 'US Letter';
              IETW_USLEGAL:       AddItem.Text := 'US Legal';
              IETW_A5:            AddItem.Text := 'DIN A5';
              IETW_B4:            AddItem.Text := 'DIN B4';
              IETW_B6:            AddItem.Text := 'DIN B6';
              IETW_USLEDGER:      AddItem.Text := 'US Ledger';
              IETW_USEXECUTIVE:   AddItem.Text := 'US EXECUTIVE';
              IETW_A3:            AddItem.Text := 'DIN A3';
              IETW_B3:            AddItem.Text := 'DIN B3';
              IETW_A6:            AddItem.Text := 'DIN A6';
              IETW_C4:            AddItem.Text := 'DIN C4';
              IETW_C5:            AddItem.Text := 'DIN C5';
              IETW_C6:            AddItem.Text := 'DIN C6';
              IETW_4A0:           AddItem.Text := 'DIN 4-A0';
              IETW_2A0:           AddItem.Text := 'DIN 2-A0';
              IETW_A0:            AddItem.Text := 'DIN A0';
              IETW_A1:            AddItem.Text := 'DIN A1';
              IETW_A2:            AddItem.Text := 'DIN A2';
              IETW_A7:            AddItem.Text := 'DIN A7';
              IETW_A8:            AddItem.Text := 'DIN A8';
              IETW_A9:            AddItem.Text := 'DIN A9';
              IETW_A10:           AddItem.Text := 'DIN A10';
              IETW_ISOB0:         AddItem.Text := 'ISO DIN B0';
              IETW_ISOB1:         AddItem.Text := 'ISO DIN B1';
              IETW_ISOB2:         AddItem.Text := 'ISO DIN B2';
              IETW_ISOB5:         AddItem.Text := 'ISO DIN B5';
              IETW_ISOB7:         AddItem.Text := 'ISO DIN B7';
              IETW_ISOB8:         AddItem.Text := 'ISO DIN B8';
              IETW_ISOB9:         AddItem.Text := 'ISO DIN B9';
              IETW_ISOB10:        AddItem.Text := 'ISO DIN B10';
              IETW_JISB0:         AddItem.Text := 'JIS B0';
              IETW_JISB1:         AddItem.Text := 'JIS B1';
              IETW_JISB2:         AddItem.Text := 'JIS B2';
              IETW_JISB3:         AddItem.Text := 'JIS B3';
              IETW_JISB4:         AddItem.Text := 'JIS B4';
              IETW_JISB6:         AddItem.Text := 'JIS B6';
              IETW_JISB7:         AddItem.Text := 'JIS B7';
              IETW_JISB8:         AddItem.Text := 'JIS B8';
              IETW_JISB9:         AddItem.Text := 'JIS B9';
              IETW_JISB10:        AddItem.Text := 'JIS B10';
              IETW_C0:            AddItem.Text := 'DIN C0';
              IETW_C1:            AddItem.Text := 'DIN C1';
              IETW_C2:            AddItem.Text := 'DIN C2';
              IETW_C3:            AddItem.Text := 'DIN C3';
              IETW_C7:            AddItem.Text := 'DIN C7';
              IETW_C8:            AddItem.Text := 'DIN C8';
              IETW_C9:            AddItem.Text := 'DIN C9';
              IETW_C10:           AddItem.Text := 'DIN C10';
              IETW_USSTATEMENT:   AddItem.Text := 'US Statement';
              IETW_BUSINESSCARD:  AddItem.Text := 'US Businesscard';
            else
              AddItem.Text := 'Unbk. Format #' + IntToStr(aiVals[iCount]);
            end;
            AddItem.LinkedObject := TObject(aiVals[iCount]);
          end;
          for iCount := 0 to (Length(aiVals) - 1) do
            if Integer(jcbx_Papierformat.Items.Objects[iCount]) = ReadInteger('PaperType') then




        jcbx_Papierausricht.Visible := False;
        jcbx_Papierausricht.Items.Clear;
        SetLength(aiVals, (GetDataSize('FormatCol') div 4));
        ReadBinaryData('FormatCol', aiVals[0], GetDataSize('FormatCol'));
        if GetDataSize('FormatCol') >= 4 then
        begin
          for iCount := 0 to (Length(aiVals) - 1) do
          begin
            AddItem := jcbx_Papierausricht.Items.Add;
            case aiVals[iCount] of
              0: begin
                   AddItem.Text := 'Portrait';
                   AddItem.ImageIndex := 10;
                 end;
              1: begin
                   AddItem.Text := 'um 90° gedreht';
                   AddItem.ImageIndex := 13;
                 end;
              2: begin
                   AddItem.Text := 'um 180° gedreht';
                   AddItem.ImageIndex := 12;
                 end;
              3: begin
                   AddItem.Text := 'Landscape';
                   AddItem.ImageIndex := 11;
                 end;
            else
              AddItem.ImageIndex := 10;
              AddItem.Text := 'Unbk. Ausrichtung #' + IntToStr(aiVals[iCount]);
            end;
            AddItem.LinkedObject := TObject(aiVals[iCount]);
          end;
          for iCount := 0 to (Length(aiVals) - 1) do
            if Integer(jcbx_Papierausricht.Items.Objects[iCount]) = ReadInteger('PaperFormat') then
            begin
              jcbx_Papierausricht.ItemIndex := iCount;
              break;
            end;
        end else
        begin
          AddItem := jcbx_Papierausricht.Items.Add;
          AddItem.ImageIndex := 10;
          AddItem.Text := 'Portrait';
          AddItem.LinkedObject := TObject(0);
          jcbx_Papierausricht.ItemIndex := 0;
        end;
        jcbx_Papierausricht.Visible := True;

            begin
              jcbx_Papierformat.ItemIndex := iCount;
              break;
            end;
        end else
        begin
          AddItem := jcbx_Papierformat.Items.Add;
          AddItem.ImageIndex := 14;
          AddItem.Text := 'Unbekannt';
          AddItem.LinkedObject := TObject(0);
          jcbx_Papierformat.ItemIndex := 0;
        end;
        jcbx_PapierFormat.Visible := True;






function Tfrm_Optionen.GetScannerParams(ScannerID: Integer; ScannerName: String): boolean;
var Scanner: TIETwainParams;
    sHintStr: String;
    iCount: Integer;
    AddItem: TJvImageItem;
begin
  tlbl_ScanPropInfo.Caption := 'Lade Scanner Eigenschaften...';
  tlbl_ScanPropInfo.Visible := True;
  frm_Main.img_Pages.MIO.AcquireClose; //dm_Main.imgio_Scan.AcquireClose;
  Scanner := frm_Main.img_Pages.MIO.TWainParams;  //dm_Main.imgio_Scan.TWainParams;
  Scanner.FreeResources;
  if ScannerID = -1 then result := Scanner.SelectSourceByName(ScannerName)
  else result := Scanner.SelectSourceByName(Scanner.SourceName[ScannerID]);
  if not result then
  begin
    result := False;
    tlbl_ScanPropInfo.Caption := 'Fehler bei Scannerabfrage!';
    exit;
  end;
  // Feeder Info lesen...
  if Scanner.AutoFeed or Scanner.FeederEnabled  then
  begin
    sHintStr := 'Dokumentenfeeder vorhanden';
    jrbtn_UseAdf.Enabled := True;
  end else
  begin
    sHintStr := '';
    jrbtn_UseAdf.Checked := False;
    jrbtn_UseAdf.Enabled := False;
  end;
  // Duplex Info lesen...
  if Scanner.DuplexSupported then
  begin
    sHintStr := sHintStr + #13 + 'Scanner kann duplex Scannen';
    jrbtn_UseDuplex.Enabled := True;
  end else
  begin
    sHintStr := sHintStr + '';
    jrbtn_UseDuplex.Checked := False;
    jrbtn_UseDuplex.Enabled := False;
  end;
  jcbx_Scanner.Hint := sHintStr;
  // Helligkeit lesen
  jedt_Bright.MaxValue := Scanner.Brightness.RangeMax;
  jedt_Bright.MinValue := Scanner.Brightness.RangeMin;
  jedt_Bright.Increment := Scanner.Brightness.RangeStep;
  jedt_Bright.Value := Scanner.Brightness.CurrentValue;
  // Kontrast lesen
  jedt_Contr.MaxValue := Scanner.Contrast.RangeMax;
  jedt_Contr.MinValue := Scanner.Contrast.RangeMin;
  jedt_Contr.Increment := Scanner.Contrast.RangeStep;
  jedt_Contr.Value := Scanner.Contrast.CurrentValue;
  // Schwellwert lesen
  jedt_Thres.MaxValue := Scanner.Threshold.RangeMax;
  jedt_Thres.MinValue := Scanner.Threshold.RangeMin;
  jedt_Thres.Increment := Scanner.Threshold.RangeStep;
  jedt_Thres.Value := Scanner.Threshold.CurrentValue;
  // Rotation lesen
  // jedt_Rotate.Value := Scanner.Rotation.CurrentValue;
  // Auflösung auslesen;
  // Papierformat auslesen...
  jcbx_Papierformat.Items.Clear;
  if Scanner.StandardSize.Count > 0 then
  begin
    for iCOunt := 0 to (Scanner.StandardSize.Count - 1) do
    begin
      AddItem := jcbx_Papierformat.Items.Add;
      AddItem.ImageIndex := 14;
      case Scanner.StandardSize.Items[iCount] of
        IETW_NONE:          AddItem.Text := 'Unbekannt';
        IETW_A4LETTER:      AddItem.Text := 'DIN A4 / Letter';
        IETW_B5LETTER:      AddItem.Text := 'DIN B5';
        IETW_USLETTER:      AddItem.Text := 'US Letter';
        IETW_USLEGAL:       AddItem.Text := 'US Legal';
        IETW_A5:            AddItem.Text := 'DIN A5';
        IETW_B4:            AddItem.Text := 'DIN B4';
        IETW_B6:            AddItem.Text := 'DIN B6';
        IETW_USLEDGER:      AddItem.Text := 'US Ledger';
        IETW_USEXECUTIVE:   AddItem.Text := 'US EXECUTIVE';
        IETW_A3:            AddItem.Text := 'DIN A3';
        IETW_B3:            AddItem.Text := 'DIN B3';
        IETW_A6:            AddItem.Text := 'DIN A6';
        IETW_C4:            AddItem.Text := 'DIN C4';
        IETW_C5:            AddItem.Text := 'DIN C5';
        IETW_C6:            AddItem.Text := 'DIN C6';
        IETW_4A0:           AddItem.Text := 'DIN 4-A0';
        IETW_2A0:           AddItem.Text := 'DIN 2-A0';
        IETW_A0:            AddItem.Text := 'DIN A0';
        IETW_A1:            AddItem.Text := 'DIN A1';
        IETW_A2:            AddItem.Text := 'DIN A2';
        IETW_A7:            AddItem.Text := 'DIN A7';
        IETW_A8:            AddItem.Text := 'DIN A8';
        IETW_A9:            AddItem.Text := 'DIN A9';
        IETW_A10:           AddItem.Text := 'DIN A10';
        IETW_ISOB0:         AddItem.Text := 'ISO DIN B0';
        IETW_ISOB1:         AddItem.Text := 'ISO DIN B1';
        IETW_ISOB2:         AddItem.Text := 'ISO DIN B2';
        IETW_ISOB5:         AddItem.Text := 'ISO DIN B5';
        IETW_ISOB7:         AddItem.Text := 'ISO DIN B7';
        IETW_ISOB8:         AddItem.Text := 'ISO DIN B8';
        IETW_ISOB9:         AddItem.Text := 'ISO DIN B9';
        IETW_ISOB10:        AddItem.Text := 'ISO DIN B10';
        IETW_JISB0:         AddItem.Text := 'JIS B0';
        IETW_JISB1:         AddItem.Text := 'JIS B1';
        IETW_JISB2:         AddItem.Text := 'JIS B2';
        IETW_JISB3:         AddItem.Text := 'JIS B3';
        IETW_JISB4:         AddItem.Text := 'JIS B4';
        IETW_JISB6:         AddItem.Text := 'JIS B6';
        IETW_JISB7:         AddItem.Text := 'JIS B7';
        IETW_JISB8:         AddItem.Text := 'JIS B8';
        IETW_JISB9:         AddItem.Text := 'JIS B9';
        IETW_JISB10:        AddItem.Text := 'JIS B10';
        IETW_C0:            AddItem.Text := 'DIN C0';
        IETW_C1:            AddItem.Text := 'DIN C1';
        IETW_C2:            AddItem.Text := 'DIN C2';
        IETW_C3:            AddItem.Text := 'DIN C3';
        IETW_C7:            AddItem.Text := 'DIN C7';
        IETW_C8:            AddItem.Text := 'DIN C8';
        IETW_C9:            AddItem.Text := 'DIN C9';
        IETW_C10:           AddItem.Text := 'DIN C10';
        IETW_USSTATEMENT:   AddItem.Text := 'US Statement';
        IETW_BUSINESSCARD:  AddItem.Text := 'US Businesscard';
      else
        AddItem.Text := 'Unbk. Format #' + IntToStr(Scanner.StandardSize.Items[iCount]);
      end;
      AddItem.LinkedObject := TObject(Scanner.StandardSize.Items[iCount]);
    end;
    for iCount := 0 to (jcbx_Papierformat.Items.Count - 1) do
      if Integer(jcbx_Papierformat.Items.Objects[iCount]) = Scanner.StandardSize.CurrentValue then
      begin
        jcbx_Papierformat.ItemIndex := iCount;
        break;
      end;
  end else
  begin
    AddItem := jcbx_Papierformat.Items.Add;
    AddItem.ImageIndex := 14;
    AddItem.Text := 'Unbekannt';
    AddItem.LinkedObject := TObject(0);
    jcbx_Papierformat.ItemIndex := 0;
  end;
  // Papierausrichtung auslesen...
  jcbx_Papierausricht.Items.Clear;
  if Scanner.Orientation.Count > 0 then
  begin
    for iCOunt := 0 to (Scanner.Orientation.Count - 1) do
    begin
      AddItem := jcbx_Papierausricht.Items.Add;
      case Scanner.Orientation.Items[iCount] of
        0: begin
             AddItem.Text := 'Portrait';
             AddItem.ImageIndex := 10;
           end;
        1: begin
             AddItem.Text := 'um 90° gedreht';
             AddItem.ImageIndex := 13;
           end;
        2: begin
             AddItem.Text := 'um 180° gedreht';
             AddItem.ImageIndex := 12;
           end;
        3: begin
             AddItem.Text := 'Landscape';
             AddItem.ImageIndex := 11;
           end;
      else
        AddItem.ImageIndex := 10;
        AddItem.Text := 'Unbk. Ausrichtung #' + IntToStr(Scanner.Orientation.Items[iCount]);
      end;
      AddItem.LinkedObject := TObject(Scanner.Orientation.Items[iCount]);
    end;
    for iCount := 0 to (jcbx_Papierausricht.Items.Count - 1) do
      if Integer(jcbx_Papierausricht.Items.Objects[iCount]) = Scanner.Orientation.CurrentValue then
      begin
        jcbx_Papierausricht.ItemIndex := iCount;
        break;
      end;
  end else
  begin
    AddItem := jcbx_Papierausricht.Items.Add;
    AddItem.ImageIndex := 10;
    AddItem.Text := 'Portrait';
    AddItem.LinkedObject := TObject(0);
    jcbx_Papierausricht.ItemIndex := 0;
  end;
  // Ausschnitte auslesen...
//  jedt_CutLeft.MaxValue := Scanner.A
  tlbl_ScanPropInfo.Visible := False;
end;






        case ReadInteger('DPIX') of
          0:  Scanner.XResolution.CurrentValue := 50;
          1:  Scanner.XResolution.CurrentValue := 75;
          2:  Scanner.XResolution.CurrentValue := 100;
          3:  Scanner.XResolution.CurrentValue := 150;
          4:  Scanner.XResolution.CurrentValue := 200;
          5:  Scanner.XResolution.CurrentValue := 300;
          6:  Scanner.XResolution.CurrentValue := 400;
          7:  Scanner.XResolution.CurrentValue := 600;
          8:  Scanner.XResolution.CurrentValue := 1200;
        else  Scanner.XResolution.CurrentValue := 200;
        end;
        case ReadInteger('DPIY') of
          0:  Scanner.YResolution.CurrentValue := 50;
          1:  Scanner.YResolution.CurrentValue := 75;
          2:  Scanner.YResolution.CurrentValue := 100;
          3:  Scanner.YResolution.CurrentValue := 150;
          4:  Scanner.YResolution.CurrentValue := 200;
          5:  Scanner.YResolution.CurrentValue := 300;
          6:  Scanner.YResolution.CurrentValue := 400;
          7:  Scanner.YResolution.CurrentValue := 600;
          8:  Scanner.YResolution.CurrentValue := 1200;
        else  Scanner.YResolution.CurrentValue := 200;
        end;