Partial Screenshot

Get help using Construct 2

Post » Tue Jan 31, 2017 1:36 pm

This is a big ask I know, but here goes. Is there a method to capture a screenshot of a partial part of the screen on a mobile or tablet.
I have seen other apps achieve this.
Example
Screen size = 1280 x 800
I want to capture a screenshot of only 600 x 900
B
9
S
3
Posts: 146
Reputation: 1,150

Post » Wed Feb 01, 2017 4:36 am

If you search for it, there's probably a more detailed answer, but basically, you resize the window, then take your screenshot.
B
88
S
43
G
71
Posts: 601
Reputation: 43,669

Post » Wed Feb 01, 2017 9:31 am

Thanks
Search here I come...
B
9
S
3
Posts: 146
Reputation: 1,150

Post » Wed Feb 01, 2017 2:58 pm

No luck with the search.
So is it possible to change the window size at runtime?
B
9
S
3
Posts: 146
Reputation: 1,150

Post » Thu Feb 02, 2017 1:23 am

I shoulda said 'canvas', not 'window'

system > set canvas size
system > snapshot canvas
Don't forget you'll also need to scrollto whichever part of the canvas you're trying to get a screenshot of.
Last edited by spacedoubt on Thu Feb 02, 2017 2:55 am, edited 2 times in total.
B
88
S
43
G
71
Posts: 601
Reputation: 43,669

Post » Thu Feb 02, 2017 2:44 am

Set layout scale and then scroll to an object somewhere in the center of the area you want to take a snapshot of.

I have not used the new C2 capture feature but that should work. You may get a blown up image but would probably work.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Fri Feb 03, 2017 12:13 pm

This is the normal layout
Image

This is the preview where I zoom in the layout so that the picture fills the width of the layout
Image

This is the screen shot that I would require
Image

Not sure if this is possible?
B
9
S
3
Posts: 146
Reputation: 1,150

Post » Fri Feb 03, 2017 5:41 pm

The catch is with any fullscreen scaling the image will still be the size of the screen.

If you use the paster or canvas object you can do this instead:
https://www.dropbox.com/s/mdb3cy5pwt7eb ... .capx?dl=0

1. A snapshot is done
2. The image is loaded into a Sprite that covers the view.
3. That Sprite is pasted to a paster object that is positioned to the spot you want and with the image resolution you want.
4. The paster.imgUrl expression will give a base64 URL just like the canvassnapshot expression to save the result.
Last edited by R0J0hound on Wed Apr 05, 2017 5:31 pm, edited 1 time in total.
B
94
S
33
G
118
Posts: 5,395
Reputation: 75,851

Post » Fri Feb 03, 2017 7:49 pm

Was hoping R0J0hound would comment. Seems that its not possible without third party plugins.
Thanks everyone for your help.
B
9
S
3
Posts: 146
Reputation: 1,150

Post » Fri Feb 03, 2017 8:14 pm

To be clear it is possible without third party plugins if no fullscreen scaling is used. Also it may be possible to do by fiddling with some css of the canvas and such, but i didn't spend much time exploring that idea.
B
94
S
33
G
118
Posts: 5,395
Reputation: 75,851

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests