Java or Javascript API to split panorama image into tiles

  • Hi,
    We're building a web based authoring tool to create tours using KRPano viewer. I know the standalone KRPanoTools that can break down the panorama image into tiles and generate the corresponding XML file. Question is, is there an API for such purpose? We want to be able to split the image on our server side (a java web application).

    Thanks,

  • the tools are available through the command line. For example:

    Code
    kmakemultires -levels=2 -tilesize=512 -maxsize=2048 -html=false *

    I don't know java, but I reckon there is a way to execute serverside bins through a terminal

  • Hi,
    We're building a web based authoring tool to create tours using KRPano viewer. I know the standalone KRPanoTools that can break down the panorama image into tiles and generate the corresponding XML file. Question is, is there an API for such purpose? We want to be able to split the image on our server side (a java web application).

    Thanks,

    I don't understand by what you mean by API. The command line versions have documentation. API would indicate an already built server side application. Javascript is not server side and wouldn't make sense for what you are trying to do. An asp or php script to drive the command line tool process on the server is the way most people do it.

  • I don't understand by what you mean by API. The command line versions have documentation. API would indicate an already built server side application. Javascript is not server side and wouldn't make sense for what you are trying to do. An asp or php script to drive the command line tool process on the server is the way most people do it.

    Our server side is written in java running on tomcat. I was wondering where there is a way to split the images in native java code instead of invoke an external command from java. I mentioned "javascript" because I don't know much about javascript at all and wondered whether this can be done using javascript at the frontend. I guess not. :)

    So you're saying most people will just invoke the command line tool from java, asp, php or whatever server side language? How to do error control then? Does the kmaketiles command return non-zero value for anything other than a success? And just capture the stdout output as the error message?

    When you say the command line version have documentation, do you mean the syntax output when you run "kmaketiles -h"? Or there is really a separate documentation somewhere? I'm really new to the krpano thing and I couldn't figure out the correct syntax by just looking that the output from "kmaketiles -h". Could you please give me an example what the command line would look like if I want to split an image named foo.jpg into 6 tiles (l,r,f,b,u and d)?

    I also noticed that when I use the "MAKE PANO (NORMAL) droplet", there is a step in the output that says:
    "converting image to cube format..."

    Is that done by the "ktransform" command? If so, how do I determine whether I need to run the covert command?

    Thanks a lot for the help!

  • All the documentation is up top ^^. In this case under tools.
    https://krpano.com/tools/kmaketiles/
    I've never had to worry about error control so i never coded it. I dont imagine php would have much of an issue with the output kmaketiles would give however. If i was dealing with a high potentila of dirty input from crazy users,i'd probably validate it all with php anyway, checking file type, image height and width etc.
    Java's not my bag in the slightest, so i cant help you there.

  • All the documentation is up top ^^. In this case under tools.
    https://krpano.com/tools/kmaketiles/
    I've never had to worry about error control so i never coded it. I dont imagine php would have much of an issue with the output kmaketiles would give however. If i was dealing with a high potentila of dirty input from crazy users,i'd probably validate it all with php anyway, checking file type, image height and width etc.
    Java's not my bag in the slightest, so i cant help you there.

    Thanks for pointing out the documentation location!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!