Image2DFormat
Inheritance: java.lang.Object
All Implemented Interfaces: com.groupdocs.viewer.htmlcss.resources.IResourceType
public final class Image2DFormat implements IResourceType
Represents a 2D image format \u2014 raster or vector.
Fields
Field | Description |
---|---|
UNDEFINED | |
JPEG | |
PNG | |
BMP | |
GIF | |
TIFF | |
ICON | |
SVG | |
WMF | |
EMF |
Methods
Method | Description |
---|---|
getName() | Returns a formal name of this image format. |
getFormalName() | Returns a formal name of this image format. |
isVector() | Indicates whether this format is vector (true) or raster (false). |
getFileExtension() | Returns lowercase file extension (without dot) for this format. |
getMimeCode() | MIME code of the image format. |
toString() | |
equals(Object obj) | |
hashCode() | |
parseFromFilenameWithExtension(String filename) | Returns Image2DFormat based on file extension (with or without dot). |
parseFromMime(String mimeCode) | Returns Image2DFormat based on MIME type string. |
UNDEFINED
public static final Image2DFormat UNDEFINED
JPEG
public static final Image2DFormat JPEG
PNG
public static final Image2DFormat PNG
BMP
public static final Image2DFormat BMP
GIF
public static final Image2DFormat GIF
TIFF
public static final Image2DFormat TIFF
ICON
public static final Image2DFormat ICON
SVG
public static final Image2DFormat SVG
WMF
public static final Image2DFormat WMF
EMF
public static final Image2DFormat EMF
getName()
public String getName()
Returns a formal name of this image format. Never returns null.
Returns: java.lang.String
getFormalName()
public String getFormalName()
Returns a formal name of this image format. Never returns null.
Returns: java.lang.String
isVector()
public boolean isVector()
Indicates whether this format is vector (true) or raster (false).
Returns: boolean
getFileExtension()
public String getFileExtension()
Returns lowercase file extension (without dot) for this format.
Returns: java.lang.String
getMimeCode()
public String getMimeCode()
MIME code of the image format.
Returns: java.lang.String
toString()
public String toString()
Returns: java.lang.String
equals(Object obj)
public boolean equals(Object obj)
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.lang.Object |
Returns: boolean
hashCode()
public int hashCode()
Returns: int
parseFromFilenameWithExtension(String filename)
public static Image2DFormat parseFromFilenameWithExtension(String filename)
Returns Image2DFormat based on file extension (with or without dot).
Parameters:
Parameter | Type | Description |
---|---|---|
filename | java.lang.String |
Returns: Image2DFormat
parseFromMime(String mimeCode)
public static Image2DFormat parseFromMime(String mimeCode)
Returns Image2DFormat based on MIME type string.
Parameters:
Parameter | Type | Description |
---|---|---|
mimeCode | java.lang.String |
Returns: Image2DFormat