Aspose::Words::Drawing::ImageType enum

ImageType enum

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

enum class ImageType : int

Values

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

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(imgShape->get_ImageData()->get_ImageType(), ImageType::Jpeg);

See Also