// Copyright (c) the JPEG XL Project Authors. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file.
std::vector<uint8_t> GoldenTestGainMap(bool has_icc, bool has_color_encoding) { // Define the parts of the gain map
uint8_t jhgm_version = 0x00;
std::vector<uint8_t> gain_map_metadata_size = {0x00, 0x58}; // 88 in decimal // TODO(firsching): Replace with more realistic data
std::string first_placeholder = "placeholder gain map metadata, fill with actual example after (ISO " "21496-1) is finalized";
JxlGainMapBundle orig_bundle; // Initialize the bundle with some test data
orig_bundle.jhgm_version = 0; constchar* metadata_str = "placeholder gain map metadata, fill with actual example after (ISO " "21496-1) is finalized";
std::vector<uint8_t> gain_map_metadata(metadata_str,
metadata_str + strlen(metadata_str));
orig_bundle.gain_map_metadata_size = gain_map_metadata.size();
orig_bundle.gain_map_metadata = gain_map_metadata.data();
// Use the ICC profile from the parameter
orig_bundle.has_color_encoding = TO_JXL_BOOL(params.has_color_encoding); if (orig_bundle.has_color_encoding) {
JxlColorEncoding color_encoding = {};
JxlColorEncodingSetToLinearSRGB(&color_encoding, /*is_gray=*/JXL_FALSE);
orig_bundle.color_encoding = color_encoding;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.