diff --git a/src/encoder/colortype.rs b/src/encoder/colortype.rs index 4813ba2..f6c775a 100644 --- a/src/encoder/colortype.rs +++ b/src/encoder/colortype.rs @@ -20,6 +20,14 @@ impl ColorType for Gray8 { const SAMPLE_FORMAT: &'static [SampleFormat] = &[SampleFormat::Uint]; } +pub struct GrayI8; +impl ColorType for GrayI8 { + type Inner = i8; + const TIFF_VALUE: PhotometricInterpretation = PhotometricInterpretation::BlackIsZero; + const BITS_PER_SAMPLE: &'static [u16] = &[8]; + const SAMPLE_FORMAT: &'static [SampleFormat] = &[SampleFormat::Int]; +} + pub struct Gray16; impl ColorType for Gray16 { type Inner = u16; @@ -28,6 +36,14 @@ impl ColorType for Gray16 { const SAMPLE_FORMAT: &'static [SampleFormat] = &[SampleFormat::Uint]; } +pub struct GrayI16; +impl ColorType for GrayI16 { + type Inner = i16; + const TIFF_VALUE: PhotometricInterpretation = PhotometricInterpretation::BlackIsZero; + const BITS_PER_SAMPLE: &'static [u16] = &[16]; + const SAMPLE_FORMAT: &'static [SampleFormat] = &[SampleFormat::Int]; +} + pub struct Gray32; impl ColorType for Gray32 { type Inner = u32; @@ -36,6 +52,14 @@ impl ColorType for Gray32 { const SAMPLE_FORMAT: &'static [SampleFormat] = &[SampleFormat::Uint]; } +pub struct GrayI32; +impl ColorType for GrayI32 { + type Inner = i32; + const TIFF_VALUE: PhotometricInterpretation = PhotometricInterpretation::BlackIsZero; + const BITS_PER_SAMPLE: &'static [u16] = &[32]; + const SAMPLE_FORMAT: &'static [SampleFormat] = &[SampleFormat::Int]; +} + pub struct Gray32Float; impl ColorType for Gray32Float { type Inner = f32; @@ -52,6 +76,14 @@ impl ColorType for Gray64 { const SAMPLE_FORMAT: &'static [SampleFormat] = &[SampleFormat::Uint]; } +pub struct GrayI64; +impl ColorType for GrayI64 { + type Inner = i64; + const TIFF_VALUE: PhotometricInterpretation = PhotometricInterpretation::BlackIsZero; + const BITS_PER_SAMPLE: &'static [u16] = &[64]; + const SAMPLE_FORMAT: &'static [SampleFormat] = &[SampleFormat::Int]; +} + pub struct Gray64Float; impl ColorType for Gray64Float { type Inner = f64;