diff options
Diffstat (limited to 'lib/jxl/image_bundle.cc')
-rw-r--r-- | lib/jxl/image_bundle.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/jxl/image_bundle.cc b/lib/jxl/image_bundle.cc index dfbc02d..fc6d153 100644 --- a/lib/jxl/image_bundle.cc +++ b/lib/jxl/image_bundle.cc @@ -9,13 +9,8 @@ #include <utility> #include "lib/jxl/base/byte_order.h" -#include "lib/jxl/base/padded_bytes.h" #include "lib/jxl/base/printf_macros.h" -#include "lib/jxl/base/profiler.h" -#include "lib/jxl/codec_in_out.h" -#include "lib/jxl/color_management.h" #include "lib/jxl/fields.h" -#include "lib/jxl/luminance.h" namespace jxl { @@ -41,8 +36,9 @@ void ImageBundle::VerifyMetadata() const { JXL_CHECK(metadata_->color_encoding.IsGray() == IsGray()); if (metadata_->HasAlpha() && alpha().xsize() == 0) { - JXL_ABORT("MD alpha_bits %u IB alpha %" PRIuS " x %" PRIuS "\n", - metadata_->GetAlphaBits(), alpha().xsize(), alpha().ysize()); + JXL_UNREACHABLE("MD alpha_bits %u IB alpha %" PRIuS " x %" PRIuS "\n", + metadata_->GetAlphaBits(), alpha().xsize(), + alpha().ysize()); } const uint32_t alpha_bits = metadata_->GetAlphaBits(); JXL_CHECK(alpha_bits <= 32); @@ -99,12 +95,11 @@ ImageF* ImageBundle::alpha() { return &extra_channels_[ec]; } -void ImageBundle::SetAlpha(ImageF&& alpha, bool alpha_is_premultiplied) { +void ImageBundle::SetAlpha(ImageF&& alpha) { const ExtraChannelInfo* eci = metadata_->Find(ExtraChannel::kAlpha); // Must call SetAlphaBits first, otherwise we don't know which channel index JXL_CHECK(eci != nullptr); JXL_CHECK(alpha.xsize() != 0 && alpha.ysize() != 0); - JXL_CHECK(eci->alpha_associated == alpha_is_premultiplied); if (extra_channels_.size() < metadata_->extra_channel_info.size()) { // TODO(jon): get rid of this case extra_channels_.insert( |