2022-09-16 13:15:14 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, Dex♪ <dexes.ttp@gmail.com>
|
|
|
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-09-08 10:30:50 +00:00
|
|
|
#include <LibImageDecoderClient/Client.h>
|
2022-09-16 13:15:14 +00:00
|
|
|
#include <LibWeb/Platform/ImageCodecPlugin.h>
|
|
|
|
|
|
|
|
namespace Ladybird {
|
|
|
|
|
2023-08-02 18:01:17 +00:00
|
|
|
class ImageCodecPlugin final : public Web::Platform::ImageCodecPlugin {
|
2022-09-16 13:15:14 +00:00
|
|
|
public:
|
2023-08-02 18:01:17 +00:00
|
|
|
ImageCodecPlugin() = default;
|
|
|
|
virtual ~ImageCodecPlugin() override;
|
2022-09-16 13:15:14 +00:00
|
|
|
|
|
|
|
virtual Optional<Web::Platform::DecodedImage> decode_image(ReadonlyBytes data) override;
|
2023-09-08 10:30:50 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
RefPtr<ImageDecoderClient::Client> m_client;
|
2022-09-16 13:15:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|