FileFormat
Inheritance: java.lang.Object, com.aspose.ms.System.ValueType, com.aspose.ms.System.Enum
public final class FileFormat extends System.Enum
One of supported imaging file formats.
Fields
Field | Description |
---|---|
Unknown | Unknown file format. |
Custom | Custom file format. |
Bmp | Bmp (Dib) file format. |
Gif | Gif file format. |
Jpeg | Jpeg file format. |
Png | Png file format. |
Tiff | Tiff file format. |
Psd | Psd file format. |
Pdf file format | |
Ico | The ico format |
Jpeg2000 | Jpeg2000 file format |
Djvu | Djvu file format |
Webp | The webp file format |
Emf | The Emf/Emf+ file format |
Dicom | The dicom format |
Svg | SVG file format |
Wmf | The Wmf file format |
Dng | The DNG file format |
Odg | The Open document graphic format |
Eps | The Encapsulated PostScript format |
Cdr | The CDR file format |
Cmx | The CMX file format |
Otg | The otg file format |
Html5Canvas | The Html5 Canvas format |
Apng | The animated Png file format. |
Tga | The Truevision TGA file format. |
Dxf | The AutoCAD Drawing Exchange Format. |
Emz | The emz, compressed emf |
Wmz | The WMZ, compressed wmf |
Svgz | The SVGZ, compressed svg |
FOdg | The fodg, flat odg format |
Avif | The AVIF file format. |
BigTiff | The Big Tiff format. |
Example: This example shows how to determine the image format without loading the entire image from a file.
String dir = "c:\\temp\\";
// Use an absolute path to the file
long format = com.aspose.imaging.Image.getFileFormat(dir + "sample.gif");
// A string represenation of the file format.
String strFormat;
if (format == com.aspose.imaging.FileFormat.Bmp) {
strFormat = "BMP";
} else if (format == com.aspose.imaging.FileFormat.Gif) {
strFormat = "GIF";
} else if (format == com.aspose.imaging.FileFormat.Dicom) {
strFormat = "DICOM";
} else if (format == com.aspose.imaging.FileFormat.Djvu) {
strFormat = "DJVU";
} else if (format == com.aspose.imaging.FileFormat.Dng) {
strFormat = "DNG";
} else if (format == com.aspose.imaging.FileFormat.Png) {
strFormat = "PNG";
} else if (format == com.aspose.imaging.FileFormat.Jpeg) {
strFormat = "JPEG";
} else if (format == com.aspose.imaging.FileFormat.Jpeg2000) {
strFormat = "JPEG2000";
} else if (format == com.aspose.imaging.FileFormat.Psd) {
strFormat = "PSD";
} else if (format == com.aspose.imaging.FileFormat.Tiff) {
strFormat = "Tiff";
} else if (format == com.aspose.imaging.FileFormat.Webp) {
strFormat = "WEBP";
} else if (format == com.aspose.imaging.FileFormat.Cdr) {
strFormat = "CDR";
} else if (format == com.aspose.imaging.FileFormat.Cmx) {
strFormat = "CMX";
} else if (format == com.aspose.imaging.FileFormat.Emf) {
strFormat = "EMF";
} else if (format == com.aspose.imaging.FileFormat.Wmf) {
strFormat = "WMF";
} else if (format == com.aspose.imaging.FileFormat.Svg) {
strFormat = "SVG";
} else if (format == com.aspose.imaging.FileFormat.Odg) {
strFormat = "ODG";
} else if (format == com.aspose.imaging.FileFormat.Eps) {
strFormat = "EPS";
} else {
strFormat = "UNDEFINED";
}
System.out.println("The file format is " + strFormat);
Unknown
public static final long Unknown
Unknown file format.
Custom
public static final long Custom
Custom file format.
Bmp
public static final long Bmp
Bmp (Dib) file format.
Gif
public static final long Gif
Gif file format.
Jpeg
public static final long Jpeg
Jpeg file format.
Png
public static final long Png
Png file format.
Tiff
public static final long Tiff
Tiff file format.
Psd
public static final long Psd
Psd file format.
public static final long Pdf
Pdf file format
Ico
public static final long Ico
The ico format
Jpeg2000
public static final long Jpeg2000
Jpeg2000 file format
Djvu
public static final long Djvu
Djvu file format
Webp
public static final long Webp
The webp file format
Emf
public static final long Emf
The Emf/Emf+ file format
Dicom
public static final long Dicom
The dicom format
Svg
public static final long Svg
SVG file format
Wmf
public static final long Wmf
The Wmf file format
Dng
public static final long Dng
The DNG file format
Odg
public static final long Odg
The Open document graphic format
Eps
public static final long Eps
The Encapsulated PostScript format
Cdr
public static final long Cdr
The CDR file format
Cmx
public static final long Cmx
The CMX file format
Otg
public static final long Otg
The otg file format
Html5Canvas
public static final long Html5Canvas
The Html5 Canvas format
Apng
public static final long Apng
The animated Png file format.
Tga
public static final long Tga
The Truevision TGA file format.
Dxf
public static final long Dxf
The AutoCAD Drawing Exchange Format.
Emz
public static final long Emz
The emz, compressed emf
Wmz
public static final long Wmz
The WMZ, compressed wmf
Svgz
public static final long Svgz
The SVGZ, compressed svg
FOdg
public static final long FOdg
The fodg, flat odg format
Avif
public static final long Avif
The AVIF file format.
BigTiff
public static final long BigTiff
The Big Tiff format.