Skip to main content

Tools to convert Pov-Ray DF3 files to set of images and vice versa

Project description

Build Status Coverage Status Maintainability Status Code Quality Latest PyPI version Supported Python versions

Command-line tools to convert POV-Ray density files (DF3) to a bunch of images and vice versa.

Installation

The easiest way to install is via standard Python package manager:

pip install df3tools

Optionally, you may clone package’s repository, and run setup.py script:

git clone https://github.com/a5kin/df3tools.git
cd df3tools
python setup.py install

Quickstart

After successful installation, two tools will be available at command-line: df3split and df3combine.

The former, by default, splits density file to a bunch of images and saves them into layerNNN.tga files in current directory:

df3split path-to-original-density-file.df3

The latter, by default, combines all layer* files in current directory into a single density file. Image format is auto-detected:

df3combine path-to-new-density-file.df3

You may also pass an images’ prefix like -p data/layer. See the full list of options below.

df3split

Split POV-Ray .df3 density file to a series of separate images.

Usage

df3split [-h] [-t {tga,png}] [-p PREFIX] [-s] df3file

Positional arguments:

df3file    Filename of density file to split.

Optional arguments:

-h, --help                        Show help message and exit.
-t {tga,png}, --format {tga,png}  Output files format.
-p PREFIX, --prefix PREFIX        Output files prefix.
-s, --silent                      Suppress output.

df3combine

Combine a series of separate images into POV-Ray .df3 density file.

Usage:

df3combine [-h] [-p PREFIX] [-s] df3file

Positional arguments:

df3file    Filename of density file to combine images into.

Optional arguments:

-h, --help                        Show help message and exit.
-p PREFIX, --prefix PREFIX        Input files prefix.
-s, --silent                      Suppress output.

Note, images format is autodetected. You may combine any type of images, supported by Pillow.

Tests

To run full test suite for all supported Python versions, install tox package, and run it from project’s top directory, containing setup.py:

pip install tox
tox

Optionally, you can run tests only for your current Python version by typing:

python -m unittest discover -s tests

Acknowledgements

Thanks to Yury Poberezhny for the idea and motivation to create this package.

Project details


Release history Release notifications

This version

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for df3tools, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size df3tools-0.1.0.tar.gz (6.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page