Solved

WIA Aquire Image  - set resolution.

Posted on 2004-09-15
5
3,687 Views
Last Modified: 2007-12-19
I am building a small scanner app using WIA - it's for internal use only. I am trying to scan a document without using the wia scan interface.
I can do this however, i cannot set the image resolution properties and they sem to default to 75dpi.

any ideas i want to set both x and y resolution to 150dpi.

cheers

steve
0
Comment
Question by:steve_steele
  • 3
  • 2
5 Comments
 
LVL 44

Expert Comment

by:bruintje
ID: 12063337
as per this post
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=OwrDbMcKCHA.1364%40tkmsftngp11

changing the resolution and other properties other then default seems a problem without the GUI

the author also has a sample on the codeproject that could be useful
source : http://www.codeproject.com/dotnet/wiascriptingdotnet.asp

HTHAB
0
 

Author Comment

by:steve_steele
ID: 12063384
That's what i thought.
I've seen the file you mention and that uses scripting - any idea on how to get started using native WIA?
0
 
LVL 44

Accepted Solution

by:
bruintje earned 500 total points
ID: 12063449
the source code with the article contained an easyimage project but the wialib dll was not included, at least it errored on my machine here

you can find the wia lib here
http://www.ilixis.com/developer/wia.html

with the typelib import tool you can import the com dll and derive an interface you can use in your .net project references and there is a long thread on using it in C#
http://tinyurl.com/3se7w
0
 

Author Comment

by:steve_steele
ID: 12072556
I've looked at both articles one uses WIALib (Microsoft Windows Image Aquisition 1.01)  and the other uses WIA(Microsoft Windows Image Aquisition 2.0)

I can get my application to work using either 1.01 or 2.0 but if i scan without the UI then im the image is scanned at 75dpi and i can find nowhere to set it any different. I've looked on MSDN but can not find anything that helps me.

Any Ideas?
0
 

Author Comment

by:steve_steele
ID: 12075612
I have found something on the microsoft site that says ...

WIA_IPS_XRES - Horizontal Resolution (ScannerPictureXres)
Specifies the current horizontal (X) axis resolution, in dots per inch (DPI).For scanners that do not support the independent setting of horizontal and vertical resolutions, the vertical resolution tracks the Horizontal Resolution property. To find out if the scanner supports independent resolutions, query the Vertical Resolution property.

Type: VT_I4, Access: Read/Write


but i have no idea how to access that or indeed if i can.

anyone?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question