OpenSeadragon DZI Converter
It converts image files into DZI format using the OpenSeadragon library.
OpenSeadragon DZI Converter
This is a Python script that converts image files into Deep Zoom Image (DZI) format using the OpenSeadragon library. The DZI format allows for high-resolution zoomable images that can be easily integrated into web applications.
{{< dzi id="seadragon-viewer" url="/dzi/mountain_files/" format="jpg" imgWidth="15920" imgHeight="9800" >}}
Usage
Make sure you have Python 3 installed on your system.
Install the required dependencies by running the following command:
pip install deepzoom
Clone or download this repository to your local machine.
git clone https://gitlab.com/c4pt-mqs/dzicon.git
Open a terminal or command prompt and navigate to the repository's directory.
cd /path/to/dzicon
Run the script with the following command:
python3 dzicon.py [filename1.jpg] [filename2.png] ...
Replace [filename1.jpg], [filename2.png], etc. with the paths or names of the image files you want to convert. You can specify multiple files separated by spaces.
Note: Supported image formats are JPEG (.jpg, .jpeg) and PNG (.png).
The script will create a Deep Zoom Image pyramid for each input image file, resulting in a .dzi file and a corresponding folder containing the tile images.
To view the converted images, open the test_image.html file in a web browser.
If you want to view a specific image, modify the tileSource.Url value in the test_image.html file to point to the corresponding DZI folder generated by the script. Replace /path/to/dzicon/example_folder/ with the correct directory path.
Update the tileSource.Size.Width and tileSource.Size.Height values to match the dimensions of your converted image.