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 メタファイル イメージ形式。