Aspose::Words::Drawing::ImageType enum

ImageType enum

Specifies the type (format) of an image in a Microsoft Word document.

enum class ImageType

Values

NameValueDescription
NoImage0The is no image data.
Unknown1An unknown image type or image type that cannot be directly stored inside a Microsoft Word document.
Emf2Windows Enhanced Metafile.
Wmf3Windows Metafile.
Pict4Macintosh PICT. An existing image will be preserved in a document, but inserting new PICT images into a document is not supported.
Jpeg5JPEG JFIF.
Png6Portable Network Graphics.
Bmp7Windows Bitmap.
Eps8Encapsulated PostScript.
WebP9WebP.
Gif10GIF.

Examples

Shows how to add an image to a shape and check its type.

auto doc = System::MakeObject<Aspose::Words::Document>();
auto builder = System::MakeObject<Aspose::Words::DocumentBuilder>(doc);

System::SharedPtr<Aspose::Words::Drawing::Shape> imgShape = builder->InsertImage(get_ImageDir() + u"Logo.jpg");
ASSERT_EQ(Aspose::Words::Drawing::ImageType::Jpeg, imgShape->get_ImageData()->get_ImageType());

See Also