The krpanotools executable is the core tool for processing images
(e.g. sphere/cube conversions, resizing and tiling) and for everything related to the license handling.
It can be called from command-line or from batch/script-files or from other applications.
The krpanotools application offers these functions:
Partial spherical or cylindrical images with any field-of-view.
Cubical images with six separated image files (one image per cube side).
Cubestrip images (the cube-face order and alignment will be auto-detected by image-content analyzing).
Supported stereoscopic panorama formats:
One 12x1 or 1x12 stereo-cubestrip image (=two 6x1 cubestrips side-by-side or two 1x6 cubestrips top-bottom).
One single image with two spherical 360x180 images with side-by-side or top-bottom arrangement.
Two 6x1 cubestrip images with a same 'basename' and some left/right tags for the side detection (e.g. _l and _r in the filename).
Two spherical 360x180 images with a same 'basename' and some left/right tags for the side detection (e.g. _l and _r in the filename).
Using wildcards like *.tif is possible and should be used when trying to pass more images at once.
Cubical images should have suffixes like
_l,
_f,
_r,
_b,
_u,
_d
or names like
left,
front,
right,
back,
up,
down
in their filenames to allow an automatic detection
of the related cube-side.
Stereoscopic images with separated side-images should have the same 'basename' and
pre- or suffixes that allow identifying the side (e.g. _l and _r or
left, right or something similar.
A tile-template can contain several placeholders for addressing the actual tile:
%h - for the horizontal tile index.
%v - for the vertical tile index.
Optional one or more 0 characters between the % and the
h or v can be used as number padding.
Tilesize:
The size of a tile.
For non-quad tiles use WIDTHxHEIGHT.
When the input image can't be divided exactly by the tilesize,
then the right-column and bottom-row tiles will be smaller than the tile size.
Disable tiling by using 0 or by skipping that setting.
Options:
-indexbase=#
Set the tile start-index, default=1.
-jpegquality=#
Set the JPEG compression quality, 0 to 100, default=85.
-jpegsubsamp=#
Set the JPEG color subsampling, 444, 420, 420, 411, default=444.
-jpegoptimize
Optimize the JPEG Huffman compression tables.
Can reduce the files sizes a bit, for very large input images (Gigapixel and more)
this can noticeable increase the memory need and slow down the processing.
-jpegprogressive
Use the progressive JPEG compression format.
-tiffcompress=#
Set the TIFF compression method, none, lzw, zip or jpeg, default=lzw.
-dpi=#
Write a custom DPI size to the image header.
-profile=#
Embedded Color Profile (ICC) settings:
COPY - copy the color profile from the input image to the output image.
CONVERT - convert to a sRGB color profile but don't embed the profile (default).
sRGB - convert to a sRGB color profile and embed a very small sRGB profile.
SKIP - skip / ignore an embedded color profile.
-noalpha
Remove the alpha channel (if there is one).
-8bit
Convert the output image to 8bit (for 16bit inputs).
-hmirror
Horizontally mirror the image.
-q
Quiet mode, no console output.
Options for tiled-input images:
-insize=#
The total size of the input image: WIDTHxHEIGHT.
-intilesize=#
The tile-size of the input image: SIZE or WIDTHxHEIGHT.
-inindexbase=#
Set the tile start-index of input image, default=1.
Options for resizing an image:
-resize=#x#
Resize the image to WIDTHxHEIGHT.
Use * for WIDTH or HEIGHT for a proportional resizing.
-scale=# or -scale=#x#
Scale the image by a given factor.
-keepaspect
Keep the original image aspect when resizing.
That means the image will be resized to fit into the given WIDTH or HEIGHT.
-hwrap
Wrap around horizontally when filtering (for 360x* panos).
The smoothing/blurring will be equally spherical distributed
(an normal image blurring in an image-editor would cause artefacts at the nadir/zenith areas).
Cubical images should have suffixes like
_l,
_f,
_r,
_b,
_u,
_d
or names like
left,
front,
right,
back,
up,
down
in their filenames to allow an automatic detection
of the related cube-side.
Alternatively it would be possible specify the filesnames for the cubesides manually by using:
-l=###-f=###-r=###-b=###-u=###-d=###.
Options:
-o=###
Set the name of the output image.
By default it will be *preview.jpg where * is the base input filename.
-cs
Make a cubestrip preview pano image.
For a better quality and a better browser support.
-gray
Make a grayscale preview image.
-size=#x#
Set the size of the preview image.
By default 1024x512 for spherical and 256x256 for cubical.
-smooth=#
Smooting / blurring factor, 0 to 100, default=77.
-jpegquality=#
Set the JPEG compression quality, 0 to 100, default=85.
-jpegsubsamp=#
Set the JPEG color subsampling, 444, 420, 420, 411, default=422.
-tiffcompress=#
Set the TIFF compression method, none, lzw, zip or jpeg, default=lzw.
-profile=#
Embedded Color Profile (ICC) settings:
COPY - copy the color profile from the input image to the output image.
CONVERT - convert to a sRGB color profile but don't embed the profile (default).
sRGB - convert to a sRGB color profile and embed a very small sRGB profile.
Ideal for low memory usage and faster processing on huge images.
That means first tile the input image using the maketiles tool and then
convert it to cube.
Outputfile:
The name of the cubical output image.
In CUBE mode cube-side suffixes will be added to the filenames.
Options for partial pano images:
-infov=HFOVxVFOV/VOFFSET
HFOV - the horizontal field-of-view in degrees.
VFOV - the vertical field-of-view in degrees (optional).
HFOV - a vertical offset in degrees (optional).
-cylinder
Define that the input image is cylindrical pano image.
Options for VIEW mode:
-fov=#
The vertical field-of-view in degrees for the rectilinear view image.
-lookat=H,V,R
Set the viewing rotation in krpano viewer form, by hlookat, vlookat, camroll.
-rotate=ORDER,X,Y,Z
Set a custom viewing rotation.
ORDER - the axis rotation order, can be XYZ, XZY, YXZ, YZX, ZXY, ZYX.
X,Y,Z - the rotation angles around the axis in degrees.
General options:
-outsize=#
Set a custom outputsize.
By default the size will be calculated depending on the size of the input image.
For the VIEW mode -outsize=WIDTHxHEIGHT need to be used.
-noautolevel
By default the input image will be automatic leveled when there are EXIF orientation information (e.g. from one-shoot panoramic cameras).
With this setting that leveling can be disabled.
-profile=#
Embedded Color Profile (ICC) settings:
COPY - copy the color profile from the input image to the output image (default).
CONVERT - convert to a sRGB color profile but don't embed the profile.
sRGB - convert to a sRGB color profile and embed a very small sRGB profile.
SKIP - skip / ignore an embedded color profile.
-fast
Faster but lower-quality processing.
-jpegquality=#
Set the JPEG compression quality, 0 to 100, default=85.
-jpegsubsamp=#
Set the JPEG color subsampling, 444, 420, 420, 411, default=444.
-jpegoptimize
Optimize the JPEG Huffman compression tables (recommended).
-jpegprogressive
Use the progressive JPEG compression format.
-tiffcompress=#
Set the TIFF compression method, none, lzw, zip or jpeg, default=lzw.
The images should have suffixes like
_l,
_f,
_r,
_b,
_u,
_d
or names like
left,
front,
right,
back,
up,
down
in their filenames to allow an automatic detection
of the related cube-side.
Alternatively it would be possible specify the filesnames for the cubesides manually by using:
-l=###-f=###-r=###-b=###-u=###-d=###.
Options:
-o=###
Set the name of the output image.
By default it will be *_sphere.tif where * is the base input filename.
Only the krpano viewer will be able to load such encrypted files.
As 'private' encryption key the krpano license will be used.
That means only a krpano viewer registered with the same license
will be able to load the encrypted files.