mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:47:34 +00:00
LibGfx/TIFF: Add support for the ICCProfile tag
This commit is contained in:
parent
5622e7d77c
commit
4994609af0
5 changed files with 26 additions and 0 deletions
|
@ -55,6 +55,11 @@ public:
|
|||
return { *m_metadata.image_width(), *m_metadata.image_height() };
|
||||
}
|
||||
|
||||
Metadata const& metadata() const
|
||||
{
|
||||
return m_metadata;
|
||||
}
|
||||
|
||||
State state() const
|
||||
{
|
||||
return m_state;
|
||||
|
@ -482,6 +487,12 @@ ErrorOr<ImageFrameDescriptor> TIFFImageDecoderPlugin::frame(size_t index, Option
|
|||
|
||||
return ImageFrameDescriptor { m_context->bitmap(), 0 };
|
||||
}
|
||||
|
||||
ErrorOr<Optional<ReadonlyBytes>> TIFFImageDecoderPlugin::icc_data()
|
||||
{
|
||||
return m_context->metadata().icc_profile().map([](auto const& buffer) -> ReadonlyBytes { return buffer.bytes(); });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue