Freigeben über


Word.ImageFormat enum

Stellt den Bildformattyp dar.

Hinweise

[ API-Satz: WordApiDesktop 1.1 ]

Beispiele

// 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);
});

Felder

bmp = "Bmp"

Bitmapbildformat.

emf = "Emf"

Erweitertes Metafile-Bildformat.

exif = "Exif"

Exif-Bildformat.

gif = "Gif"

GIF-Bildformat.

icon = "Icon"

Symbolbildformat.

jpeg = "Jpeg"

JPEG-Bildformat.

pdf = "Pdf"

PDF-Bildformat.

pict = "Pict"

PICT-Bildformat.

png = "Png"

PNG-Bildformat.

svg = "Svg"

SVG-Bildformat.

tiff = "Tiff"

TIFF-Bildformat.

undefined = "Undefined"

Nicht definiertes Bildformat.

unsupported = "Unsupported"

Nicht unterstütztes Bildformat.

wmf = "Wmf"

Windows Metafile-Bildformat.