Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[encoding] Clarify behavior of pixel data decoding in single sample per pixel #593

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading