Winsoft Image Acquisition for MacOS v1.3 for Delphi 10.3 Rio Full Source

Winsoft Image Acquisition for MacOS v1.3 for Delphi 10.3 Rio Full Source

Winsoft Image Acquisition for MacOS v1.3 for Delphi 10.3 Rio Full Source
Winsoft Image Acquisition for MacOS v1.3 for Delphi 10.3 Rio Full Source


Delphi component to acquire images from scanner devices.

uses ImageCaptureCore framework
available for Delphi 10.3
source code included in registered version
royalty free distribution in applications

Version 1.3

removed TXiaScanner.IsShared property
bug fixes and improvements


type
  EXiaError = class(Exception)
  end;

  TXiaScannerDevice = record
    property Device: ICScannerDevice read;
    property Name: string read;
  end;

  TXiaError = record
    property Code: LongInt read;
    property Domain: string read;
    property Error: NSError read;
    property IsError: Boolean read;
    property LocalizedDescription: string read;
  end;

  TXiaDeviceAddedEvent = procedure (Sender: TObject; Device: TXiaScannerDevice) of object;
  TXiaDeviceRemovedEvent = procedure (Sender: TObject; Device: TXiaScannerDevice) of object;
  TXiaSessionOpenedEvent = procedure (Sender: TObject; Error: TXiaError) of object;
  TXiaSessionClosedEvent = procedure (Sender: TObject; Error: TXiaError) of object;
  TXiaFunctionalUnitSelectedEvent = procedure (Sender: TObject; Error: TXiaError) of object;
  TXiaOverviewScanCompletedEvent = procedure (Sender: TObject; Error: TXiaError) of object;
  TXiaScanCompletedEvent = procedure (Sender: TObject; Error: TXiaError) of object;
  TXiaScanToUrlCompletedEvent = procedure (Sender: TObject; const Url: string) of object;

  TXiaDocumentUniformType = (dtUnknown, dtPng, dtJPEG, dtJPEG2000, dtBmp, dtTiff, dtGif);
  TXiaFunctionalUnitType = (ftUnknown, ftFlatbed, ftPositiveTransparency, ftNegativeTransparency, ftDocumentFeeder);
  TXiaMeasurementUnit = (muUnknown, muInches, muCentimeters, muPicas, muPoints, muTwips, muPixels);
  TXiaMeasurementUnits = set of TXiaMeasurementUnit;
  TXiaPixelDataType = (ptUnknown, ptBW, ptGray, ptRGB, ptPalette, ptCMY, ptCMYK, ptYUV, ptYUVK, ptCIEXYZ);
  TXiaFunctionalUnitState = (fsUnknown, fsReady, fsScanInProgress, fsOverviewScanInProgress);
  TXiaFunctionalUnitStates = set of TXiaFunctionalUnitState;

  TXiaScanner = class(TComponent)
  public
    constructor Create(AOwner: TComponent); override;

    procedure CancelScan;
    function GetIcon(Bitmap: TBitmap; SetSize: Boolean = True): Boolean;
    function GetOverwiewImage(Bitmap: TBitmap; SetSize: Boolean = True): Boolean;
    function IsBrowsing: Boolean;
    procedure RequestCloseSession;
    procedure RequestEjectOrDisconnect;
    procedure RequestOpenSession;
    procedure RequestOverviewScan;
    procedure RequestScan;
    procedure RequestSelectFunctionalUnit(FunctionalUnitType: TXiaFunctionalUnitType);
    procedure StartBrowse;
    procedure StopBrowse;

    property AcceptsThresholdForBlackAndWhiteScanning: Boolean read;
    property AutolaunchApplicationPath: string read write;
    property AvailableFunctionalUnitTypes: TArray<TXiaFunctionalUnitType> read;
    property BitDepth: LongWord read write;
    property ButtonPressed: string read;
    property CanPerformOverviewScan: Boolean read;
    property Capabilities: TArray<string> read;
    property DefaultThresholdForBlackAndWhiteScanning: Byte read;
    property Device: ICScannerDevice read write;
    property DeviceBrowser: ICDeviceBrowser read;
    property DeviceBrowserDelegate: ICDeviceBrowserDelegate read;
    property DeviceDelegate: ICScannerDeviceDelegate read;
    property DeviceName: string read;
    property Devices: TArray<TXiaScannerDevice> read;
    property DocumentName: string read write;
    property DocumentUniformType: TXiaDocumentUniformType read write;
    property DocumentUTI: string read write;
    property DownloadsDirectory: string read write;
    property HasConfigurableWiFiInterface: Boolean read;
    property HasOpenSession: Boolean read;
    property IsRemote: Boolean read;
    property LocationDescription: string read;
    property MaxMemoryBandSize: Cardinal read write;
    property MeasurementUnit: TXiaMeasurementUnit read write;
    property ModulePath: string read;
    property ModuleVersion: string read;
    property NativeXResolution: LongWord read;
    property NativeYResolution: LongWord read;
    property OverviewResolution: LongWord read write;
    property OverviewScanInProgress: Boolean read;
    property PersistentID: string read;
    property PhysicalSize: TSizeF read;
    property PixelDataType: TXiaPixelDataType read write;
    property PreferredDevice: TXiaScannerDevice read;
    property PreferredResolutions: TArray<LongWord> read;
    property PreferredScaleFactors: TArray<LongWord> read;
    property Resolution: LongWord read write;
    property ScaleFactor: LongWord read write;
    property ScanArea: TRectF read write;
    property ScanInProgress: Boolean read;
    property ScanProgressPercentDone: Single read;
    property SelectedFunctionalUnit: ICScannerFunctionalUnit read;
    property SelectedFunctionalUnitType: TXiaFunctionalUnitType read;
    property SerialNumber: string read;
    property State: TXiaFunctionalUnitStates read;
    property SupportedBitDepths: TArray<LongWord> read;
    property SupportedMeasurementUnits: TXiaMeasurementUnits read;
    property SupportedResolutions: TArray<LongWord> read;
    property SupportedScaleFactors: TArray<LongWord> read;
    property ThresholdForBlackAndWhiteScanning: Byte read write;
    property TransportType: string read;
    property UsbLocationID: Integer read;
    property UsbProductID: Integer read;
    property UsbVendorID: Integer read;
    property UsesThresholdForBlackAndWhiteScanning: Boolean read write;
    property UUID: string read GetUUID;
  published
    property About: string read write stored False;

    property DeviceAdded: TXiaDeviceAddedEvent read write;
    property DeviceRemoved: TXiaDeviceRemovedEvent read write;
    property FunctionalUnitSelected: TXiaFunctionalUnitSelectedEvent read write;
    property OverviewScanCompleted: TXiaOverviewScanCompletedEvent read write;
    property ScanCompleted: TXiaScanCompletedEvent read write;
    property ScanToUrlCompleted: TXiaScanToUrlCompletedEvent read write;
    property SessionClosed: TXiaSessionClosedEvent read write;
    property SessionOpened: TXiaSessionOpenedEvent read write;
  end;


Only for V.I.P
Warning! You are not allowed to view this text.
Information
Users of Guests are not allowed to comment this publication.