FileFormat

Inheritance: java.lang.Object, com.aspose.ms.System.ValueType, com.aspose.ms.System.Enum

public final class FileFormat extends System.Enum

受支持的图像文件格式之一。

字段

字段描述
Unknown未知的文件格式。
Custom自定义文件格式。
BmpBmp(Dib)文件格式。
GifGif 文件格式。
JpegJpeg 文件格式。
PngPng 文件格式。
TiffTiff 文件格式。
PsdPsd 文件格式。
PdfPdf 文件格式
Icoico 格式
Jpeg2000Jpeg2000 文件格式
DjvuDjvu 文件格式
Webpwebp 文件格式
EmfEmf/Emf+ 文件格式
Dicomdicom 格式
SvgSVG 文件格式
WmfWmf 文件格式
DngDNG 文件格式
OdgOpen 文档图形格式
Eps封装的 PostScript 格式
CdrCDR 文件格式
CmxCMX 文件格式
Otgotg 文件格式
Html5CanvasHtml5 Canvas 格式
Apng动画 Png 文件格式。
TgaTruevision TGA 文件格式。
DxfAutoCAD 绘图交换格式。
Emzemz,压缩的 emf
WmzWMZ,压缩的 wmf
SvgzSVGZ,压缩的 svg
FOdgfodg,平面 odg 格式
AvifAVIF 文件格式。
BigTiffBig Tiff 格式。

Example: This example shows how to determine the image format without loading the entire image from a file.

String dir = "c:\\temp\\";

// 使用文件的绝对路径
long format = com.aspose.imaging.Image.getFileFormat(dir + "sample.gif");

// 文件格式的字符串表示。
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

未知的文件格式。

Custom

public static final long Custom

自定义文件格式。

Bmp

public static final long Bmp

Bmp(Dib)文件格式。

Gif

public static final long Gif

Gif 文件格式。

Jpeg

public static final long Jpeg

Jpeg 文件格式。

Png

public static final long Png

Png 文件格式。

Tiff

public static final long Tiff

Tiff 文件格式。

Psd

public static final long Psd

Psd 文件格式。

Pdf

public static final long Pdf

Pdf 文件格式

Ico

public static final long Ico

ico 格式

Jpeg2000

public static final long Jpeg2000

Jpeg2000 文件格式

Djvu

public static final long Djvu

Djvu 文件格式

Webp

public static final long Webp

webp 文件格式

Emf

public static final long Emf

Emf/Emf+ 文件格式

Dicom

public static final long Dicom

dicom 格式

Svg

public static final long Svg

SVG 文件格式

Wmf

public static final long Wmf

Wmf 文件格式

Dng

public static final long Dng

DNG 文件格式

Odg

public static final long Odg

Open 文档图形格式

Eps

public static final long Eps

封装的 PostScript 格式

Cdr

public static final long Cdr

CDR 文件格式

Cmx

public static final long Cmx

CMX 文件格式

Otg

public static final long Otg

otg 文件格式

Html5Canvas

public static final long Html5Canvas

Html5 Canvas 格式

Apng

public static final long Apng

动画 Png 文件格式。

Tga

public static final long Tga

Truevision TGA 文件格式。

Dxf

public static final long Dxf

AutoCAD 绘图交换格式。

Emz

public static final long Emz

emz,压缩的 emf

Wmz

public static final long Wmz

WMZ,压缩的 wmf

Svgz

public static final long Svgz

SVGZ,压缩的 svg

FOdg

public static final long FOdg

fodg,平面 odg 格式

Avif

public static final long Avif

AVIF 文件格式。

BigTiff

public static final long BigTiff

Big Tiff 格式。