Image2DFormat
Leave feedback
On this page
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.
| 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. |
public static final Image2DFormat UNDEFINED
public static final Image2DFormat JPEG
public static final Image2DFormat PNG
public static final Image2DFormat BMP
public static final Image2DFormat GIF
public static final Image2DFormat TIFF
public static final Image2DFormat ICON
public static final Image2DFormat SVG
public static final Image2DFormat WMF
public static final Image2DFormat EMF
public String getName()
Returns a formal name of this image format. Never returns null.
Returns: java.lang.String
public String getFormalName()
Returns a formal name of this image format. Never returns null.
Returns: java.lang.String
public boolean isVector()
Indicates whether this format is vector (true) or raster (false).
Returns: boolean
public String getFileExtension()
Returns lowercase file extension (without dot) for this format.
Returns: java.lang.String
public String getMimeCode()
MIME code of the image format.
Returns: java.lang.String
public String toString()
Returns: java.lang.String
public boolean equals(Object obj)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| obj | java.lang.Object |
Returns: boolean
public int hashCode()
Returns: int
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
public static Image2DFormat parseFromMime(String mimeCode)
Returns Image2DFormat based on MIME type string.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| mimeCode | java.lang.String |
Returns: Image2DFormat
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.