1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:27:45 +00:00

LibGfx/JBIG2: Decode the file header

Running `image` with `#define JBIG2_DEBUG 1` now prints number of pages.
This commit is contained in:
Nico Weber 2024-03-03 20:05:21 -05:00 committed by Andreas Kling
parent 58838db445
commit 5cefcad2fe
2 changed files with 95 additions and 4 deletions

View file

@ -20,6 +20,15 @@ public:
static ErrorOr<NonnullOwnPtr<ImageDecoderPlugin>> create(ReadonlyBytes);
virtual ~JBIG2ImageDecoderPlugin() override = default;
virtual IntSize size() override;
virtual ErrorOr<ImageFrameDescriptor> frame(size_t index, Optional<IntSize> ideal_size = {}) override;
private:
JBIG2ImageDecoderPlugin(ReadonlyBytes);
OwnPtr<JBIG2LoadingContext> m_context;
};
}