Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / GetImage() does not render video output

Author
Message
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 8th Mar 2019 15:33 Edited at: 8th Mar 2019 15:34
As the title said, GetImage() does not render the video output to image.
Does the video output from a video not get render onto the image before swap()?
Does it use its own viewport or something?

Any answer appreciated!

Is there a better function to screenshot the viewport?
puzzler2018
User Banned
Posted: 8th Mar 2019 15:37
As it happens, im working on GetImage now lol

GetImage works by getting an image from the back buffer

i.e



Tier 1 Developer
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 8th Mar 2019 15:40 Edited at: 8th Mar 2019 15:42
I mean, I am using something like this:

Agk.Update(0);
Agk.Render();

Agk.GetImage(1, 0, 0, 1920, 1080);
Agk.SaveImage(1, "raw:/AGK/output/media/a.jpeg");
Agk.DeleteImage(1);

Agk.Swap();

Agk.ClearScreen();

If it help at all...
puzzler2018
User Banned
Posted: 8th Mar 2019 15:43 Edited at: 8th Mar 2019 15:46
You need to do some swapping around



EDIT - Are you wishing to take a screen shot and save the current state of your app to a picture file - to potentially create a save/load thumbnail??? Nice idea....
Tier 1 Developer
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 8th Mar 2019 15:49
Well, it turn out you do not need clearscreen....

Disabling render and the video is still running, but 2d and 3d object on screen is no longer render...
Does this proof video being play, even when using playvideotoimage() have the video render in a different overlapping viewport?
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 8th Mar 2019 15:50
Oh wait, playvideotoimage() actually work....
There is a slight lag thought...
puzzler2018
User Banned
Posted: 8th Mar 2019 15:54
Ive never experimented with playvideotoimage() - someone else might have though.
Tier 1 Developer
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 8th Mar 2019 15:58
PlayVideoToImage(999)
CreateSprite(1, 999);

It create the image.
puzzler2018
User Banned
Posted: 8th Mar 2019 16:00
Awesome - well found...
Tier 1 Developer

Login to post a reply

Server time is: 2024-03-28 14:15:47
Your offset time is: 2024-03-28 14:15:47