Solved

WIA Aquire Image  - set resolution.

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

726 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