Crates.io | image2multires |
lib.rs | image2multires |
version | 0.1.1 |
source | src |
created_at | 2024-02-10 16:35:50.830058 |
updated_at | 2024-02-13 12:42:06.32932 |
description | Generate multires tiles from an image |
homepage | |
repository | https://github.com/franckinux/image2multires-rs |
max_upload_size | |
id | 1135044 |
size | 44,631 |
This programs converts a single image to tiles in multires format.
This work has been inspired by the Pannellum (https://github.com/mpetroff/pannellum) and dzi (https://github.com/n-k/dzi) projects.
It is usualy used to convert a cube face to tiles. In this case, the image is a square but this tool is generalized so that it can work on rectangle shaped images.
I made the choice of a tool that makes a unique operation. So it does not
operate on the 6 faces nor it does not generate a configuration file for any
panarama viewer. For these purposes, you can use a script of your own. An
example shell script cube2tiles.sh
is provided in the scripts directory.
I didn't find any specification of the multires tile format. You can find the
Python script generate.py
in the test directory. It comes from the Pannellum
project. This a modified version of the original script: the convertion from
equirectangular to cube faces has been removed.
Generate multires tiles from an image
Usage: image2multires [OPTIONS] [image]
Arguments:
[image]
Options:
-p, --png Set tile image format to png instead of default jpg
-s, --tilesize <tile-size> Set tile image size [default: 512]
-d, --directory <directory> Set output directory of tile image files [default: output]
-h, --help Print help
-V, --version Print version
My workflow for generating a parorama is:
The following error may happen:
Unsupported source image: invalid code in LZW stream
This is caused by the underlying libraries. The only workaroud I can suggest is to open the image and save it.
See issue https://github.com/image-rs/image-tiff/issues/191.