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

Friday, January 28th 2011, 7:21am

My galaxy s (anroid smartphone) shows panorama images of "tablet" images instead of "mobile" images. Why?

Hi,


I have my xml code as follows.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
	<image type="CUBE">
		<tablet>
			<left  url="../pano/1/tablet_l.jpg" />
			<front url="../pano/1/tablet_f.jpg" />
			<right url="../pano/1/tablet_r.jpg" />
			<back  url="../pano/1/tablet_b.jpg" />
			<up    url="../pano/1/tablet_u.jpg" />
			<down  url="../pano/1/tablet_d.jpg" />
		</tablet>
		<mobile>
			<left  url="../pano/1/mobile_l.jpg" />
			<front url="../pano/1/mobile_f.jpg" />
			<right url="../pano/1/mobile_r.jpg" />
			<back  url="../pano/1/mobile_b.jpg" />
			<up    url="../pano/1/mobile_u.jpg" />
			<down  url="../pano/1/mobile_d.jpg" />
		</mobile>
	</image>


when viewing this pano on the iphone the panorama images of "mobile" tag are shown
(which is as expected) but on the galaxy s (android smartphone) the panorama is shown
using the "tablet" images, instead of "mobile" images, which is a big difference.

Galaxy S is not an android tablet pc, it's a smartphone. Is there a way I can control this?

Cheers,
Hyung

HansNyb

Professional

Posts: 936

Location: Denmark

Occupation: Photographer

  • Send private message

2

Friday, January 28th 2011, 10:00am

Hi Hyung

Android is flash so you can see any size.
Instead of making the mobile and tablet images I create them with 512x512 multitiling.
So for example this one is using 4 cubefaces. 512x512, 1024x1024, 2048x2048 and 4096x4096 all as 512 tiles.

http://www.panoramas.dk/2010/carl-bloch.html

You can zoom in all the way on Android to the largest cubefaces. As a fact I can without problem see 5 GB panos on my small Desire Z
You have to use multiresolution for this and you have to choose 512 as tiles and levelsteps has to be 2 to get it working perfect.

If you use standard full cubefaces in size above 2000x2000 you will probably get crashes on Smaller Androids but with multiresolution there is no actual limit.
The largest KRpano gigapixel I seen on mine without any crassh was 50 GB. Jeffreys 90 GB from London does crash when you zoom.
Problem is also that they are all made with small buttons so it is practically impossible to use the zoom button which you need on Android.

iPhone 4 and iPad will use the 1024 cubefaces max. I suppose the old iPhone 3 will use just the smallest 512 cubefaces.
See also the dokumentation about this.

Hans

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

3

Friday, January 28th 2011, 3:21pm

Jeffreys 90 GB from London does crash when you zoom.


i bet if he changed some of the code for the tiles he could prevent that from happening. if he tried.

<image type="CUBE" multires="true" tilesize="557" progressive="false">
<level download="view" tiledimagewidth="2228" tiledimageheight="2228">

progressive="false" means it will load only the first entire level then start the next levels after the first is complete.
level download="view" means it will only download the tiles in the current view.

together they may prevent that crash or more likey just delay it until the cache is filled up after panning around some.

Hans - based on your knowledge of tiles sizes and what platform they work best on am i going to have problems with tiles sizes like these on mobile devices in the future when i make an appropriate inteface? what did you change in your config file to make all the tiles 512?

<level download="view" tiledimagewidth="557" tiledimageheight="557">
<left url="cpnews6.tiles/l1_l_%0v_%0h.jpg" />
<front url="cpnews6.tiles/l1_f_%0v_%0h.jpg" />
<right url="cpnews6.tiles/l1_r_%0v_%0h.jpg" />
<back url="cpnews6.tiles/l1_b_%0v_%0h.jpg" />
<up url="cpnews6.tiles/l1_u_%0v_%0h.jpg" />
<down url="cpnews6.tiles/l1_d_%0v_%0h.jpg" />
</level>
<mobile>
<left url="cpnews6.tiles/mobile_l.jpg" />
<front url="cpnews6.tiles/mobile_f.jpg" />
<right url="cpnews6.tiles/mobile_r.jpg" />
<back url="cpnews6.tiles/mobile_b.jpg" />
<up url="cpnews6.tiles/mobile_u.jpg" />
<down url="cpnews6.tiles/mobile_d.jpg" />
</mobile>
<tablet>
<left url="cpnews6.tiles/tablet_l.jpg" />
<front url="cpnews6.tiles/tablet_f.jpg" />
<right url="cpnews6.tiles/tablet_r.jpg" />
<back url="cpnews6.tiles/tablet_b.jpg" />
<up url="cpnews6.tiles/tablet_u.jpg" />
<down url="cpnews6.tiles/tablet_d.jpg" />
</tablet>

