mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
LibPDF: Move error for /ImageMask out of load_image()
...and tweak load_image() to support loading mask images (which don't have a color space and are always 1 bit per pixel).
This commit is contained in:
parent
3ad9782e25
commit
a3507ef65b
2 changed files with 35 additions and 13 deletions
|
@ -131,7 +131,13 @@ private:
|
|||
void end_path_paint();
|
||||
PDFErrorOr<void> set_graphics_state_from_dict(NonnullRefPtr<DictObject>);
|
||||
PDFErrorOr<void> show_text(ByteString const&);
|
||||
PDFErrorOr<NonnullRefPtr<Gfx::Bitmap>> load_image(NonnullRefPtr<StreamObject>);
|
||||
|
||||
struct LoadedImage {
|
||||
NonnullRefPtr<Gfx::Bitmap> bitmap;
|
||||
bool is_image_mask = false;
|
||||
};
|
||||
PDFErrorOr<LoadedImage> load_image(NonnullRefPtr<StreamObject>);
|
||||
|
||||
PDFErrorOr<void> show_image(NonnullRefPtr<StreamObject>);
|
||||
void show_empty_image(int width, int height);
|
||||
PDFErrorOr<NonnullRefPtr<ColorSpace>> get_color_space_from_resources(Value const&, NonnullRefPtr<DictObject>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue