07-20-2011 05:57 AM
What is 'panorama mode?
Point 0,0 is always the top left hand corner and you always paint with respect to that. If you want to paint the other way, then you will have to rotate.
For example, if you have a bitmap image and the top is blue and the bottom is red, when you paint this on the screen, it will always have a blue top. If you want the left to be blue, then you have to rotate the image, and then paint it. You can't tell the screen to paint sideways.
07-20-2011 08:03 AM - edited 07-20-2011 08:23 AM
Thanks for you reply..
I am not sure what you suggested here as I am not much good in graphics and image processing. So can you please explain in detail. My requirement is like http://www.360cities.net/prague-18-gigapixels
07-21-2011 12:44 AM - edited 07-21-2011 01:07 AM
I tried as per link given by you but its just scrolling the image in field.
any other reference or can you please suggest how can I make panorama scrolling view using scrollable image field. Or any reference from opengl.
07-21-2011 05:36 AM - edited 07-21-2011 08:41 AM
Sorry I don't know OpenGL.
The thing with the sample I sent you is that it chooses which part of the Image it has to be displayed, based on the current location. So as you say, if you have one image then you are bounded by the edges of that.
So you need to extend this I believe to support the panorama type display. I suspect you will do the following:
a) 'join' the edges of the bitmap, so that it looks like the edges of the Bitmap are joined together. So if you are at the right hand edge and he user scrolls right, instead of stopping, you display some of the right hand edge of the image and then do another 'paint' to display the left hand edge next to it.
b) I think a panorama like the one you pointed at is actually multiple images bolted together, so you will extend this to display the right hand edge of the current image, followed by the left hand edge of the image that is logically next to it. You are basically tiling this yourself, much like the maps applications do.
c) You will have to do the same for 'up' and 'down'
d) Finally you may wish to implement zoom in and out. I think you will have to do this with multiple images (so you have multiple panorama at different zoom levels) because I doubt that the Blackberry will cope with a single very large image that you zoom with - this is how Google earth seems to work if you want an example from elsewhere. Assuming you do need multiple 'levels', you will choose the appropriate one based on the zoom level. However these will be big jumps. Within these jumps you may wish to scale the images you have and you can do this on the fly in a number of ways. I would encourage you to review this KB article.
and also the Bitmap scaleInto function, which I think works really well.
Basically you have to create this from scratch, there is no supplied API to do (that I am aware of), but in fact, it is not that difficult, just time consuming. And sounds like fun. Good luck.
Edit: Spell checked, sorry about the mistakes that were there before.
07-21-2011 06:49 AM - edited 07-21-2011 07:02 AM
let me try as you suggest, and will back here .
Any other input from any one it will help me. I will be back here with whatever I try and its result.