1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Image input and output for the [arcsec] plate solver.
//!
//! [`arcsec_core`] solves pixels; this crate gets them out of files. It reads six
//! formats, telling them apart by their first bytes rather than the
//! extension ([`image_io::detect_format`]):
//!
//! | Format | Reader |
//! |---|---|
//! | FITS (also gzip/bzip2/compress-compressed) | [`fits_io`], via CFITSIO (`rsfitsio`) |
//! | XISF (PixInsight) | [`xisf_io`], via the `xisf` crate |
//! | ASDF (Roman, astropy) | [`asdf_io`], via the `asdf-rs` crate |
//! | JPEG, PNG, TIFF | [`raster_io`], via `zune-jpeg`, `png` and `tiff` |
//!
//! Each supplies the pixels as an [`arcsec_core::ImageBuffer`] and what the header
//! says about pointing and pixel scale; [`image_io`] dispatches between them and
//! holds the keyword interpretation they share, and [`header`] applies the same
//! rules to FITS header text an application already has in memory.
//!
//! It also writes ASTAP's `.wcs` and `.ini` sidecar files and updates a FITS header
//! in place ([`fits_io`]).
//!
//! The `arcsec` command line and the arcsec C library (`libarcsec`) both read
//! images through this crate. Its API follows their needs and may change between
//! minor versions.
//!
//! [arcsec]: https://github.com/cruzzil/arcsec
// `alloc` is not in the extern prelude for a crate that links std, so it has to
// be declared before alloc:: paths can be written.
extern crate alloc;