You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, December 6th 2011, 12:13am

How to display image with loading bar?

Hi!
I'm looking for way to display image after clicking a hotspot. For now I realized it as easy as possible:

Source code

1
2
3
       <action name="akcja_pokaz">    set(plugin[%1].visible,true);    tween(plugin[%1].alpha,1.0,0.5);    set(plugin[%2].onclick,action(akcja_zamknij(%1));)    </action>
    <action name="akcja_zamknij">    tween(plugin[%1].alpha,0,,,set(plugin[%1].visible,false));    set(plugin[%2].onclick,action(akcja_pokaz(%1));)    </action>  
<hotspot name="spot0" handcursor="true" url="../_skin/loupe-icon.png" ath="54" atv="0.05" onclick="akcja_pokaz(akcja0,spot0);"/>	<plugin name="akcja0" align="center" customColor="true" keep="false" onclick="akcja_zamknij(akcja0);" url="../_zooms/3.png" alpha="0.0" visible="false" align="center" height="90%" width="prop" />


...but I must place large image (near 1.5MB PNG). On slow connection (1-1.5Mbit/s) after clicking hotspot user must wait 15-20 seconds.
Is there any way (for sure it is *g*) to add loading bar for it?

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Tuesday, December 6th 2011, 1:20am

1.5 mb?? How can there ever be a reason?
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

3

Tuesday, December 6th 2011, 11:24am

1.5 mb?? How can there ever be a reason?
Please, don't even ask ... my client tell me that plaque on the monument is unreadable, so I must place loupe with extra photo. After that he said that I should cut out the background and leave the plaque itself (which is not rectangular).
Ofc I know that PNG is not good format for multi-color images but client pay, client decide ...

mindlessboss

Professional

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

4

Tuesday, December 6th 2011, 1:44pm

Hi!
May be something like this....

On start loading add some plugin (with text LOADING... for example)
and hide them on loaded.
This is not loading bar but better then nothing.

I'm using this trick for show large images and fotos

Andrey *thumbup*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

Zephyr

Professional

Posts: 994

Location: Netherlands

Occupation: Web developer

  • Send private message

5

Tuesday, December 6th 2011, 2:26pm

that, or create a flash preloader

or make it a FLAT panorama :P with a backnutton.
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

Tuur

Sage

Posts: 3,206

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

6

Tuesday, December 6th 2011, 6:53pm

Quoted


Ofc I know that PNG is not good format for multi-color images but client pay, client decide ...


Is that true?

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Zephyr

Professional

Posts: 994

Location: Netherlands

Occupation: Web developer

  • Send private message

7

Tuesday, December 6th 2011, 10:29pm

yeah. If you have lots of colors, its better to have a jpg. Its smaller because it looks at neighbouring colors. Im not talking about quality here ;)
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

Tuur

Sage

Posts: 3,206

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

8

Tuesday, December 6th 2011, 10:30pm

Ah ok i c
Thx Z
T
*g*
http://www.virtualtuur.com
Skype:studiotuur

9

Wednesday, December 7th 2011, 1:47am

I've found compromise solution - GIF w/color map. Each image take ap. 300KB so, it's acceptable for me.
I previously think about using flash preloader but there is two problems - I don't know flash very well and it will fail on mobile devices.

Thanks for help guys!

btw. PNG offer good quality bcs this format is nearly loss-less. PNG use Zlib to compress whole pixels - it's ideal for layout graphics or logos but file size increases rapidly with increasing number of colors (especially if we use gradients).