mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibPDF: Add spec comment about valid bits_per_component values
This commit is contained in:
parent
64bb9aa8c7
commit
7c24a89acf
Notes:
sideshowbarker
2024-07-17 00:53:02 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/7c24a89acf Pull-request: https://github.com/SerenityOS/serenity/pull/21507
1 changed files with 1 additions and 0 deletions
|
@ -842,6 +842,7 @@ PDFErrorOr<NonnullRefPtr<Gfx::Bitmap>> Renderer::load_image(NonnullRefPtr<Stream
|
|||
color_rendering_intent = TRY(image_dict->get_name(m_document, CommonNames::Intent))->name();
|
||||
// FIXME: Do something with color_rendering_intent.
|
||||
|
||||
// "Valid values are 1, 2, 4, 8, and (in PDF 1.5) 16."
|
||||
auto bits_per_component = image_dict->get_value(CommonNames::BitsPerComponent).get<int>();
|
||||
if (bits_per_component != 8) {
|
||||
return Error(Error::Type::RenderingUnsupported, "Image's bit per component != 8");
|
||||
|
|
Loading…
Reference in a new issue