mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibPDF: Show a 'rendering unsupported' error for images with /Mask key
This commit is contained in:
parent
7d2172ff3d
commit
4bd11c8eb4
Notes:
sideshowbarker
2024-07-17 00:59:43 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/4bd11c8eb4 Pull-request: https://github.com/SerenityOS/serenity/pull/22398
@ -122,6 +122,7 @@
|
||||
X(Limits) \
|
||||
X(Linearized) \
|
||||
X(ML) \
|
||||
X(Mask) \
|
||||
X(Matrix) \
|
||||
X(MediaBox) \
|
||||
X(MissingWidth) \
|
||||
|
@ -1198,6 +1198,13 @@ PDFErrorOr<void> Renderer::show_image(NonnullRefPtr<StreamObject> image)
|
||||
image_bitmap->set_pixel(i, j, image_color);
|
||||
}
|
||||
}
|
||||
} else if (image_dict->contains(CommonNames::Mask)) {
|
||||
auto mask_object = TRY(image_dict->get_object(m_document, CommonNames::Mask));
|
||||
if (mask_object->is<StreamObject>()) {
|
||||
return Error::rendering_unsupported_error("/Mask stream objects not yet implemented");
|
||||
} else if (mask_object->is<ArrayObject>()) {
|
||||
return Error::rendering_unsupported_error("/Mask array objects not yet implemented");
|
||||
}
|
||||
}
|
||||
|
||||
auto image_space = calculate_image_space_transformation(width, height);
|
||||
|
Loading…
Reference in New Issue
Block a user