mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-08 23:42:53 +03:00
LibGfx/TIFF: Override ImageDecoderPlugin::metadata()
This commit is contained in:
parent
48347d1923
commit
383be5e49c
Notes:
sideshowbarker
2024-07-17 18:23:22 +09:00
Author: https://github.com/LucasChollet Commit: https://github.com/SerenityOS/serenity/commit/383be5e49c Pull-request: https://github.com/SerenityOS/serenity/pull/22483 Reviewed-by: https://github.com/AtkinsSJ ✅ Reviewed-by: https://github.com/nico
@ -564,6 +564,11 @@ ErrorOr<ImageFrameDescriptor> TIFFImageDecoderPlugin::frame(size_t index, Option
|
||||
return ImageFrameDescriptor { m_context->bitmap(), 0 };
|
||||
}
|
||||
|
||||
Optional<Metadata const&> TIFFImageDecoderPlugin::metadata()
|
||||
{
|
||||
return m_context->metadata();
|
||||
}
|
||||
|
||||
ErrorOr<Optional<ReadonlyBytes>> TIFFImageDecoderPlugin::icc_data()
|
||||
{
|
||||
return m_context->metadata().icc_profile().map([](auto const& buffer) -> ReadonlyBytes { return buffer.bytes(); });
|
||||
|
@ -36,6 +36,7 @@ public:
|
||||
|
||||
virtual ErrorOr<ImageFrameDescriptor> frame(size_t index, Optional<IntSize> ideal_size = {}) override;
|
||||
|
||||
virtual Optional<Metadata const&> metadata() override;
|
||||
virtual ErrorOr<Optional<ReadonlyBytes>> icc_data() override;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user