public final class FileFormat
extends com.aspose.ms.System.Enum
One of supported imaging file formats.
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);
Modifier and Type | Field and Description |
---|---|
static long |
Apng
The animated Png file format.
|
static long |
Bmp
Bmp (Dib) file format.
|
static long |
Cdr
The CDR file format
|
static long |
Cmx
The CMX file format
|
static long |
Custom
Custom file format.
|
static long |
Dicom
The dicom format
|
static long |
Djvu
Djvu file format
|
static long |
Dng
The DNG file format
|
static long |
Dxf
The AutoCAD Drawing Exchange Format.
|
static long |
Emf
The Emf/Emf+ file format
|
static long |
Emz
The emz, compressed emf
|
static long |
Eps
The Encapsulated PostScript format
|
static long |
FOdg
The fodg, flat odg format
|
static long |
Gif
Gif file format.
|
static long |
Html5Canvas
The Html5 Canvas format
|
static long |
Jpeg
Jpeg file format.
|
static long |
Jpeg2000
Jpeg2000 file format
|
static long |
Odg
The Open document graphic format
|
static long |
Otg
The otg file format
|
static long |
Png
Png file format.
|
static long |
Psd
Psd file format.
|
static long |
Svg
SVG file format
|
static long |
Svgz
The SVGZ, compressed svg
|
static long |
Tga
The Truevision TGA file format.
|
static long |
Tiff
Tiff file format.
|
static long |
Undefined
Undefined file format.
|
static long |
Webp
The webp file format
|
static long |
Wmf
The Wmf file format
|
static long |
Wmz
The WMZ, compressed wmf
|
Clone, CloneTo, format, format, get_Caption, get_Value, getName, getName, getNames, getNames, getNames, getUnderlyingType, getUnderlyingType, getValue, getValues, getValues, getValues, isDefined, isDefined, isDefined, isDefined, parse, parse, parse, parse, register, toObject, toString
public static final long Undefined
Undefined file format.
public static final long Custom
Custom file format.
public static final long Bmp
Bmp (Dib) file format.
public static final long Gif
Gif file format.
public static final long Jpeg
Jpeg file format.
public static final long Png
Png file format.
public static final long Tiff
Tiff file format.
public static final long Psd
Psd file format.
public static final long Jpeg2000
Jpeg2000 file format
public static final long Djvu
Djvu file format
public static final long Webp
The webp file format
public static final long Emf
The Emf/Emf+ file format
public static final long Dicom
The dicom format
public static final long Svg
SVG file format
public static final long Wmf
The Wmf file format
public static final long Dng
The DNG file format
public static final long Odg
The Open document graphic format
public static final long Eps
The Encapsulated PostScript format
public static final long Cdr
The CDR file format
public static final long Cmx
The CMX file format
public static final long Otg
The otg file format
public static final long Html5Canvas
The Html5 Canvas format
public static final long Apng
The animated Png file format.
public static final long Tga
The Truevision TGA file format.
public static final long Dxf
The AutoCAD Drawing Exchange Format.
public static final long Emz
The emz, compressed emf
public static final long Wmz
The WMZ, compressed wmf
public static final long Svgz
The SVGZ, compressed svg
public static final long FOdg
The fodg, flat odg format