mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:17:45 +00:00
LibGfx/TIFF: Override ImageDecoderPlugin::metadata()
This commit is contained in:
parent
48347d1923
commit
383be5e49c
2 changed files with 6 additions and 0 deletions
|
@ -564,6 +564,11 @@ ErrorOr<ImageFrameDescriptor> TIFFImageDecoderPlugin::frame(size_t index, Option
|
||||||
return ImageFrameDescriptor { m_context->bitmap(), 0 };
|
return ImageFrameDescriptor { m_context->bitmap(), 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Optional<Metadata const&> TIFFImageDecoderPlugin::metadata()
|
||||||
|
{
|
||||||
|
return m_context->metadata();
|
||||||
|
}
|
||||||
|
|
||||||
ErrorOr<Optional<ReadonlyBytes>> TIFFImageDecoderPlugin::icc_data()
|
ErrorOr<Optional<ReadonlyBytes>> TIFFImageDecoderPlugin::icc_data()
|
||||||
{
|
{
|
||||||
return m_context->metadata().icc_profile().map([](auto const& buffer) -> ReadonlyBytes { return buffer.bytes(); });
|
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 ErrorOr<ImageFrameDescriptor> frame(size_t index, Optional<IntSize> ideal_size = {}) override;
|
||||||
|
|
||||||
|
virtual Optional<Metadata const&> metadata() override;
|
||||||
virtual ErrorOr<Optional<ReadonlyBytes>> icc_data() override;
|
virtual ErrorOr<Optional<ReadonlyBytes>> icc_data() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue