Support 32-bit encoding

This commit is contained in:
Andrew Champion committed 2019-12-10 20:18:53 +00:00
1 parent f32b3b9d10
commit af010edcfd
2 files changed
+82

No files matched your search

+21
View File
@@ -24,6 +24,13 @@ impl ColorType for Gray16 {
const BITS_PER_SAMPLE: &'static [u16] = &[16];
}
pub struct Gray32;
impl ColorType for Gray32 {
type Inner = u32;
const TIFF_VALUE: PhotometricInterpretation = PhotometricInterpretation::BlackIsZero;
const BITS_PER_SAMPLE: &'static [u16] = &[32];
}
pub struct RGB8;
impl ColorType for RGB8 {
type Inner = u8;
@@ -38,6 +45,13 @@ impl ColorType for RGB16 {
const BITS_PER_SAMPLE: &'static [u16] = &[16, 16, 16];
}
pub struct RGB32;
impl ColorType for RGB32 {
type Inner = u32;
const TIFF_VALUE: PhotometricInterpretation = PhotometricInterpretation::RGB;
const BITS_PER_SAMPLE: &'static [u16] = &[32, 32, 32];
}
pub struct RGBA8;
impl ColorType for RGBA8 {
type Inner = u8;
@@ -52,6 +66,13 @@ impl ColorType for RGBA16 {
const BITS_PER_SAMPLE: &'static [u16] = &[16, 16, 16, 16];
}
pub struct RGBA32;
impl ColorType for RGBA32 {
type Inner = u16;
const TIFF_VALUE: PhotometricInterpretation = PhotometricInterpretation::RGB;
const BITS_PER_SAMPLE: &'static [u16] = &[32, 32, 32, 32];
}
pub struct CMYK8;
impl ColorType for CMYK8 {
type Inner = u8;