Word.ImageFormat enum
注釈
[ API セット: WordApiDesktop 1.1 ]
例
// 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);
});
フィールド
bmp = "Bmp" | |
emf = "Emf" | |
exif = "Exif" | |
gif = "Gif" | |
icon = "Icon" | |
jpeg = "Jpeg" | |
pdf = "Pdf" | |
pict = "Pict" | |
png = "Png" | |
svg = "Svg" | |
tiff = "Tiff" | |
undefined = "Undefined" | |
unsupported = "Unsupported" | |
wmf = "Wmf" |
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Office Add-ins