diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /third_party/jpeg-xl/lib/jxl/image_bundle.h | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/jpeg-xl/lib/jxl/image_bundle.h')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/image_bundle.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/image_bundle.h b/third_party/jpeg-xl/lib/jxl/image_bundle.h index 2eea496d5e..c8a76a9f59 100644 --- a/third_party/jpeg-xl/lib/jxl/image_bundle.h +++ b/third_party/jpeg-xl/lib/jxl/image_bundle.h @@ -42,14 +42,16 @@ class ImageBundle { ImageBundle(ImageBundle&&) = default; ImageBundle& operator=(ImageBundle&&) = default; - ImageBundle Copy() const { + StatusOr<ImageBundle> Copy() const { ImageBundle copy(metadata_); - copy.color_ = Image3F(color_.xsize(), color_.ysize()); + JXL_ASSIGN_OR_RETURN(copy.color_, + Image3F::Create(color_.xsize(), color_.ysize())); CopyImageTo(color_, ©.color_); copy.c_current_ = c_current_; copy.extra_channels_.reserve(extra_channels_.size()); for (const ImageF& plane : extra_channels_) { - ImageF ec(plane.xsize(), plane.ysize()); + JXL_ASSIGN_OR_RETURN(ImageF ec, + ImageF::Create(plane.xsize(), plane.ysize())); CopyImageTo(plane, &ec); copy.extra_channels_.emplace_back(std::move(ec)); } |