DBDelve
Dive deep into your data. A fast, native, multi-engine database client written in Rust. Free and open source, no telemetry.
翻译准备中
Async TIFF reader for Rust and Python
翻译准备中
正在加载完整 README。
查看完整 README ↗An async, low-level TIFF reader for Rust and Python.
async-geotiff.object_store crate.ndarray crate for easy manipulation of decoded image data.# tokio_test::block_on(async {
# use std::sync::Arc;
# use std::env::current_dir;
#
use object_store::local::LocalFileSystem;
use async_tiff::metadata::TiffMetadataReader;
use async_tiff::metadata::cache::ReadaheadMetadataCache;
use async_tiff::reader::ObjectReader;
use async_tiff::TIFF;
let store = Arc::new(LocalFileSystem::new_with_prefix(current_dir().unwrap()).unwrap());
let reader = ObjectReader::new(store, "fixtures/image-tiff/tiled-jpeg-rgb-u8.tif".into());
let cache = ReadaheadMetadataCache::new(reader.clone());
let mut meta = TiffMetadataReader::try_open(&cache).await.unwrap();
let ifds = meta.read_all_ifds(&cache).await.unwrap();
let tiff = TIFF::new(ifds, meta.endianness());
// Fetch and decode a tile
let tile = tiff.ifds()[0].fetch_tile(0, 0, &reader, Default::default()).await.unwrap();
let array = tile.decode(&Default::default()).unwrap();
println!("shape: {:?}, dtype: {:?}", array.shape(), array.data_type());
# })
The existing tiff crate is great, but only supports synchronous reading of TIFF files. Furthermore, due to low maintenance bandwidth it is not designed for extensibility (see #250).
This crate was initially forked from the tiff crate, and still maintains some of its TIFF tag parsing code.