mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
LibPDF: Implement /Mask support with stream object argument
This commit is contained in:
parent
a3507ef65b
commit
b63eb4a4dd
Notes:
sideshowbarker
2024-07-17 01:11:48 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/b63eb4a4dd Pull-request: https://github.com/SerenityOS/serenity/pull/22398
1 changed files with 2 additions and 1 deletions
|
@ -1221,7 +1221,8 @@ PDFErrorOr<void> Renderer::show_image(NonnullRefPtr<StreamObject> image)
|
|||
} 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");
|
||||
auto mask_bitmap = TRY(load_image(mask_object->cast<StreamObject>()));
|
||||
TRY(apply_alpha_channel(image_bitmap.bitmap, mask_bitmap.bitmap));
|
||||
} else if (mask_object->is<ArrayObject>()) {
|
||||
return Error::rendering_unsupported_error("/Mask array objects not yet implemented");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue