xisf-rs
An unaffiliated implementation of Pleiades Astrophoto's open-source Extensible Image Serialization Format (XISF) file format, the native image format for their flagship editing software PixInsight. Aims for 100% support for spec version 1.0, as opposed to implementations such as libXISF or Pleiades Astrophoto's own PixInsight Class Libraries, which are written with 2D images in mind. Currently under rapid development, but all changes to the public API will be accompanied with a version update following Cargo's SemVer guidelines before being pushed to crates.io.
Feature Comparison
xisf-rs |
libXISF |
PCL |
|
|---|---|---|---|
| Language | Rust | C++ | C++ |
| License | MIT | GPLv3 | BSD-4-Clause-like |
| Monolithic Files | Decode | Encode + Decode | Encode + Decode |
| Distributed Files | ❌ | ❌ | ❌ |
| N-D Images | ✅ | ❌ | ❌ |
| Pixel Sample Formats | Scalar, Complex | Agnostic (Raw Bytes Only) | Scalar1, Complex |
| Image Metadata | Attributes, FITS Keywords | Attributes2, FITS Keywords3, XISF Properties, Thumbnail, CFA, ICC Profile | Attributes4, FITS Keywords, XISF Properties, Thumbnail, CFA, ICC Profile, RGB Working Space, Display Function, Resolution |
| Supported XISF Property Locations | ❌ | <Image>5 |
<Image>, <Metadata>, <xisf> |
<Table> Element |
❌ | ❌ | ❌ |
<Reference> Element |
✅ | ❌ | ❌ |
| Data Block Compression | ✅zlib, lz4, lz4hc |
✅6zlib, lz4, lz4hc, zstd |
✅zlib, lz4, lz4hc |
| Checksum Verification | ✅ | ❌ | ✅ |
| XML Digital Signature Verification | ❌ | ❌ | ❌ |
- Does not support 64-bit integers
- Only mandatory attributes and colorSpace
- Raw strings only; cannot parse values
- Missing imageType, offset, orientation, and uuid attributes
- Int32, Float32, Float64, String, and TimePoint only
- Sub-blocks not yet supported (this limits supported images to 4GiB);
zstdsupport is nonstandard
Dependencies
- Minimum Supported Rust Version (MSRV): 1.64.0, verified for
x86_64-unknown-linux-gnu - libxml2
- lz4
- Can be configured to use zlib or zlib-ng
Road Map
- Read raw images
- Data block compression
- Checksum verification
- Images of complex numbers
-
<Reference>element -
<FITSKeyword>element - Write monolithic files
- Scalar, Complex, String, and TimePoint
<Property>elements - Image thumbnails: turn
read_datainto a trait - Documentation and tests
- CIE L*a*b color space conversion -- is this out of scope?
- Remote resources
- Ask user to trust a specific source before connecting -- caching or permanently saving preferences per source address is out of scope
remotefscrate? Covers (S)FTP+SCP+SMB+S3, that plus an HTTP(S) client should cover most use cases. the SMB library is GPLv3 though :(- Some kind of file cache to avoid re-downloading? Consider
tempfilecrate. Check for changes in file size and last modified withstatto ensure up-to-date, and make an option to re-download a specific file inDataBlock's read functions- HTTP(S) supports a more fine-grained cache with
ETag/If-None-Match,Last-Modified/If-Modified-SinceandCache-Controlheaders
- HTTP(S) supports a more fine-grained cache with
- Vector, Matrix
<Property>elements- Need to look at
cfitsiofor inspiration here
- Need to look at
- XML Digital Signature verification
- 128-bit floating point
<Property>types (rustc_apfloat::ieee::Quad?fixed::F128?)- Neither support any kind of math, but
fixed::F128supportsbytemuck, which gives it an advantage
- Neither support any kind of math, but
- async data block read functions
- See
async_compressioncrate
- See
- C/C++11 interface with
cbindgen - zstd support? Nonstandard, but
libXISFis doing it, and that seems to be the implementation that's catching on in the C++ world