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

LibGfx/TIFF: Override ImageDecoderPlugin::metadata()

This commit is contained in:
Lucas CHOLLET 2024-01-09 21:54:51 -05:00 committed by Andrew Kaster
parent 48347d1923
commit 383be5e49c
2 changed files with 6 additions and 0 deletions

View file

@ -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(); });