473,651 Members | 2,512 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows Image Acquisition (WIA) Taking black photos

I try to use the Windows Image Acquisition (WIA) with a sample in vb.net but
it takes only back photos and also at low resolution. How can I put ther
resolution at 640x480?
I have a Labtec webcam plus that works fine with other software.
I downloaded two samples from the internte and both of them do the same
problem
The samples are:
http://www.vbforums.com/showthread.php?t=378126
http://www.vbforums.com/attachment.p...chmentid=44367
and
http://msdn.microsoft.com/coding4fun...e/default.aspx
http://download.microsoft.com/downlo...gWebcam-VB.msi

Thanks.
Jul 7 '06 #1
3 5701
Hi Roberto,

Have you tried the WebCam with the Window Explorer?
If you attach the web cam onto the machine, there should be an icon in the
Explorer, My Computer.
Double click that icon and take photo to see what is the result.

Please perform the test and let me know.

Or you may try to use another Web Cam, e.g. the Logitech to see if the code
in the sample works.
Take a photo.
http://msdn.microsoft.com/library/de...us/wiaaut/wia/
wiax/overviews/sharedsamples.a sp

Based on my test, if we use a logitech webcam the result will be the same
as we do in the Windows Explorer.

Also to use WIA in VB.NET we need to install the Windows Image Acquisition
Automation Layer which is a wrapper.
Windows Image Acquisition Automation Layer
http://msdn.microsoft.com/library/de...us/wiaaut/wia/
wiax/overviews/startpagewiaaut .asp

For low level control. I think you may try Windows Image Acquisition (WIA)
directly which should be coding with C++.

Best regards,

Peter Huang

Microsoft Online Community Support
=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 10 '06 #2
With Windows Explorer works very good but only at 352x288 and not 640x480
I also try the VB6 sample you put in
http://msdn.microsoft.com/library/de...redsamples.asp
but it do the same, balck photos. I can see the mix photos in the Windows
Explorer the pictures taken by the VB aplication are balck and the others
good.
I have to change a line in the VB6 code "CameraDeviceTy pe" by
"VideoDeviceTyp e" Because it detected it as VideoDeviceType .

If dev.Type = VideoDeviceType Then 'CameraDeviceTy pe
Dim itm 'As Item
Set itm = dev.ExecuteComm and(wiaCommandT akePicture)
End If

Thanks.

""Peter Huang" [MSFT]" <v-******@online.m icrosoft.comesc ribió en el
mensaje news:31******** ******@TK2MSFTN GXA01.phx.gbl.. .
Hi Roberto,

Have you tried the WebCam with the Window Explorer?
If you attach the web cam onto the machine, there should be an icon in the
Explorer, My Computer.
Double click that icon and take photo to see what is the result.

Please perform the test and let me know.

Or you may try to use another Web Cam, e.g. the Logitech to see if the
code
in the sample works.
Take a photo.
http://msdn.microsoft.com/library/de...us/wiaaut/wia/
wiax/overviews/sharedsamples.a sp

Based on my test, if we use a logitech webcam the result will be the same
as we do in the Windows Explorer.

Also to use WIA in VB.NET we need to install the Windows Image Acquisition
Automation Layer which is a wrapper.
Windows Image Acquisition Automation Layer
http://msdn.microsoft.com/library/de...us/wiaaut/wia/
wiax/overviews/startpagewiaaut .asp

For low level control. I think you may try Windows Image Acquisition (WIA)
directly which should be coding with C++.

Best regards,

Peter Huang

Microsoft Online Community Support
=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 10 '06 #3
Hi Roberto,

I think you may try to use another WebCam to see if the problem persists.
So that we can isolate if the problem is environment specific.
e.g.
WebCam A will work with machine A well, so if we attach the WebCam A onto
the problem machine, what is the result?
or
You may try your WebCam on another machine to see if that works fine. If
yes, I think we can know the problem maybe machine specific.
You may try the hardware from the list below.
http://testedproducts.windowsmarketp...ID=761&cpID=0&
ocID=0&OR=1

