1. Don Yang
  2. PowerBuilder
  3. Thursday, 28 January 2021 20:54 PM UTC

We are using Powerbuilder 2019 for development. How can I capture stills from video control? Any input would be greatly appreciated!

 

Don

 

 

 

Don Yang Accepted Answer Pending Moderation
  1. Friday, 29 January 2021 19:56 PM UTC
  2. PowerBuilder
  3. # 1

Our goal is to capture the stills and save them to network share as jpg files.

 

Thanks,

 

 

Comment
  1. Chris Pollach @Appeon
  2. Friday, 29 January 2021 20:33 PM UTC
In that case, I would look at Roland's code for this ...

http://www.topwizprogramming.com/freecode_bitmap.html

I have not tried this aspect personally, but it might work. HTH
  1. Helpful
There are no comments made yet.
Don Yang Accepted Answer Pending Moderation
  1. Friday, 29 January 2021 13:39 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Chris

I tried to print the control again and it was sent to printer as a print job. Should it be sent to screen? And is there a way to send it to a jpep file to the location program defined?

 

Comment
  1. Chris Pollach @Appeon
  2. Friday, 29 January 2021 18:41 PM UTC
Hi Don;

Correct, that would capture the Video still to a printer. So you are looking to capture it then to the Windows clipboard instead?

Regards ... Chris
  1. Helpful
There are no comments made yet.
Don Yang Accepted Answer Pending Moderation
  1. Thursday, 28 January 2021 22:59 PM UTC
  2. PowerBuilder
  3. # 3

Just tried with commented out PrintPage() and could not see anything for output. 

Comment
There are no comments made yet.
Don Yang Accepted Answer Pending Moderation
  1. Thursday, 28 January 2021 22:16 PM UTC
  2. PowerBuilder
  3. # 4

Hi, Chris

Here is my test code. It's compiled. It run ok, but where is the output still, how can I save it the location I define?

long Job
Job = PrintOpen( )
Print(Job, "Screen capture")
uo_1.ole_active_movie.Print(Job, 200,200, 200,200)
PrintPage(Job)
PrintClose(Job)

 

Thanks so much for the help!

 

Don

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 28 January 2021 22:48 PM UTC
Hi Don ... You should not need the PrintPage() command. If you remove that, does the print output work?
  1. Helpful
There are no comments made yet.
Don Yang Accepted Answer Pending Moderation
  1. Thursday, 28 January 2021 21:20 PM UTC
  2. PowerBuilder
  3. # 5

Thanks for the response, Chris.

Video control is running inside a PB app. It's an ole control. Someone built a dll in c++ years ago to capture the stills. After moving to PB2019, we still stuck with this old still capture dll which running in the previous version of powerbuilder. Need to explorer the new way to capture stills.

 

Thanks again!

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 28 January 2021 21:26 PM UTC
Hi Don;

Thank you for confirming that it's a control within your PB App. If that is the case, then why not just a) pause the video and then b) use PB's built-in Print() command. For example:

<VideoControl>.print ( /*long j*/, /*integer x*/, /*integer y*/, /*integer w*/, /*integer h */)

Regards ... Chris
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 28 January 2021 21:00 PM UTC
  2. PowerBuilder
  3. # 6

Hi Don;

  Is this video control running inside a PB App or externally to it?

Regards ... Chris

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.