<level download="view" tiledimagewidth="1114" tiledimageheight="1114">
<level download="view" tiledimagewidth="2228" tiledimageheight="2228">

HansNyb

Professional

Posts: 936

Location: Denmark

Occupation: Photographer

  • Send private message

4

Friday, January 28th 2011, 5:15pm

In the kmakemultires.config or vtour-mres.config I just set mobile and tablet to false and then I choose an appropriate maxcubesize of 8192, 4096 or 2048
levelstep=2 and levels=auto tilesize=512

With 8192 as max I then get this.

<image type="CUBE" multires="true" tilesize="512" progressive="false">
<level tiledimagewidth="8192" tiledimageheight="8192">
<left url="gallaaften.tiles/l5_l_%0v_%0h.jpg" />
<front url="gallaaften.tiles/l5_f_%0v_%0h.jpg" />
<right url="gallaaften.tiles/l5_r_%0v_%0h.jpg" />
<back url="gallaaften.tiles/l5_b_%0v_%0h.jpg" />
<up url="gallaaften.tiles/l5_u_%0v_%0h.jpg" />
<down url="gallaaften.tiles/l5_d_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="4096" tiledimageheight="4096">
<left url="gallaaften.tiles/l4_l_%0v_%0h.jpg" />
<front url="gallaaften.tiles/l4_f_%0v_%0h.jpg" />
<right url="gallaaften.tiles/l4_r_%0v_%0h.jpg" />
<back url="gallaaften.tiles/l4_b_%0v_%0h.jpg" />
<up url="gallaaften.tiles/l4_u_%0v_%0h.jpg" />
<down url="gallaaften.tiles/l4_d_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="2048" tiledimageheight="2048">
<left url="gallaaften.tiles/l3_l_%0v_%0h.jpg" />
<front url="gallaaften.tiles/l3_f_%0v_%0h.jpg" />
<right url="gallaaften.tiles/l3_r_%0v_%0h.jpg" />
<back url="gallaaften.tiles/l3_b_%0v_%0h.jpg" />
<up url="gallaaften.tiles/l3_u_%0v_%0h.jpg" />
<down url="gallaaften.tiles/l3_d_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="1024" tiledimageheight="1024">
<left url="gallaaften.tiles/l2_l_%0v_%0h.jpg" />
<front url="gallaaften.tiles/l2_f_%0v_%0h.jpg" />
<right url="gallaaften.tiles/l2_r_%0v_%0h.jpg" />
<back url="gallaaften.tiles/l2_b_%0v_%0h.jpg" />
<up url="gallaaften.tiles/l2_u_%0v_%0h.jpg" />
<down url="gallaaften.tiles/l2_d_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="512" tiledimageheight="512">
<left url="gallaaften.tiles/l1_l_%0v_%0h.jpg" />
<front url="gallaaften.tiles/l1_f_%0v_%0h.jpg" />
<right url="gallaaften.tiles/l1_r_%0v_%0h.jpg" />
<back url="gallaaften.tiles/l1_b_%0v_%0h.jpg" />
<up url="gallaaften.tiles/l1_u_%0v_%0h.jpg" />
<down url="gallaaften.tiles/l1_d_%0v_%0h.jpg" />
</level>
</image>

This is the Royal Birthday pano http://www.panoramas.dk/2010/queen-margrethe-birthday.html
Which is partial but still has to be full spherical with just extra black canvas.

Works fine on my Desire Z Android with full zoom in. iPad and iPhone just use the 1024 size.

Most of the panos are of course not that big but I just choose 2048 as max and get 3 levels.

The only problem is that iPhones will see the seems from the 512 tiles if you zoom in.

I hope Klaus can figure out a solution for that.
http://www.krpano.com/forum/wbb/index.ph…d&threadID=4171

You could also choose a larger tilesize as the basic for ex. 955.
Then you can get this with 3 levels and max cubesize 3820.

<image type="CUBE" multires="true" tilesize="955" progressive="false">
<level tiledimagewidth="3820" tiledimageheight="3820">
<left url="p1.tiles/l3_l_%0v_%0h.jpg" />
<front url="p1.tiles/l3_f_%0v_%0h.jpg" />
<right url="p1.tiles/l3_r_%0v_%0h.jpg" />
<back url="p1.tiles/l3_b_%0v_%0h.jpg" />
<up url="p1.tiles/l3_u_%0v_%0h.jpg" />
<down url="p1.tiles/l3_d_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="1910" tiledimageheight="1910">
<left url="p1.tiles/l2_l_%0v_%0h.jpg" />
<front url="p1.tiles/l2_f_%0v_%0h.jpg" />
<right url="p1.tiles/l2_r_%0v_%0h.jpg" />
<back url="p1.tiles/l2_b_%0v_%0h.jpg" />
<up url="p1.tiles/l2_u_%0v_%0h.jpg" />
<down url="p1.tiles/l2_d_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="955" tiledimageheight="955">
<left url="p1.tiles/l1_l_%0v_%0h.jpg" />
<front url="p1.tiles/l1_f_%0v_%0h.jpg" />
<right url="p1.tiles/l1_r_%0v_%0h.jpg" />
<back url="p1.tiles/l1_b_%0v_%0h.jpg" />
<up url="p1.tiles/l1_u_%0v_%0h.jpg" />
<down url="p1.tiles/l1_d_%0v_%0h.jpg" />
</level>

</image>

I just did a test on this one.
http://www.panoramas.dk/2010/winter-dec/p2.html
Looks fine on the iPad and this should not give problems with visible tiles on the iPhone.

Hans

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

5

Friday, January 28th 2011, 6:11pm

so the tablet and mobile tags are not really needed if the tiles sizes are approriate for the device? also how does the iphone4 know to use the 1024 tiles first and jump over the 512 without something telling it to do so?

andrew22222

Intermediate

Posts: 342

Location: Australia

  • Send private message

6

Friday, January 28th 2011, 6:30pm

I too have the Galaxy S just recently updated to froyo 2.2 so the flash is coming in now.

There's enough 'ooomph' in it to display most of my panoramas although the really detailed ones slow down somewhat while being rotated.

I'm not to clued up with xml and so would like to know if there's not just something we can add to the code below to allow the smaller phones (running android/flash) to choose lower res cubes without having to use multires? I don't mind have many additions to the code as I use a template for everything anyway and also the same file names.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
	<image type="CUBE">
			
		<!-- mobile phone / iphone images -->
		<mobile>
			<left  url="panos/mobile/01_l.jpg" />
			<front url="panos/mobile/01_f.jpg" />
			<right url="panos/mobile/01_r.jpg" />
			<back  url="panos/mobile/01_b.jpg" />
			<up	url="panos/mobile/01_u.jpg" />
			<down  url="panos/mobile/01_d.jpg" />
		</mobile>
		
		<!-- tablet pc / ipad images -->
		<tablet>
			<left  url="panos/tablet/01_l.jpg" />
			<front url="panos/tablet/01_f.jpg" />
			<right url="panos/tablet/01_r.jpg" />
			<back  url="panos/tablet/01_b.jpg" />
			<up	url="panos/tablet/01_u.jpg" />
			<down  url="panos/tablet/01_d.jpg" />
		</tablet>
		
	</image>


I guess I could add this to the above code then small phones using flash would automatically pick that and thus get the lower res images, but that would bugger up people using flash on android tablets? I'm just trying to stay clear of multires for simplicity with large tours.


Source code

1
2
3
4
5
6
7
		<!-- flash viewer -->		
 			<left  url="panos/mobile/01_l.jpg" />
 			<front url="panos/mobile/01_f.jpg" />
 			<right url="panos/mobile/01_r.jpg" />
 			<back  url="panos/mobile/01_b.jpg" />
 			<up	url="panos/mobile/01_u.jpg" />
 			<down  url="panos/mobile/01_d.jpg" />

HansNyb

Professional

Posts: 936

Location: Denmark

Occupation: Photographer

  • Send private message

7

Friday, January 28th 2011, 6:40pm

so the tablet and mobile tags are not really needed if the tiles sizes are approriate for the device? also how does the iphone4 know to use the 1024 tiles first and jump over the 512 without something telling it to do so?


Thats a good question. I do not have an iphone but from the screen shot I got from Jarredja I can see that it uses the 2x2 tiling which assembles 1024x1024.

Klaus designed it to use the tablet images butI assume it must have the same max size built in as the iPad. After all it is the same OS4.2

Hans

jschrader

Intermediate

Posts: 237

Location: Bavaria, Germany

Occupation: Photographer, Producer

  • Send private message

8

Saturday, January 29th 2011, 11:43am

I still don't get it.
When using an iPhone with my samples I cannot zoom into the panoramas even if the tilesize is 512 or less.
I then tried Hans link to the birthday pano and there is also no deep zoom possible.

So whats the point now? Is a true multires possible on the idevices or not?

HansNyb

Professional

Posts: 936

Location: Denmark

Occupation: Photographer

  • Send private message

9

Saturday, January 29th 2011, 12:22pm

I still don't get it.
When using an iPhone with my samples I cannot zoom into the panoramas even if the tilesize is 512 or less.
I then tried Hans link to the birthday pano and there is also no deep zoom possible.

