nvtiff-sys
Rust bindings to nvTIFF via bindgen.
Instructions
-
Download and install from .deb at https://developer.nvidia.com/nvtiff-0-7-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Debian&target_version=12&target_type=deb_network
-
Patch nvtiff.h file, change
- L1251
nvtiffTagDataType type,->enum nvtiffTagDataType type,enum type
For example, run these sed commands (with sudo) to apply the patch.
- L1251
-
Run
cargo build -
Bindings should be generated in
$CARGO_MANIFEST_DIR/src/nvtiff.rsfile.
Testing
- Download the following test files to the
images/folder:- https://github.com/NVIDIA/CUDALibrarySamples/blob/master/nvTIFF/nvTIFF-GeoTIFF-Decode/images/bali_notiles.tif
- https://github.com/rasterio/rasterio/raw/1.5.0/tests/data/float32.tif
- https://github.com/developmentseed/titiler/raw/1.1.0/src/titiler/core/tests/fixtures/cog_dateline.tif
- https://github.com/opendatacube/odc-geo/raw/v0.5.1/tests/data/au-gcp.tif
- Run
cargo test.
Compatibility
| nvtiff-sys | nvTIFF |
|---|---|
| 0.1.* | 0.5.* |
| 0.2.* | 0.6.* |
| 0.3.* | 0.7.* |
Contributing
We welcome third-party patches. If you have any changes you'd like to make to nvtiff-sys, please send a patch to the nvtiff-sys-devel mailing list.