// 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.
#ifndef LIB_JXL_ALPHA_H_ #define LIB_JXL_ALPHA_H_
#include <stddef.h> #include <stdint.h>
#include <limits>
#include"lib/jxl/base/compiler_specific.h"
namespace jxl {
// A very small value to avoid divisions by zero when converting to // unpremultiplied alpha. Page 21 of the technical introduction to OpenEXR // (https://www.openexr.com/documentation/TechnicalIntroduction.pdf) recommends // "a power of two" that is "less than half of the smallest positive 16-bit // floating-point value". That smallest value happens to be the denormal number // 2^-24, so 2^-26 should be a good choice. static constexpr float kSmallAlpha = 1.f / (1u << 26u);
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.