PptxGenJS
PptxGenJS copied to clipboard
Add optional image shadow props
Description This PR takes the shape shadow implementation and adapts it to images. Related to Issue #986
Example
let pptx = new PptxGenJS();
let slide = pptx.addSlide();
slide.addImage({
x: 1,
y: 1,
path: "https://images.unsplash.com/photo-1506744038136-46273834b3fb?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwyMTIyMnwwfDF8c2VhcmNofDJ8fGxhbmRzY2FwZXxlbnwwfHx8fDE2NTg5MzE0MDM&ixlib=rb-1.2.1&q=80&w=1080",
shadow: {
type: "outer",
angle: 90,
blur: 10,
color: "000000",
offset: 4,
opacity: 0.5
}
});
pptx.writeFile({ fileName: "PptxGenJS-Sandbox.pptx" });
Sample PPT files: PptxGenJS-Shadows.pptx PptxGenJS_Demo_Image_20220811112738439.pptx