java.lang.Object
com.aspose.words.ImageType
public class ImageType
- extends java.lang.Object
Utility class containing constants.
Specifies the type (format) of an image in a Microsoft Word document.
Example:
Shows how to add an image to a shape and check its type.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
BufferedImage image = ImageIO.read(getAsposelogoUri().toURL().openStream());
// The image in the URL is a .gif. Inserting it into a document converts it into a .png.
Shape imgShape = builder.insertImage(image);
Assert.assertEquals(imgShape.getImageData().getImageType(), ImageType.PNG);
- See Also:
- ImageData.ImageType
Field Summary |
static final int | NO_IMAGE = 0 | |
The is no image data.
|
static final int | UNKNOWN = 1 | |
An unknown image type or image type that cannot be directly stored inside a Microsoft Word document.
|
static final int | EMF = 2 | |
Windows Enhanced Metafile.
|
static final int | WMF = 3 | |
Windows Metafile.
|
static final int | PICT = 4 | |
Macintosh PICT. An existing image will be preserved in a document, but inserting new
PICT images into a document is not supported.
|
static final int | JPEG = 5 | |
JPEG JFIF.
|
static final int | PNG = 6 | |
Portable Network Graphics.
|
static final int | BMP = 7 | |
Windows Bitmap.
|
NO_IMAGE = 0 | |
public static final int NO_IMAGE |
-
The is no image data.
UNKNOWN = 1 | |
public static final int UNKNOWN |
-
An unknown image type or image type that cannot be directly stored inside a Microsoft Word document.
EMF = 2 | |
public static final int EMF |
-
Windows Enhanced Metafile.
WMF = 3 | |
public static final int WMF |
-
Windows Metafile.
PICT = 4 | |
public static final int PICT |
-
Macintosh PICT. An existing image will be preserved in a document, but inserting new
PICT images into a document is not supported.
JPEG = 5 | |
public static final int JPEG |
-
JPEG JFIF.
PNG = 6 | |
public static final int PNG |
-
Portable Network Graphics.
BMP = 7 | |
public static final int BMP |
-
Windows Bitmap.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.