2019-03-21 03:57:42 +01:00
|
|
|
#pragma once
|
|
|
|
|
2019-07-18 10:15:00 +02:00
|
|
|
#include <LibDraw/GraphicsBitmap.h>
|
2019-10-19 19:56:49 +02:00
|
|
|
#include <LibDraw/ImageDecoder.h>
|
2019-03-21 03:57:42 +01:00
|
|
|
|
2019-06-21 18:37:47 +02:00
|
|
|
RefPtr<GraphicsBitmap> load_png(const StringView& path);
|
2019-09-16 00:32:16 +10:00
|
|
|
RefPtr<GraphicsBitmap> load_png_from_memory(const u8*, size_t);
|
2019-10-15 21:48:08 +02:00
|
|
|
|
|
|
|
struct PNGLoadingContext;
|
|
|
|
|
2019-10-19 19:56:49 +02:00
|
|
|
class PNGImageDecoderPlugin final : public ImageDecoderPlugin {
|
2019-10-15 21:48:08 +02:00
|
|
|
public:
|
2019-10-19 19:56:49 +02:00
|
|
|
virtual ~PNGImageDecoderPlugin() override;
|
|
|
|
PNGImageDecoderPlugin(const u8*, size_t);
|
2019-10-15 21:48:08 +02:00
|
|
|
|
|
|
|
virtual Size size() override;
|
|
|
|
virtual RefPtr<GraphicsBitmap> bitmap() override;
|
2019-12-18 20:50:58 +01:00
|
|
|
virtual void set_volatile() override;
|
|
|
|
[[nodiscard]] virtual bool set_nonvolatile() override;
|
2019-10-15 21:48:08 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
OwnPtr<PNGLoadingContext> m_context;
|
|
|
|
};
|