|
THotPDF.AddImageWithSMask
|
Top Previous Next |
|
Adds a color image XObject together with a PDF 1.4 soft-mask image XObject (ISO 32000-1 8.9.5.4) so the resulting picture carries full per-pixel transparency instead of the binary on/off limit of the legacy
Delphi syntax: function AddImageWithSMask(Width, Height: Integer; const RGB: array of Byte; const Alpha: array of Byte): Integer; function AddImageWithTransparency(Width, Height: Integer; const RGB: array of Byte; const Alpha: array of Byte): Integer; function AddImageWithSMask32(Width, Height: Integer; const Pixels: array of Byte): Integer; function AddImageWithTransparency32(Width, Height: Integer; const Pixels: array of Byte): Integer;
C++ syntax: int AddImageWithSMask(int Width, int Height, const TBytes& RGB, const TBytes& Alpha); int AddImageWithTransparency(int Width, int Height, const TBytes& RGB, const TBytes& Alpha); int AddImageWithSMask32(int Width, int Height, const TBytes& Pixels); int AddImageWithTransparency32(int Width, int Height, const TBytes& Pixels);
Description SMask images carry an independent 8-bit DeviceGray channel whose luminosity drives the alpha of the color image at paint time (0 = fully transparent, 255 = fully opaque). HotPDF emits both planes as Flate-compressed image XObjects, wires the color image dictionary's AddImageWithTransparency and AddImageWithTransparency32 are naming aliases for the same PDF 1.4 soft-mask workflow. They are provided for call sites that think in terms of transparent images rather than PDF dictionary terminology
AddImageWithSMask(Width, Height, RGB, Alpha) - - -
AddImageWithSMask32(Width, Height, Pixels) Convenience overload for packed 32-bit RGBA input.
Return value: an index into
Code Example
See Also AddImage, THPDFPage.ShowImage, Version, PDF Filter Support
|