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" | Exif イメージ形式。 |
| gif = "Gif" | GIF イメージ形式。 |
| icon = "Icon" | アイコンの画像形式。 |
| jpeg = "Jpeg" | JPEG イメージ形式。 |
| pdf = "Pdf" | PDF 画像形式。 |
| pict = "Pict" | PICT イメージ形式。 |
| png = "Png" | PNG イメージ形式。 |
| svg = "Svg" | SVG イメージ形式。 |
| tiff = "Tiff" | TIFF イメージ形式。 |
| undefined = "Undefined" | 未定義のイメージ形式。 |
| unsupported = "Unsupported" | サポートされていないイメージ形式。 |
| wmf = "Wmf" | Windows メタファイルのイメージ形式。 |