UNPKG

pptx-automizer

Version:

A template based pptx generator

24 lines (23 loc) 1.39 kB
import { XmlElement } from '../types/xml-types'; import { ImageStyle } from '../types/modify-types'; import { IPresentationProps } from '../interfaces/ipresentation-props'; export default class ModifyImageHelper { /** * Update the "Target" attribute of a created image relation. * This will change the image itself. Load images with Automizer.loadMedia * @param filename name of target image in root template media folder. */ static setRelationTarget: (filename: string) => (element: XmlElement, arg1: XmlElement) => void; /** * Update the "Target" attribute of a created image relation. * This will change the image itself. Load images with Automizer.loadMedia * This will also auto-crop the image to the new width and height, * based on the container aspect ratio, derived from the original image * and using the new image width and height based on the files loaded into * the presentation media folder using .loadMedia() * @param filename name of target image in root template media folder. * @param pres presentation properties (to access the root template archive) */ static setRelationTargetCover: (filename: string, pres: IPresentationProps) => (element: XmlElement, arg1: XmlElement) => Promise<void>; static setDuotoneFill: (duotoneParams: ImageStyle['duotone']) => (element: XmlElement) => void; }