|
THotPDF.AddImageWithSMask
|
Top Previous Next |
|
Adds a colour 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: TBytes; const Alpha: TBytes): Integer; function AddImageWithSMask32(Bitmap32: TBitmap): Integer;
C++ syntax: __property int AddImageWithSMask(int Width, int Height, const TBytes& RGB, const TBytes& Alpha); __property int AddImageWithSMask32(TBitmap* Bitmap32);
Description SMask images carry an independent 8-bit DeviceGray channel whose luminosity drives the alpha of the colour image at paint time (0 = fully transparent, 255 = fully opaque). HotPDF emits both planes as Flate-compressed image XObjects, wires the colour image dictionary's 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 colour image at paint time (0 = fully transparent, 255 = fully opaque). HotPDF emits both planes as Flate-compressed image XObjects, wires the colour 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(Bitmap32) Convenience overload for the common "I have a PNG with alpha" workflow. The
Return value: an index into
Code Example
See Also AddImage, THPDFPage.ShowImage, Version, PDF Filter Support
|