/* * Copyright (c) 2023, Lucas Chollet * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Gfx { class JPEGXLLoadingContext; class JPEGXLImageDecoderPlugin : public ImageDecoderPlugin { public: static bool sniff(ReadonlyBytes); static ErrorOr> create(ReadonlyBytes); virtual ~JPEGXLImageDecoderPlugin() override; virtual IntSize size() override; virtual bool is_animated() override; virtual size_t loop_count() override; virtual size_t frame_count() override; virtual size_t first_animated_frame_index() override; virtual ErrorOr> icc_data() override; virtual ErrorOr frame(size_t index, Optional ideal_size = {}) override; private: JPEGXLImageDecoderPlugin(NonnullOwnPtr); OwnPtr m_context; }; }