This post has been edited 1 times, last edit by "copenhagenjoe" (Mar 12th 2016, 8:56pm)
This post has been edited 1 times, last edit by "sachagriffin" (Mar 12th 2016, 9:22pm)
I guess I don't really know! Was hoping there was a way to hack the resolution temporarily to get around black screens. I guess not possible!What do you mean exactly?
By panotools do you mean the panorama tools that ptgui is based on? Haven't used those on their own before, do you know of any good documentation of translating the krpano ath/atv/fov to points within cubefaces or original image? So take the original psd and generate cubefaces, and use those to stitch. I would think if a user is being displayed 10 tiles 4 levels down, they'd be the same viewpoint, but this is not so?You can translate all the tiles for a particular level back into a full size panoramic image and export a rectalinear snap shot based on the ath,atv, and fov.
If you figure out the math to place each image precisely.
Definitely doable with panotools or maybe krpanotools itself ( I haven't checked).
Probably easy to just have 6 psbs/jpgs for cube faces to stitch from. Stitching straight tiles won't work since they are cubeface pieces, not images taken from a single perspective.
you're exactly right, this is the problem we're running into!Yeah older iphones and ipads, tend to return black when they run out of memory.
You have a working version of this already? Do you just use some sort of fallback image to display if the user is on an older ipad or another affected device? We haven't tried doing anything from the original psd, but it seems this would be pretty resource heavy.Personally, I just went the canvas route.. but maybe I'll get time to take a look at restitching tiles again since it will always work.
I've seen some server side solutions already implemented. Whether it was from tiles or a psb, I'm not sure. They didn't have very good input sanitization, I know that. ;)
A full size psb should be straight simple to script out but then you need double disk space for each image.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<action name="makescreenshot" type="Javascript"><![CDATA[
if (krpano.webGL &&
krpano.webGL.context.getContextAttributes().preserveDrawingBuffer)
{
try
{
var img_src = krpano.webGL.canvas.toDataURL();
...
}
catch(err)
{
krpano.trace(3,err);
}
}
else
{
krpano.trace(3,"no webgl or no preserveDrawingBuffer");
}
]]></action>
|
Location: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comYou could use a form to send the data to a server side process with, for instance, PHP. You could then store the file on the server or you could open the image in the browser.Once the image is loaded into img_src do you have any ideas for how to then use it?
|
|
Source code |
1 2 3 |
<form name="imageForm" id="imageForm" action="./lib/screenshot.php" method="POST" target="_blank"> <input type="hidden" name=imageData id="imageData"> </form> |
|
|
Source code |
1 2 |
document.getElementById('imageData').value = img_src;
document.imageForm.submit();
|
|
|
Source code |
1 2 3 4 5 6 7 |
<?php
$imageDataPost = $_POST['imageData'];
$imageData = substr($imageDataPost,strpos($imageDataPost,",")+1);
header('Content-type: image/JPEG');
echo base64_decode($imageData);
?>
|
I tried various versions of safari (Snow leopard to El Capitan and IOS 9, and none yield an image. It's either black/white or corrupt. It works in FF and Chrome. The safari data does contain the correct dimensions, but it's not a capture of the buffer.but when i want to use the data url inside the krpano project i get this error in Safari :
loading error: data:image/jpeg;base64,/9j/4AAQSkZJR