Hallo,
please does anybody know, how to make a "button" to take picture from the view in the tour and save it as JPG or to choose share to social media?
Thanks for help.
Milos
Make a pictrure view from the tour
- Hopki
- Gnome
- Posts: 13018
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
Hi Milos,
This can be done.
Open the skin editor add a text box and copy and paste this code:
Create the outout, now you need to edit the HTML page:
Find this line in teh HTML page:
And replace it with this:
This will show a text link, when clicked it will download a screenshot.
Regards,
This can be done.
Open the skin editor add a text box and copy and paste this code:
Code: Select all
<a href="#" onclick="javascript:this.download = 'image.jpg';var dl=pano.getWebGlContext().canvas.toDataURL('image/jpeg');dl=dl.replace('image/jpeg', 'image/octet-stream');this.href = dl;" >download</a>
Find this line in teh HTML page:
Code: Select all
pano=new pano2vrPlayer("container");
Code: Select all
pano=new pano2vrPlayer("container",{ webGLFlags: { preserveDrawingBuffer:true } });
This will show a text link, when clicked it will download a screenshot.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
-
- Posts: 75
- Joined: Wed Apr 04, 2018 10:18 pm
Thank you very much, I will try it!
Milos
Milos
-
- Posts: 75
- Joined: Wed Apr 04, 2018 10:18 pm
Hallo Hopki,
I did not succes well. I did the video how I did it, could you be so kiund and check it?
I can do the image JPG, but its only black.
Thanks for help.
https://youtu.be/F_pG7qIvQJg
MIlos
I did not succes well. I did the video how I did it, could you be so kiund and check it?
I can do the image JPG, but its only black.
Thanks for help.
https://youtu.be/F_pG7qIvQJg
MIlos
-
- Posts: 75
- Joined: Wed Apr 04, 2018 10:18 pm
Dear Hopki,
thanks a lot for support. I downloaded the video. I will try it soon.
I am thinking about the "button" to push it which is part of the skin, this is more comfortable. I will think about it
Thanks a lot!!!
Milos
thanks a lot for support. I downloaded the video. I will try it soon.
I am thinking about the "button" to push it which is part of the skin, this is more comfortable. I will think about it
Thanks a lot!!!
Milos
- soulbrother
- Posts: 545
- Joined: Tue Apr 08, 2008 7:01 pm
- Location: München
- Contact:
Martin, is it true, that a "screenshot" is taken, but only the panorama and NOT the skin elements that are displayed in the browser window?
- Hopki
- Gnome
- Posts: 13018
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
Hi,
Yes, that's correct it shows just the panorama and not the skin.
Regards,
Yes, that's correct it shows just the panorama and not the skin.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
A nice effect! Is it possible to make the text containing the screenshot function invisible and place an SVG graphic under it as a childelement, so that clicking on the graphic triggers the screenshot? I have tried it without success.
- Hopki
- Gnome
- Posts: 13018
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
Hi,
To use this with a button.
Repace the code in the text box with this:
Change the ID of the text box to something like "_snapshot_code" without the quotes.
Deselect visible so it's hidden.
Then in a button add a Go To URL action with URL:
You still need to replace the code in the HTML page with the following:
Regards,
To use this with a button.
Repace the code in the text box with this:
Code: Select all
<a href="#" onclick="javascript:this.download = 'image.jpg';var dl=pano.getWebGlContext().canvas.toDataURL('image/jpeg');dl=dl.replace('image/jpeg', 'image/octet-stream');this.href = dl;" download id="snapshot"></a>
Deselect visible so it's hidden.
Then in a button add a Go To URL action with URL:
Code: Select all
javascript:document.getElementById("snapshot").click();
Code: Select all
pano=new pano2vrPlayer("container",{ webGLFlags: { preserveDrawingBuffer:true } });
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Hi Hopki,
thank you, this seems to me to be more elegant than the simple textbox:
https://www.pano.szenerien.de/XPhase_Pr ... index.html
Best regards
Harald
thank you, this seems to me to be more elegant than the simple textbox:
https://www.pano.szenerien.de/XPhase_Pr ... index.html
Best regards
Harald
Hi Hopki, can we also (selectively) expose skin elements in the resulting image? This has made my day... Thanks man
- christianm_hz
- Posts: 6
- Joined: Fri Oct 30, 2020 5:04 pm
- Location: Quedlinburg, Germany
- Contact:
Hi hopki and panox
Thank you for this very nice solution.
It is possible to add an png in the generated image? such as a logo centered at bottom?
Greetings
Christian
Thank you for this very nice solution.
It is possible to add an png in the generated image? such as a logo centered at bottom?
Greetings
Christian
Hi Hopki,
unfortunately, this solution is not suitable for display on my iPad. I have to hide the icon with a Logic Block setting.
unfortunately, this solution is not suitable for display on my iPad. I have to hide the icon with a Logic Block setting.
This would be better than copying the changed html file back into the output folder every time the project is changed.