diff --git a/libheif/codecs/avif_boxes.cc b/libheif/codecs/avif_boxes.cc index 584a5072b2..b03b7b950c 100644 --- a/libheif/codecs/avif_boxes.cc +++ b/libheif/codecs/avif_boxes.cc @@ -124,6 +124,7 @@ std::string Box_av1C::dump(Indent& indent) const << indent << "seq_level_idx_0: " << ((int) c.seq_level_idx_0) << "\n" << indent << "high_bitdepth: " << ((int) c.high_bitdepth) << "\n" << indent << "twelve_bit: " << ((int) c.twelve_bit) << "\n" + << indent << "monochrome: " << ((int) c.monochrome) << "\n" << indent << "chroma_subsampling_x: " << ((int) c.chroma_subsampling_x) << "\n" << indent << "chroma_subsampling_y: " << ((int) c.chroma_subsampling_y) << "\n" << indent << "chroma_sample_position: " << ((int) c.chroma_sample_position) << "\n" diff --git a/libheif/codecs/avif_boxes.h b/libheif/codecs/avif_boxes.h index d1e5c6e7a3..2ac2152900 100644 --- a/libheif/codecs/avif_boxes.h +++ b/libheif/codecs/avif_boxes.h @@ -68,7 +68,10 @@ friend class Box_mini; //unsigned int (8)[] configOBUs; heif_chroma get_heif_chroma() const { - if (chroma_subsampling_x==1 && chroma_subsampling_y==1) { + if (monochrome) { + return heif_chroma_monochrome; + } + else if (chroma_subsampling_x==1 && chroma_subsampling_y==1) { return heif_chroma_420; } else if (chroma_subsampling_x==1 && chroma_subsampling_y==0) {