PDA

View Full Version : Panorama Images


UweB
25th of November 2006 (Sat), 09:28
I tried to prepare a panorama image. It was by way of croping made to look like one...:-) then i adjusted the settigs in the photo editor like:

Panorama: "Yes"
Viewerstyle: "Panorama tools java panorama" or: "Panorama tools java crypted...."

So, when i want to see this image i get an "image not available" red cross or it simply stays white but sometimes i can see the java logo. When i revert the Viewerstyle to "standard img tag" i can see it again.

I installed a fresh java 2 v# 1.5.0 and tried this out with Mozilla and IE7 in Windows XP. What conditions must be meet that this works? Did i forget to install or prepare something else?

wkitty42
26th of November 2006 (Sun), 17:23
i used a camera, once several years back, that had a panorama setting built into it... as i recall, that camera required you to take the shot(s) while rotating the camera... basically, what it did was to take numerous shots and then it had special software that came with it to sew the shots back together... however, i'm also a space buff and i've seen some of the panorama shots from the rovers on mars... several of those, as i recall, used java or javascript to load and crop the photos as you slide around the view...

now, i know that your cropping and putting together is basically the same as the sewing together that the camera software did but i'm not sure about the stuff like i've seen in the mars shots... i also remember some sites that used VRML (Virtual Reality Markup Language) and provided walkthrus of houses, cars and (most recently) aircraft... however, i think that a lot of stuff like this is now also being done with macromedia's flash and such...

Pekka
26th of November 2006 (Sun), 18:40
I tried to prepare a panorama image. It was by way of croping made to look like one...:-) then i adjusted the settigs in the photo editor like:

Panorama: "Yes"
Viewerstyle: "Panorama tools java panorama" or: "Panorama tools java crypted...."

So, when i want to see this image i get an "image not available" red cross or it simply stays white but sometimes i can see the java logo. When i revert the Viewerstyle to "standard img tag" i can see it again.

I installed a fresh java 2 v# 1.5.0 and tried this out with Mozilla and IE7 in Windows XP. What conditions must be meet that this works? Did i forget to install or prepare something else?

I tried it out and this works:




Updating PTviewer viewerstyle for 2.8 (one time procedure)

1. download ptviewer 2.8 from http://www.fsoft.it/panorama/ptviewer.htm
2. place the applet ptviewer.jar (try bigger version first) in EE root folder.

3. EDIT (change) VIEWERSTYLE_pt_panorama.php to:


<?php
// VIEWER STYLE:
// PANORAMA TOOLS 2.7 VIEWER by Pekka Saarinen
// REQUIRED (NOT PART OF EE PACKAGE): download PTviewer jar from http://www.fsoft.it/panorama/ptviewer.htm and place it in EE root folder


?><applet code="ptviewer.class" archive="ptviewer.jar" width=<?php print @$PT_width; ?> height=<?php print @$PT_height; ?>>
<param name="file" value="<?php print $url; ?>">
<param name="cursor" value="<?php print @$PT_cursor; ?>">
<param name="pan" value="<?php print @$PT_pan; ?>">
<param name="fov" value="<?php print @$PT_fov; ?>">
<param name="fovmax" value="<?php print @$PT_fovmax; ?>">
<param name="fovmin" value="<?php print @$PT_fovmin; ?>">
<param name="auto" value="<?php print @$PT_autospeed; ?>">
<param name="showToolbar" value="<?php print @$PT_showtoolbar; ?>">
<param name="imgLoadFeedback" value="<?php print @$PT_imgLoadFeedback; ?>">
</applet><?php
// EOF
?>


and save.

4. Now you must add those variables into viewerstyle called "Panorama Tools Java panorama", go to viewerstyle editor and simply click "add custom variable" few times so that you have 10 custom variables there, and then edit them to:

126869

and save.




Using the "Panorama Tools Java panorama" viewerstyle

In photo editor, change the viewerstyle to "Panorama Tools Java panorama". This will enable the applet.

To change applet parameters for each panorama, select "Custom variables" from dropdown next to viewerstyle selection, and save. This will open you list of variables that control the applet. Change the values and save, on next photo page reload the new values are applied. Note that in this case you have viewer width and height in custom variables, those "width" and "height" values in size path have no effect, the size is set in custom variables.

That's basically it.

You can of course add more custom variables, there are tons of them for PTviewer, there is no variable amount limit in EE.

If you want to revert to default custom variables: disable custom variables + save, and enable them again + save.

Pekka
26th of November 2006 (Sun), 18:51
And one very important thing about PTviewer applet. It has inbuilt firewall that prevents it loading images from any other domain than its own location. So if you have images in www.photo.com and your site is in localhost, applet will not load the photo.

One way around that firewall is to tick on "use ftp path and filename obfuscation" in viewerstyle, but do not do it before you get EE 2.02 as that feature has some bugs in 2.01.

Pekka
26th of November 2006 (Sun), 19:23
Second addition: there is a nasty bug in viewerstyle editor which means when you change variable name, it is not reflected in photos already using that variable under that viewerstyle. Only way to update it is to save the photo in photo editor. Here's a fix to make it work as intended:

Change in EDITOR_viewerstyle.php (near line 450):

if (isset($current_variable_array[0])) {

to

if (isset($current_variable_array)) {

Sometimes smallest bugs make the biggest mess :)

UweB
27th of November 2006 (Mon), 14:51
Hi Pekka !

thank's a lot for your detailed instructions !!
I did everything... really i did ! Step by step but it does not work... I can see the applet but i think that no picture is loaded. I activated the image loading progress and all i can see is 100% and then white.

If i change the setting "use ftp path and filename obfuscation" i can see a text line of the image name just behind the applet window.

I even tried all this with a new image...

The http code in the image/applet loading section of the loaded page looks like this:

<td><div class="ee_big_photo"><applet code="ptviewer.class" archive="ptviewer.jar" width=400 height=300>

<param name=file value="http://www.borck.ch/gallery/images/biggest/Image_480pano.jpg">
<param name=cursor value="MOVE">
<param name=pan value=-105>
<param name="fov" value="100">
<param name="fovmax" value="140">
<param name="fovmin" value="25">
<param name="auto" value="0.2">
<param name=showToolbar value="true">
<param name=imgLoadFeedback value="true">
</applet> </a></div>

</td>

Unfortunately i do not understand enough about coding to be able to see behind all this...

What does the setting in the photo editor for Panorama Yes/No actually do? I could not note a difference with or without this setting.

Pekka
27th of November 2006 (Mon), 16:27
If I go to http://www.borck.ch/gallery/images/biggest/Image_480pano.jpg I do not see the image.

UweB
28th of November 2006 (Tue), 01:52
Hi Pekka !
It was meant to be security by obscurity...
the right path is: http://www.borck.ch/gallery/photos/big/Image_480pano.jpg .

What i can see is: In Mozilla, when i right click the page -> View Page Info -> Media Tab i can see a list of all media objects in the page. For the microthumb the path goes right to the image name. For the large image the path only goes as far as the directory.

I set in an .htacces file "deny directory listing without an index file". So a direct link to the image from outside my domain is not possible. Perhaps it is because of this setting...

chriz
28th of November 2006 (Tue), 12:56
Hey :-)

I followed all instructions above but cannot get panorama's to display either.
And in the course I 'accidentally' erased the custom variables for default style (standard img tag)
So two questions:
Where can I find the custom variables for standard img tag from a fresh installation.
And what else can I check/do to get panorama's whirling?

On my previous installation they work:
http://ee.photoevents.nu/photo.php?photo=4364
On my new upgraded system not:
http://www.photo-events.eu/photo.php?photo=4364
(I'll have to remove that frame by the way)

Pekka, if you need my login, ...

Christian

UweB
28th of November 2006 (Tue), 14:14
Hi chriz
your old panoramas work in my browser too :-) Nice !

