Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Dienstag, 31. März 2009, 03:08

Snapshot of current view

i'm trying to create a snapshot of the current view like on gigapan.org to let users comment on a pano.
i've never done anything with flash before but i've managed to get a plugin working and to create a jpg of a local movie (in the plugin.swf)

But as far as i can tell by now i don't have access to the main movie in krpano.swf from my plugin....
or is there a way?

or maybe Klaus can add this feature to his ever-growing todo-list? ;-)

thx for your help and kudos for this great program!

2

Dienstag, 31. März 2009, 14:50

I did it!

I can save the current view to a jpg!!! *g* *g* *g*

it works like this:
- load snapshot-plugin
- call snapshot function in plugin
->plugin creates a jpg of currentview
->plugin sends jpg to a php page which saves the image

if someone is interested i can give some more infos but my code is really messy and needs some major cleaning *whistling*
and i need a break, i didn't get much sleep *pinch*

Shanti

Fortgeschrittener

Beiträge: 301

Wohnort: Puerto Vallarta

Beruf: Web Developer

  • Nachricht senden

3

Dienstag, 31. März 2009, 20:16

I would like to take a look at the code if you don't mind :D or even release the plugin sounds like a very good one :D

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

4

Dienstag, 31. März 2009, 20:25

I'm not sure I have an immediate need for something like this... but it sounds very interesting and I'd love to see a sample / demo.

5

Mittwoch, 1. April 2009, 04:29

demo / source

i put a demo of the snapshot plugin together.
because it needs a php script i included a small webserver (QuickPHP) for easy testing.
just download the self-extracting 7z exe, execute it and start "start pano.bat"
(nothing is installed/saved, everything runs in the directory)

this demo is as simple as possible. my "development" version has a gui where the user can enter his name and a comment (like gigapan.org) and everything is done with AJAX so there is no need to leave/reload the pano.

please leave a comment if the demo works

link: http://paperlapub.ch/download/snapshot_plugin.exe (~3MB)

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »RedSpawn« (1. April 2009, 13:01)


Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

6

Mittwoch, 1. April 2009, 05:53

do you have a demo site / active site online where we can see / try / play with this?

I can kinda see some good uses for something like this (now that I've thought about it).. *smile*

7

Mittwoch, 1. April 2009, 12:54

i don't have a license for krpano (yet) so there is no online demo ;-)

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

8

Mittwoch, 1. April 2009, 13:40

Wow, this is amazing. With a few alterations and some fine tuning I could use this. It was somewhere on my todo list after seeing the snapshot function in earthmine. I'm going to build that snapshot, rescalable map and the searchpane as a plugin :)

For those wondering what eartmine is: http://www.youtube.com/watch?v=PHjwRImYVDI (the snapshot feature is around 2.35min) Its like streetview on steroids

A Question: It uses stage.root as the area for taking the snapshot. If I set the dimensions of the picture to say like 800x600 and the stage is like 400x300. Does it upscale the picture?

And for Klaus. As I can seen now, the plugin uses the screen data to build the image (iow its like a printscreen function) Is it possible to access the data of the loaded tiles in that view from krpano. If that's possible it allows for a highresolution snapshot, people could look around and take a snapshot and for instance use it as a wallpaper.

9

Mittwoch, 1. April 2009, 15:31

unfortunately you can't set a different size for the image in flash. what it does is it copies each pixel from the stage to the image, so if you would make a smaller image you would only get a part of the stage.

but that is something i will look into because currently the whole image is sent to the server and scaled by the php script. it would be much faster to resize the image in flash and send only the small thumbnail.

but like i mentioned before, i've never done anything with flash so i have to digg around

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

10

Donnerstag, 2. April 2009, 14:47

Uhm, wouldn't be that hard, I think. you have this now:
var jpgSource:BitmapData = new BitmapData (stage.stageWidth, stage.stageHeight);
jpgSource.draw(stage.root);

Adding a scalefactor:
var jpgSource:BitmapData = new BitmapData (stage.stageWidth, stage.stageHeight);
jpgSource.draw(stage.root);
var ResizedJpg:BitmapData = new BitmapData(jpgSource.width * 0.5, jpgSource.height * 0.5)
ResizedJpg.draw(jpgSource)

Now it stores the big image in jpgsource and the resized one in ResizedJpg. Upload the Resized one and then dispose them both. I think this should work, though I've not tested it :)

11

Freitag, 3. April 2009, 01:23

i don't think your code would work, or you could just define the first image (jpgSource) with the smaler size, but like i said it's just copying data, so only a part of the image is copied and nothing is scaled

but i guess it's not that hard if u know actionscript, it's just a mater of finding the function for resizing bitmapdata

i have no time right now but i will work it out this weekend

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

12

Freitag, 3. April 2009, 19:25

Yes you're correct, It doesn't grab a pigger picture, It still uses the stage. But you said that it would be much faster if flash scaled the image and then upload it instead of php. This tiny alteration stores the bigimage in a temporary bitmap data and then put the bitmapdata back in a new one. I found an example on the website of Adobe, although this is explained with flash 8 and AS 2.0. http://www.adobe.com/devnet/flash/articles/image_api_04.html

And with flash 10, and the FileReference Class you can even cut out the php part. Example: http://blog.onebyonedesign.com/?p=67

13

Samstag, 4. April 2009, 09:58

Hi,

what a great plugin!
(I have planned such for a long time but never found the time for it )

about the resizing - this should work:
- create a "Bitmap" object and assign it to the BitmapData of your source image
- scale this "Bitmap" by setting it's with and height
- draw(render) this "Bitmap" down to a other "BitmapData"

Quellcode

1
2
3
4
5
6
7
var bitmap:Bitmap = new Bitmap( original_bitmapdata );

bitmap.width = scaled_width;
bitmap.height = scaled_width;

var scaled_bitmapdata:BitmapData = new BitmapData(scaled_width, scaled_width, true, 0);
scaled_bitmapdata.draw( bitmap );


best regards,
Klaus

vincen

Schüler

Beiträge: 69

Wohnort: Grenoble, France

Beruf: Photo, ski, walk, outdoor activities

  • Nachricht senden

14

Dienstag, 8. Februar 2011, 12:13

an updated working version of that plugin ? as I'd really like to use it :)

Thanks,

Vincèn
http://www.skivr.com (my blog)
http://magasin.skivr.com (my online shop for all panoramas and photography stuffs)

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

15

Dienstag, 8. Februar 2011, 13:06

Hi,

sounds nice but i'm on mac..

what to do?

Can you profide a mac download or something?


Tuur *thumbsup*

vincen

Schüler

Beiträge: 69

Wohnort: Grenoble, France

Beruf: Photo, ski, walk, outdoor activities

  • Nachricht senden

16

Dienstag, 8. Februar 2011, 13:12

sounds nice but i'm on mac..
what to do?
Can you profide a mac download or something?

You can test it on mac easily I just did it :) you just have to unzip the whole stuff and copy it in your Sites folder and activate webserver of mac osx :)

It looks nice but it has two main defaults:
  • impossible to recall snapshot created
  • need to reload panorama to get snapshot list updated


So it's nice but would need improvement to be used in production !

Vincèn
http://www.skivr.com (my blog)
http://magasin.skivr.com (my online shop for all panoramas and photography stuffs)

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

17

Dienstag, 8. Februar 2011, 13:47

Vincen,

merci pour votre reaction..

je reste pour le developement.. (?)

;-)

Thanx

Tuur *thumbsup*

18

Mittwoch, 5. September 2012, 16:32

Hi! What about this?

Nobody finish the pluggin?

Ähnliche Themen