Solved

WIA Aquire Image  - set resolution.

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Windows phone Development 11 29
Handling arrays 14 35
Apostrophe (') in Full-Text Search String SQL server-2016 6 48
XAML: Layout 8 9
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

10 Experts available now in Live!

Get 1:1 Help Now