Since I have tried with the sample code with a logitec webcam and I can not
reproduce the problem.
So I think the code should be OK.

Also since the problem persisted with Visual Basic 6 which is an unmanaged
code, I think the problem may be hardware or driver related.
I think you may try the newsgroup below.
microsoft.publi c.win32.program mer.mmedia

Best regards,

Peter Huang

Microsoft Online Community Support
=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1410
by: Richard Smith via .NET 247 | last post by:
Hi I'm trying to use WIA for the scanning of an application i'mworking on at the moment, however i don't want the UI it givesyou and woud like to be able to define the properties such asthe scanning area, res etc in a template kind of way so the usercould select a template and then click a button to scan theimage. I found a good article on the Code project about WIA and haveplayed with the code so it scans without the default UI, howeveri'm...
1
2130
by: Ryan Melville | last post by:
Hi, I need to use WIA (Windows Image Acquisition) from managed C++. Is there a "new and improved" way to access WIA from managed C++ (i.e., through .net)? Or, is it the same COM calls as from unmanaged C++? If it's the same COM calls, is there a "new and improved" way to access COM through managed C++? Or, do I do the same CComPtr magic as with unmanaged C++? Or, can I not use ATL facilities from managed C++ and I would have to...
3
7459
by: Bob | last post by:
Gidday, Anyone in here used WIA before? I want to be able to connect to a digital camera via USB and access the images. I was hoping WIA would be all I need but it doesn't see my camera (Sony DSC-F717). Does the camera being used need some kind of compliant driver? Or should any XP-recognised digital camera work? I know I can tap into the supplied software that came with the camera but
4
7969
by: Simon Verona | last post by:
I'm using wia in a vb.net project to capture images from a scanner.. This works fine. However, I want to control the way that images are scanned - ie B+W, Greyscale and resolution etc, but can't work out how to. My code for scanning is below (sorry it's a bit messy - it's been chopped and changed around a lot)... There seems to be very little documentation on WIA, can anybody help me with this ??? Code is :
6
2794
by: Bob | last post by:
Hi, Can anybody who has used Windows Image Acquisition library 2.0 for XP tell me how to get it to scan ALL documents loaded in the document feeder of a scanner. I have only ever used it to do an image at a time but now need to be able to process as many pages as are loaded. Any useful info appreciated...
19
2233
by: **Developer** | last post by:
When I get the image from the file the file remains locked so the Delete fails with a "used by another process" So I tried using a clone and disposing the obtained image. But that didn't fix the problem. Can you help?
3
12189
by: Nicholas Lee | last post by:
I am using Visual Studio 2005 and wish to program using managed C++ code. I am writing an application to take still images from a webcam. I have created an interop 'reference' to the platform SDK dll for Windows Image Acquisition (WIA). This has created a set of classes under "Interop.WIALib.1.0.dll" Here is the bewildering set of classes it creates: WIALib::CollectionClass
0
1259
by: wachucky | last post by:
hi all, i try to use WIA 2.0 for my project which use scanner, it works fine..but i'm don't know how to detect wether the scanner is connected to the pc or not. i like to prompt a message when the program found that there is no scanner connected to the pc. Could anyone help me=)..anyway, i found this code somewhere but its not working. Please help me DeviceManager manager = new DeviceManagerClass(); foreach (DeviceInfo info in...
1
11075
by: bharathv6 | last post by:
i need to do is modify the image in memory like resizing the image in memory etc ... with out saving it disk as i have to return back the image with out saving it disk PIL supports the use of StringIO objects being passed in place of file objects. StringIO objects are binary strings of variable length that are kept in memory so i saved the image in stringio objects the following code does that for gif image ...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8802
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8697
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8579
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7297
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1587
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.