mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:27:34 +00:00
LibPDF: Add initial image display support
After adding support for XObject Form rendering, the next was to display XObject images. This commit adds this initial support, Images come in many shapes and forms: encodings: color spaces, bits per component, width, height, etc. This initial support is constrained to the color spaces we currently support, to images that use 8 bits per component, to images that do *not* use the JPXDecode filter, and that are not Masks. There are surely other constraints that aren't considered in this initial support, so expect breakage here and there. In addition to supporting images, we also support applying an alpha mask (SMask) on them. Additionally, a new rendering preference allows to skip image loading and rendering altogether, instead showing an empty rectangle as a placeholder (useful for when actual images are not supported). Since RenderingPreferences is becoming a bit more complex, we add a hash option that will allow us to keep track of different preferences (e.g., in a HashMap).
This commit is contained in:
parent
2331fe5e68
commit
adc45635e9
3 changed files with 148 additions and 5 deletions
|
@ -37,6 +37,7 @@
|
|||
A(DW) \
|
||||
A(DCTDecode) \
|
||||
A(DecodeParms) \
|
||||
A(Decode) \
|
||||
A(DescendantFonts) \
|
||||
A(Dest) \
|
||||
A(Dests) \
|
||||
|
@ -70,11 +71,13 @@
|
|||
A(FontFile3) \
|
||||
A(Gamma) \
|
||||
A(H) \
|
||||
A(Height) \
|
||||
A(HT) \
|
||||
A(HTO) \
|
||||
A(ICCBased) \
|
||||
A(ID) \
|
||||
A(Image) \
|
||||
A(ImageMask) \
|
||||
A(Index) \
|
||||
A(JBIG2Decode) \
|
||||
A(JPXDecode) \
|
||||
|
@ -133,6 +136,7 @@
|
|||
A(UserUnit) \
|
||||
A(W) \
|
||||
A(WhitePoint) \
|
||||
A(Width) \
|
||||
A(Widths) \
|
||||
A(XObject) \
|
||||
A(XYZ) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue