Solved

WIA Aquire Image  - set resolution.

Posted on 2004-09-15
5
3,698 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

738 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