The new one looks just as mine... except that in the page info of your site i can see a full image path to your panorama image were as in my browser it only goes as far as the directory...

kolohe
28th of November 2006 (Tue), 17:25
I set in an .htacces file "deny directory listing without an index file". So a direct link to the image from outside my domain is not possible. Perhaps it is because of this setting...

If you're referring to the Options -Indexes directive in .htaccess, it DOES NOT prevent linking to an image from outside of your domain. All it does is prevent apache from displaying a list of all the files in that directory. If memory serves me correctly, preventing linking is a bit more complex.

chriz
28th of November 2006 (Tue), 17:33
I just notice that in the new installation some photos from another exhibition mix with the panoramapictures.
? http://www.photo-events.eu/photo.php?photo=4364

wkitty42
28th of November 2006 (Tue), 20:11
If memory serves me correctly, preventing linking is a bit more complex.
your memory is working just fine... it is a bit more complicated and it does involved .htaccess files as well as mod_rewrite ;)


basically what one does is to check the referrer string that is presented when accessing the photo... if the referrer string isn't from your domain or one that you do allow to link to the photo, then you give "them" something to think about... in my case, i (try to) present another graphic in the place of the one being cross linked... some folk present rather "exciting" graphics while others present one that simply states that the crosslink is forbidden... personally, i kinda think that i'd like to use some type of script to create the alternative graphic that contains instructions on how to access the "forbidden" photo... for example, they might see verbiage like the following...

cross link access forbidden! to view this photo, go to http://www.invalid.domain/photo.php?photoid=123

possibly also a note to not to click on the displayed photo because it won't lead them to the site hosting the photo...

UweB
29th of November 2006 (Wed), 01:14
Well yes, it's the directory listing that is not possible...

it is always so tempting to click administer something... it helps, not having to understand it fully even so it works or not :-)

chriz
30th of November 2006 (Thu), 09:58
Only one day ago!
So, I'm probably being impatient here.
Has anyone read my message above?
Maybe someone on the forum knows how to fix the problem I have with displaying panorama's.
But surely someone could send me a screendump with the custom variables for the standard img tag which I erased by accident... well actually while not being attentive.

Thanks,
:-)

wkitty42
2nd of December 2006 (Sat), 13:29
But surely someone could send me a screendump with the custom variables for the standard img tag which I erased by accident... well actually while not being attentive.

my apologies, chriz... i was going to do this for you and got wrapped up in other stuff...

http://www.wpusa.dynip.com/wpusa_images/eE_Std-img_defs.jpg

FWIW: i don't believe that these custom vars are actually being used... i'd suspect, just from looking at their names, that they were used for testing while pekka was working on that section of code...

chriz
3rd of December 2006 (Sun), 02:54
You could be right, especially looking at the odd names.
Thanks anyways,
Thuesday I'll have some time to delve into the panoproblem which I really want to be solved.
chriz

Pekka
3rd of December 2006 (Sun), 08:40
And what else can I check/do to get panorama's whirling?

On my previous installation they work:
http://ee.photoevents.nu/photo.php?photo=4364
On my new upgraded system not:
http://www.photo-events.eu/photo.php?photo=4364
(I'll have to remove that frame by the way)

Pekka, if you need my login, ...

Christian

In http://www.photo-events.eu/photo.php?photo=4364 browser info says "Loading Java Applet Failed".

java.lang.NumberFormatException: empty String
at sun.misc.FloatingDecimal.readJavaFormatString(Unkn own Source)
at java.lang.Double.valueOf(Unknown Source)
at ptviewer.ReadParameters(Unknown Source)
at ptviewer.init(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: Exception: java.lang.NumberFormatException: empty String

1. Make sure that variable names match variable names exactly in viewerstyle, so that all get a value and not NULL. I also added some more double quotes in viewerstyle above to make sure that NULL's are not possible. Please do the same or copy/paste the viewerstyle again.

2. Try copying the class file from old installation to the new.

chriz
4th of December 2006 (Mon), 04:38
Thanks for the tips. I'll check it tomorrow.

:-)