/// <summary> /// Shows the common "Acquire Image" dialog to acquire an image. /// </summary> /// <param name="deviceType">Device type.</param> /// <param name="intent">Image intent.</param> /// <param name="bias">Image bias.</param> /// <param name="formatId">Image format ID.</param> /// <param name="alwaysSelectDevice">Always prompt to select device.</param> /// <param name="useCommonUI">Use common UI.</param> /// <param name="cancelError">Generate error if canceled.</param> /// <returns>Image file or null when canceled.</returns> public WiaImageFile ShowAcquireImage(WiaDeviceType deviceType, WiaImageIntent intent, WiaImageBias bias, string formatId, bool alwaysSelectDevice, bool useCommonUI, bool cancelError) { var wiaImageFile = _wiaCommonDialog.ShowAcquireImage( (Interop.Wia.WiaDeviceType)(int) deviceType, (Interop.Wia.WiaImageIntent)(int) intent, (Interop.Wia.WiaImageBias)(int) bias, formatId, alwaysSelectDevice, useCommonUI, cancelError); return(wiaImageFile != null ? new WiaImageFile(wiaImageFile) : null); }
private void AdjustScannerSettings(IItem scannnerItem, int scanResolutionDPI, int scanStartLeftPixel, int scanStartTopPixel, int scanWidthPixels, int scanHeightPixels, int brightnessPercents, int contrastPercents, WiaImageIntent colorMode) { const string WIA_SCAN_COLOR_MODE = "6146"; const string WIA_HORIZONTAL_SCAN_RESOLUTION_DPI = "6147"; const string WIA_VERTICAL_SCAN_RESOLUTION_DPI = "6148"; const string WIA_HORIZONTAL_SCAN_START_PIXEL = "6149"; const string WIA_VERTICAL_SCAN_START_PIXEL = "6150"; const string WIA_HORIZONTAL_SCAN_SIZE_PIXELS = "6151"; const string WIA_VERTICAL_SCAN_SIZE_PIXELS = "6152"; const string WIA_SCAN_BRIGHTNESS_PERCENTS = "6154"; const string WIA_SCAN_CONTRAST_PERCENTS = "6155"; SetWIAProperty(scannnerItem.Properties, WIA_HORIZONTAL_SCAN_RESOLUTION_DPI, scanResolutionDPI); SetWIAProperty(scannnerItem.Properties, WIA_VERTICAL_SCAN_RESOLUTION_DPI, scanResolutionDPI); SetWIAProperty(scannnerItem.Properties, WIA_HORIZONTAL_SCAN_START_PIXEL, scanStartLeftPixel); SetWIAProperty(scannnerItem.Properties, WIA_VERTICAL_SCAN_START_PIXEL, scanStartTopPixel); SetWIAProperty(scannnerItem.Properties, WIA_HORIZONTAL_SCAN_SIZE_PIXELS, scanWidthPixels); SetWIAProperty(scannnerItem.Properties, WIA_VERTICAL_SCAN_SIZE_PIXELS, scanHeightPixels); SetWIAProperty(scannnerItem.Properties, WIA_SCAN_BRIGHTNESS_PERCENTS, brightnessPercents); SetWIAProperty(scannnerItem.Properties, WIA_SCAN_CONTRAST_PERCENTS, contrastPercents); SetWIAProperty(scannnerItem.Properties, WIA_SCAN_COLOR_MODE, colorMode); }
public Items ShowSelectItems(Device Device, WiaImageIntent Intent = WiaImageIntent.UnspecifiedIntent, WiaImageBias Bias = WiaImageBias.MaximizeQuality, bool SingleSelect = true, bool UseCommonUI = true, bool CancelError = false) { throw new NotImplementedException(); }
public ImageFile ShowAcquireImage(WiaDeviceType DeviceType = WiaDeviceType.UnspecifiedDeviceType, WiaImageIntent Intent = WiaImageIntent.UnspecifiedIntent, WiaImageBias Bias = WiaImageBias.MaximizeQuality, string FormatID = "{00000000-0000-0000-0000-000000000000}", bool AlwaysSelectDevice = false, bool UseCommonUI = true, bool CancelError = false) { throw new NotImplementedException(); }
public Items ShowSelectItems(Device Device, WiaImageIntent Intent = WiaImageIntent.UnspecifiedIntent, WiaImageBias Bias = WiaImageBias.MaximizeQuality, bool SingleSelect = true, bool UseCommonUI = true, bool CancelError = false) { throw new NotImplementedException(); }
public ImageFile ShowAcquireImage(WiaDeviceType DeviceType = WiaDeviceType.UnspecifiedDeviceType, WiaImageIntent Intent = WiaImageIntent.UnspecifiedIntent, WiaImageBias Bias = WiaImageBias.MaximizeQuality, string FormatID = "{00000000-0000-0000-0000-000000000000}", bool AlwaysSelectDevice = false, bool UseCommonUI = true, bool CancelError = false) { throw new NotImplementedException(); }