4 releases (2 breaking)

0.3.0 Apr 1, 2024
0.2.0 Oct 3, 2021
0.1.1 Sep 25, 2021
0.1.0 Sep 25, 2021

#297 in Geospatial

Download history

126 downloads per month

MIT license

13KB
225 lines

ser-io

crates.io

Rust crate for reading SER files used in astrophotography.

Usage

let ser = SerFile::open(filename)?;

println!("Image size: {} x {}", ser.image_width, ser.image_height);
println!("Frame count: {}", ser.frame_count);
println!("Frame size: {}", ser.image_frame_size);
println!("Bytes per pixel: {}", ser.bytes_per_pixel);
println!("Bayer: {:?}", ser.bayer);
println!("Endianness: {:?}", ser.endianness);

for i in 0..ser.frame_count {
    let bytes = ser.read_frame(i)?;
    // do processing ...
}

Example

$ cargo run --example view-ser ~/Documents/2021-09-20-0323_1-CapObj.SER
 
Image size: 4144 x 2822
Frame count: 100
Frame size: 23388736
Bytes per pixel: 2
Bayer: RGGB
Endianness: LittleEndian

Resources

Dependencies

~205–280KB