Can't set Scanner DPI using WIA

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Im using Visual C# 2010, and able to scan using WIA. It scans fine on my Lexmark scanner, but when tried on another scanner (Brother), it seems to scan too high of resolution causing only 1/4 of the page to be scanned.
I need to do lower DPI to 150x150, or 75x75 and trying to insert property such as below to the Scanner class,<br/>

item.Properties.get_Item("6147") = 150;<br/>
item.Properties.get_Item("6148") = 150;
But "get_Item" is not being recognized. Please help.
<pre class="prettyprint public class Scanner
{
private readonly WIA.DeviceInfo _deviceInfo;

public Scanner(WIA.DeviceInfo deviceInfo)
{
this._deviceInfo = deviceInfo;
}

public WIA.ImageFile Scan()
{
// Connect to the device
var device = this._deviceInfo.Connect();

// Start the scan
var item = device.Items[1];

var imageFile = (WIA.ImageFile)item.Transfer(WIA.FormatID.wiaFormatJPEG);

// Return the imageFile
return imageFile;
}
}
[/code]
<br/>
<br/>

View the full article
 
Back
Top