diff --git a/crates/sic_io/src/encode_settings.rs b/crates/sic_io/src/encode_settings.rs index cc0384cb6..af1294294 100644 --- a/crates/sic_io/src/encode_settings.rs +++ b/crates/sic_io/src/encode_settings.rs @@ -4,6 +4,7 @@ use sic_core::image; pub mod gif; pub mod jpeg; +pub mod pnm; pub struct EncodeSettings { pub pnm_sample_encoding: image::codecs::pnm::SampleEncoding, diff --git a/crates/sic_io/src/encode_settings/pnm.rs b/crates/sic_io/src/encode_settings/pnm.rs new file mode 100644 index 000000000..05c813e5d --- /dev/null +++ b/crates/sic_io/src/encode_settings/pnm.rs @@ -0,0 +1,11 @@ +use sic_core::image::codecs::pnm::{PnmSubtype, SampleEncoding}; + +// NB: Is now unused. Just as example for RUST-14319. +pub fn pnm_subtype(sample_encoding: SampleEncoding) -> PnmSubtype { + let example = "pam"; + + match example { + "pam" => PnmSubtype::ArbitraryMap, + _ => PnmSubtype::Pixmap(sample_encoding), + } +}