Skip to content

Commit

Permalink
Fix a small bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Oct 30, 2023
1 parent 9700634 commit c845ffa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libheif/color-conversion/colorconversion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,7 @@ std::shared_ptr<HeifPixelImage> ColorConversionPipeline::convert_image(const std

// --- pass the color profiles to the new image

auto output_nclx = std::make_shared<color_profile_nclx>();
*output_nclx = step.output_state.nclx_profile;
auto output_nclx = std::make_shared<color_profile_nclx>(step.output_state.nclx_profile);
out->set_color_profile_nclx(output_nclx);
out->set_color_profile_icc(in->get_color_profile_icc());

Expand Down Expand Up @@ -546,7 +545,7 @@ std::shared_ptr<HeifPixelImage> convert_colorspace(const std::shared_ptr<HeifPix
output_state.nclx_profile = *target_profile;
}

// If some output nclx values are unspecified, set the to the same as the input.
// If some output nclx values are unspecified, set them to the same as the input.

if (output_state.nclx_profile.get_matrix_coefficients() == heif_matrix_coefficients_unspecified) {
output_state.nclx_profile.set_matrix_coefficients(input_state.nclx_profile.get_matrix_coefficients());
Expand Down

0 comments on commit c845ffa

Please sign in to comment.