Skip to content

Commit

Permalink
revert changing the constness in the API
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Nov 7, 2024
1 parent 95e9495 commit 3dd7019
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libheif/api/libheif/heif.h
Original file line number Diff line number Diff line change
Expand Up @@ -2363,7 +2363,7 @@ struct heif_encoding_options

// Set this to the NCLX parameters to be used in the output image or set to NULL
// when the same parameters as in the input image should be used.
const struct heif_color_profile_nclx* output_nclx_profile;
struct heif_color_profile_nclx* output_nclx_profile;

uint8_t macOS_compatibility_workaround_no_nclx_profile;

Expand Down
2 changes: 1 addition & 1 deletion libheif/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ Result<std::shared_ptr<ImageItem>> HeifContext::encode_image(const std::shared_p
heif_encoding_options options = in_options;

if (const auto* nclx = output_image_item->get_forced_output_nclx()) {
options.output_nclx_profile = nclx;
options.output_nclx_profile = const_cast<heif_color_profile_nclx*>(nclx);
}

Result<std::shared_ptr<HeifPixelImage>> srcImageResult = output_image_item->convert_colorspace_for_encoding(pixel_image,
Expand Down

0 comments on commit 3dd7019

Please sign in to comment.