Skip to content

Commit

Permalink
Merge pull request #593 from Enet4/change/encoding/encoding-expectations
Browse files Browse the repository at this point in the history
[encoding] Clarify behavior of pixel data decoding in single sample per pixel
  • Loading branch information
Enet4 authored Nov 2, 2024
2 parents 6c44c43 + e02c2cf commit 6a95595
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions encoding/src/adapters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,12 @@ pub trait PixelDataReader {
/// If the image has 3 samples per pixel,
/// the output must be in RGB with each pixel contiguous in memory
/// (planar configuration of 0).
/// However, if the image is monochrome,
/// the output should retain the photometric interpretation of the source object
/// (so that images in _MONOCHROME1_ continue to be in _MONOCHROME1_
/// and images in _MONOCHROME2_ continue to be in _MONOCHROME2_).
/// For pixel data with a single sample per pixel,
/// the output shall retain the photometric interpretation
/// declared in the original object
/// if it is one of _MONOCHROME1_, _MONOCHROME2_, or _PALETTE COLOR_.
/// For any other photometric interpretation,
/// the output shall be assumed to be in _MONOCHROME2_.
fn decode_frame(
&self,
src: &dyn PixelDataObject,
Expand Down

0 comments on commit 6a95595

Please sign in to comment.