eimage-core 0.0.1-alpha.13

Core primitives and operations for processing image collections in 3D space.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use chrono::{DateTime, Utc};
use image::{ImageBuffer, Rgb};

#[derive(Debug, Clone, PartialEq)]
pub struct Image {
    buffer: ImageBuffer<Rgb<u8>, Vec<u8>>,
    timestamp: DateTime<Utc>,
}

impl Image {
    pub fn new(buffer: ImageBuffer<Rgb<u8>, Vec<u8>>, timestamp: DateTime<Utc>) -> Self {
        Self { buffer, timestamp }
    }

    pub fn get_buffer(&self) -> &ImageBuffer<Rgb<u8>, Vec<u8>> {
        &self.buffer
    }
}