So whats the point now? Is a true multires possible on the idevices or not?


No it is not. Only on Android which use flash.
The zoom is limited to your Tablet size 1024x1024 on iPhone and iPads.
IPhone 3 will just use the 512 mobile images . It is all in the dokumentation.

You can set zoom by using fovmin="60" fovmax="120" maxpixelzoom="1.0"
Idevices will ignore the maxpixelszoom and Flash will ignore the fovmin.

Even if fovmin 60 is more than the Tablet images maxresolution they do not look bad on the iPad.
Just a little fuzzy.

Even if you use the multiresolution way I do it is only in flash you can use the larger reolutions. It will automatically stop at the 1024 cubefaces on the iDevice.
Do not ask me why flash can do this better on an Android .
MY desire Z has an 800mHz processor and 373.2 MB free memory out of 512mb Ram.

The iPad has only 256mb Ram but the iPhone 4 has 512mb. Really idiotic.

Maybe we should all send the new Apple chief some mails and tell him to increase the memory. Unfortunatelly that will not help much for us who already bought one.

Hans

jschrader

Intermediate

Posts: 237

Location: Bavaria, Germany

Occupation: Photographer, Producer

  • Send private message

10

Saturday, January 29th 2011, 5:39pm

Thank you Hans, that made it clear for me now.
Hopefully we will be able to see Gigapixels on the iPad in the near future.

HansNyb

Professional

Posts: 936

Location: Denmark

Occupation: Photographer

  • Send private message

11

Saturday, January 29th 2011, 5:50pm

Thank you Hans, that made it clear for me now.
Hopefully we will be able to see Gigapixels on the iPad in the near future.


You can, but it costs you $5
http://itunes.apple.com/us/app/gigapan-f…d393734649?mt=8

hans

12

Wednesday, February 9th 2011, 7:41am

thank you all for the replies.

Back to my original question.

- So it's not possible to distinguish android phone from android tablets?


I didn't know that the viewer (and the documentation) was updated and I
recently found out the following facts. (please correct me if I am wrong)

1. It's NOT possible to distinguish android phone from android tablets
2. Android (galaxy s) recognizes normal <image> tag and also the <tablet>, <mobile> tags.
The order that android (galaxy s) recognizes xml tag is as follows:
- 1) <tablet>
- 2) normal <images> - supports multi-resolution
- 3) <mobile>
3. iphone 3gs recognizes <mobile> tag and the lowest resolution of multi-resolution
<image> tag (which is 6 cubes after all). iphone 3gs recognizes <mobile> tag first.
4. multi resolution is not supported on iphones (both 3gs and 4)

I haven't tested on iphone 4 but I believe iphone recognize <tablet> tag first and then
<mobile>, then <image> tag.

Cheers,
Hyung

13

Wednesday, February 9th 2011, 2:50pm

Hi,
1. It's NOT possible to distinguish android phone from android tablets
right, there are no informations available (not from the Flashplayer and not from Javascript) that the device is an phone or tablet,

you could try to check the resolution (via. stagewidth,stageheight) and decide what kind of device is used, but that is not very reliable - when using iframes, or the pano in a small window, or different browsers, or diffent meta settings the resulting size can always different unpredictable,

2. Android (galaxy s) recognizes normal <image> tag and also the <tablet>, <mobile> tags.
The order that android (galaxy s) recognizes xml tag is as follows:
- 1) <tablet>
- 2) normal <images> - supports multi-resolution
- 3) <mobile>
the <moblile> and <tablet> tags were introduced in krpano when there was only the iPhone 3/3G and the iPad and also on Android the typical mobile resolution was around 320x480,

now the current Android tablet which are capable to run the Flashplayer 10 have mostly an resolution around 480x800, so there using the <tablet> images makes much more sense,

so the default looking order if there are <tablet>, <mobile> tags, and when then they will be used,
and when not the normal <image> images will be used,
3. iphone 3gs recognizes <mobile> tag and the lowest resolution of multi-resolution
<image> tag (which is 6 cubes after all). iphone 3gs recognizes <mobile> tag first.
on the iPhone 3/3G the viewer is first looking for the <mobile> tag,
and when not as fallback if there is an small <level> image with a size below 512 pixels,


4. multi resolution is not supported on iphones (both 3gs and 4)
right, but without <tablet> or <mobile> images the viewer is looking for
a small enough <level> image - iPhone 3/3G < 512, iPhone4 < 1100,

best regards,
Klaus

14

Thursday, February 10th 2011, 10:19am

Thank you Klaus!

Now it's all clear :)

Best Regards,
Hyung