Word.ImageFormat enum
Représente le type de format d’image.
Remarques
[ Ensemble d’API : WordApiDesktop 1.1 ]
Exemples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/15-images/insert-and-get-pictures.yaml
// Gets the first image in the document.
await Word.run(async (context) => {
const firstPicture: Word.InlinePicture = context.document.body.inlinePictures.getFirst();
firstPicture.load("width, height, imageFormat");
await context.sync();
console.log(`Image dimensions: ${firstPicture.width} x ${firstPicture.height}`, `Image format: ${firstPicture.imageFormat}`);
// Get the image encoded as Base64.
const base64 = firstPicture.getBase64ImageSrc();
await context.sync();
console.log(base64.value);
});
Champs
| bmp = "Bmp" | Format d’image bitmap. |
| emf = "Emf" | Format d’image métafichier amélioré. |
| exif = "Exif" | Format d’image Exif. |
| gif = "Gif" | Format d’image GIF. |
| icon = "Icon" | Format d’image d’icône. |
| jpeg = "Jpeg" | Format d’image JPEG. |
| pdf = "Pdf" | Format d’image PDF. |
| pict = "Pict" | Format d’image PICT. |
| png = "Png" | Format d’image PNG. |
| svg = "Svg" | Format d’image SVG. |
| tiff = "Tiff" | Format d’image TIFF. |
| undefined = "Undefined" | Format d’image non défini. |
| unsupported = "Unsupported" | Format d’image non pris en charge. |
| wmf = "Wmf" | Format d’image de métafichier Windows. |