Solved

WIA Aquire Image  - set resolution.

Posted on 2004-09-15
5
3,615 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Why, and when, to use Windows Workflow 1 31
XML & .net 5 40
WKHTMLTOPDF - --disable-smart-shrinking not working 10 32
Error in script 11 45
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

914 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now