Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WIA and Webcams

524 views
Skip to first unread message

Glenn Keeler

unread,
May 8, 2013, 12:09:43 AM5/8/13
to
I have been exploring replacing TWAIN access to Logitech webcams with WIA. Since Logitech no longer supports TWAIN, particularly under Win7, this appears to be my only option!

I have been trying a WIAAcquireImage function from the post below.


https://groups.google.com/d/msg/comp.lang.clipper.visual-objects/-KTl8UaYffE/KOKqnuKKl1YJ

However, under VO 2.8 SP3 the constants in this function are not recognized. So I am clearly missing something.

Does anyone have experience with WIA under VO who can provide some pointers?

Gustavo Biasone

unread,
May 8, 2013, 11:23:20 AM5/8/13
to
Hi Glenn,

These are the constants (strings) for FormatID:

wiaFormatBMP ({B96B3CAB-0728-11D3-9D7B-0000F81EF32E})
FormatID for the Microsoft® Windows® Bitmap (BMP) format.

wiaFormatPNG ({B96B3CAF-0728-11D3-9D7B-0000F81EF32E})
FormatID for the Portable Network Graphics (PNG) format.

wiaFormatGIF ({B96B3CB0-0728-11D3-9D7B-0000F81EF32E})
FormatID for the Graphics Interchange Format (GIF) format.

wiaFormatJPEG ({B96B3CAE-0728-11D3-9D7B-0000F81EF32E})
FormatID for the JPEG format.

wiaFormatTIFF ({B96B3CB1-0728-11D3-9D7B-0000F81EF32E})
FormatID for the Tagged Image File Format (TIFF) format.

HTH,
Gustavo Biasone

Glenn Keeler

unread,
May 8, 2013, 2:06:43 PM5/8/13
to
On Wednesday, May 8, 2013 9:23:20 AM UTC-6, Gustavo Biasone wrote:

> These are the constants (strings) for FormatID:

Thanks Gustavo. These are helpful. I think I have the other constants I need:

WIA_INTENT_IMAGE_TYPE_COLOR 0x00000001
Preset properties for color content.

WIA_INTENT_IMAGE_TYPE_GRAYSCALE 0x00000002
Preset properties for grayscale content.

WIA_INTENT_IMAGE_TYPE_TEXT 0x00000004
Preset properties for text content.

WIA_INTENT_MINIMIZE_SIZE 0x00010000
Preset properties to minimize image size.

WIA_INTENT_MAXIMIZE_QUALITY 0x00020000
Preset properties to maximize image quality.

WIA_INTENT_BEST_PREVIEW 0x00040000
Specifies the best quality preview.

Glenn Keeler

unread,
May 13, 2013, 10:42:30 PM5/13/13
to
On Wednesday, May 8, 2013 12:06:43 PM UTC-6, Glenn Keeler wrote:
> On Wednesday, May 8, 2013 9:23:20 AM UTC-6, Gustavo Biasone wrote:
>
> Thanks Gustavo. These are helpful. I think I have the other constants I need:

WIA was an exciting little diversion, but as it turns out it doesn't do the one thing I am after, which is capturing an image from a webcam. My clients are all shifting to Windows 7, which apparently limits WIA to scanners.

DirectShow appears to offer what I need, but I am having trouble finding an example syntactically close enough to VO to get me going. Have any of you worked with DirectShow in VO?

Gustavo Biasone

unread,
May 14, 2013, 10:54:41 AM5/14/13
to
Hi Glenn,

I did a webcam capture sample program long time ago. Not sure if it works on W7 and above but you can give it a try:

http://www.voers.com.ar/down/Capturavideo.zip

It uses Windows AVICap video capture.

PD: Most code comments are in Spanish.

HTH
Gustavo Biasone

Glenn Keeler

unread,
May 19, 2013, 11:03:24 PM5/19/13
to
On Tuesday, May 14, 2013 8:54:41 AM UTC-6, Gustavo Biasone wrote:
> Hi Glenn,
>
> I did a webcam capture sample program long time ago. Not sure if it works on W7 and above but you can give it a try:
>
> http://www.voers.com.ar/down/Capturavideo.zip
>
> It uses Windows AVICap video capture.
>
> PD: Most code comments are in Spanish.

Gustavo,

Do you have any idea why this will work the first run, but not subsequently?

Gustavo Biasone

unread,
May 20, 2013, 12:54:03 PM5/20/13
to
Hi Glenn,

Try reinstalling webcam drivers.
I tested it today with an old Philips USB webcam on W7 32 bits. I start/stop video preview multiple times and it works without problem here.
0 new messages