xcf_rs/data/xcf.rs
1use crate::{Layer, XcfHeader};
2
3#[derive(Debug, PartialEq, Clone)]
4pub enum XcfCompression {
5 None = 0,
6 Rle = 1,
7 Zlib = 2,
8 Fractal = 3,
9}
10
11impl XcfCompression {
12 pub fn to_u8(&self) -> u8 {
13 self.clone() as u8
14 }
15}
16
17#[derive(Debug)]
18pub struct Xcf {
19 pub header: XcfHeader,
20 /// List of layers in the XCF file, in the order they are stored in the file.
21 /// (I believe this is top layer to bottom layer)
22 ///
23 /// See [`Xcf::layer`](Xcf::layer) to get a layer by name.
24 pub layers: Vec<Layer>,
25}