1. Matt Kleweno
  2. PowerBuilder
  3. Thursday, 28 September 2023 12:25 PM UTC

We are attempting to add a new webcam image capture feature to our flagship Powerbuilder application.  We would like to be able control image capture via a PowerBuilder window but are having difficulty finding a solution that works with Windows 10 or Windows 11.

A few years ago the obvious choice would have be a camera with a TWAIN driver connecting to a TWAIN ActiveX control instantiated in our PowerBuilder application.  Unfortunately Microsoft appears to no longer support TWAIN and camera manufacturers no longer provide TWAIN drivers.

 Microsoft has replaced TWAIN with WIA (Windows Image Acquisition).  However, we have not been able to find a WIA ActiveX control to plug into our PowerBuilder application.

 Any knowledge or assistance you can provide concerning capturing images from a PowerBuilder application would be appreciated.

Matt Kleweno Accepted Answer Pending Moderation
  1. Monday, 13 November 2023 20:52 PM UTC
  2. PowerBuilder
  3. # 1

We ended up using the Web Browser control to contain a static web page with included the webcam video and a "capture" button.  The capture button calls a function that grabs the static image from the webcam and sends a base64 image string (blob) to the function that is registered as an event in  the Web Browser control.  The Web Browser event then loads the base64 image into a separate Picture control to display the image captured from the webcam video.  The image can then be saved to a file from the Picture control if the the user likes it.

Comment
  1. Armeen Mazda @Appeon
  2. Monday, 13 November 2023 21:18 PM UTC
Thanks for sharing the solution!
  1. Helpful
There are no comments made yet.
Roy Bungert Accepted Answer Pending Moderation
  1. Thursday, 28 September 2023 13:44 PM UTC
  2. PowerBuilder
  3. # 2

Have a look at https://batchloaf.wordpress.com/commandcam/ and start the program via Run() in a batch.

If you want to convert, edit or crop the pictures you can use https://imagemagick.org/index.php

Same topic here: https://community.appeon.com/index.php/qna/q-a/take-a-photo-or-image-with-a-webcam

 

HTH Roy

 

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.