News Examples Documentation Download Buy Forum Contact

krpanotools SphereToCube Tool Version 1.20
Select Version:

The krpano spheretocube tool can be used to either convert spherical or cylindrical images to cubical images or to extract single rectangular views from them.


The krpano spheretocube tool need to be called from command line or from batch / script files.


krpanotools sphere2cube mode inputfile outputfile [options]

  • mode
    • Set the transform output mode:
      • cube - six cube images (one image per side)
      • hcube - horizontal cube imagestrip
      • vcube - vertical cube imagestrip
      • cube3x2 - a 3x2 cube imagestrip
      • cube2x3 - a 2x3 cube imagestrip
      • view - a single rectangular view
  • inputfile
    • The input image file - either a spherical or cylindrical image.
    • When the input image is partial pano (a non 360x* pano image), then the -infov=HFOVxVFOV/VOFFSET option need to be set to define the field of view of the input image.
    • When the input image is a cylindrical image then the -cylinder option need to be set.
  • outputfile
    • Output image filename (paths will be created automatically).
    • Cube suffixes like _l, _f, _r, _b, _u, _d will be added automatically to the filename in cube mode.
  • options (optionally)
    • -config=# ... read these settings/options from an external config file
    • -infov=HFOVxVFOV/VOFFSET ... the input image is a partial pano image
      • HFOV - the horizontal field-of-view in degrees
      • VFOV - the vertical field-of-view in degrees (optional)
      • VOFFSET - vertical offset in degrees (optional)
    • -cylinder ... the input image is a cylindrical pano image
    • -outsize=# ... output image size (for the view mode use WIDTHxHEIGHT)
    • -fov=# ... the vertical field of view in degrees for the view mode (default is 90)
    • -lookat=H,V,R ... add rotation in krpano form
    • -rotate=ORDER,X,Y,Z ... add rotation in custom form
      • ORDER - rotation order (XYZ, XZY, YXZ, YZX, ZXY, ZYX)
      • X,Y,Z - rotation angles in degrees
    • -noautolevel ... disable the EXIF/XMP-based auto leveling
    • -jpegquality=# ... set jpeg quality (0-100, default=85)
    • -jpegsubsamp=# ... set jpeg color subsampling (444,422,420,411, default=444)
    • -jpegoptimize ... optimize jpeg compression (recommended)
    • -jpegprogressive ... use progressive jpeg compression
    • -tiffcompress=# ... set tiff compression (none,lzw,zip,jpeg, default=lzw)
    • -tempdir=# ... set directory for temporary data
    • -fast ... faster calculation (but lower quality)
    • -q / -quiet ... suppress output messages
Supported input and output image formats:
  • Tiff (.tif, .tiff)
  • BigTiff (.btf, .tf8, .bigtiff)
  • JPEG (.jpg, .jpeg)
  • Photoshop Document (.psd)
  • Photoshop Big Document (.psb)
  • Kolor RAW (.kro)
  • All formats only in 8 or 16bit RGB or RGBA format.