Make add image support base64 strings

This commit is contained in:
Dolan
2018-08-15 22:20:43 +01:00
parent f969c866a7
commit bf5bcea607
3 changed files with 41 additions and 16 deletions

View File

@ -129,7 +129,7 @@ export class File {
return this;
}
public createImage(buffer: Buffer, width?: number, height?: number): Image {
public createImage(buffer: Buffer | string | Uint8Array | ArrayBuffer, width?: number, height?: number): Image {
const image = Media.addImage(this, buffer, width, height);
this.document.addParagraph(image.Paragraph);