ImageType
Leave feedback
On this page
Inheritance: java.lang.Object
All Implemented Interfaces: com.groupdocs.editor.htmlcss.resources.IResourceType
public class ImageType implements IResourceType
Represents one supportable image type (format), supports both raster and vector formats
| Constructor | Description |
|---|---|
| ImageType() |
| Method | Description |
|---|---|
| getUndefined() | Undefined image type - special value, which should not normally occur |
| getJpeg() | JPEG image type |
| getPng() | PNG image type |
| getBmp() | BMP image type |
| getGif() | GIF image type |
| getIcon() | ICON image type |
| getSvg() | SVG vector image type |
| getWmf() | WMF (Windows MetaFile) vector image type |
| getEmf() | EMF (Enhanced MetaFile) vector image type |
| getTiff() | TIFF (Tagged Image File Format) raster image type |
| getFormalName() | Returns a formal name of this image format. |
| isVector() | Indicates whether this particular format is vector (true) or raster (false) |
| getFileExtension() | File extension (without leading dot character) of a particular image type in lower case. |
| toString() | Returns a FormalName property |
| getMimeCode() | MIME code of a particular image type as a string. |
| equals(ImageType other) | Determines whether this instance is equal with specified “ImageType” instance |
| equals(Object obj) | Determines whether this instance is equal with specified uncasted object, which presumably is another “ImageType” instance |
| op_Equality(ImageType first, ImageType second) | Defines whether two specific ImageType instances are equal |
| op_Inequality(ImageType first, ImageType second) | Defines whether two specific ImageType instances are not equal |
| hashCode() | Returns a hash-code, which is an immutable number for this specific instance |
| parseFromFilenameWithExtension(String filename) | Returns ImageType value, which is equivalent of filename extension, which is extracted from specified filename |
| parseFromMime(String mimeCode) | Returns ImageType value, which is equivalent of specified MIME code |
public ImageType()
public static ImageType getUndefined()
Undefined image type - special value, which should not normally occur
Returns: ImageType
public static ImageType getJpeg()
JPEG image type
Returns: ImageType
public static ImageType getPng()
PNG image type
Returns: ImageType
public static ImageType getBmp()
BMP image type
Returns: ImageType
public static ImageType getGif()
GIF image type
Returns: ImageType
public static ImageType getIcon()
ICON image type
Returns: ImageType
public static ImageType getSvg()
SVG vector image type
Returns: ImageType
public static ImageType getWmf()
WMF (Windows MetaFile) vector image type
Returns: ImageType
public static ImageType getEmf()
EMF (Enhanced MetaFile) vector image type
Returns: ImageType
public static ImageType getTiff()
TIFF (Tagged Image File Format) raster image type
Returns: ImageType
public final String getFormalName()
Returns a formal name of this image format. Never reurns NULL. If instance is not corrupted, never throws an exception.
Returns: java.lang.String
public final boolean isVector()
Indicates whether this particular format is vector (true) or raster (false)
Returns: boolean
public final String getFileExtension()
File extension (without leading dot character) of a particular image type in lower case. For the Undefined type returns a string ‘unsefined’.
Returns: java.lang.String
public String toString()
Returns a FormalName property
Returns: java.lang.String -
public final String getMimeCode()
MIME code of a particular image type as a string. For the Undefined type returns a string ‘unsefined’.
Returns: java.lang.String
public final boolean equals(ImageType other)
Determines whether this instance is equal with specified “ImageType” instance
Parameters:
| Parameter | Type | Description |
|---|---|---|
| other | ImageType | Other ImageType instance to check on equality with this |
Returns: boolean - True if are equal, false if are unequal
public boolean equals(Object obj)
Determines whether this instance is equal with specified uncasted object, which presumably is another “ImageType” instance
Parameters:
| Parameter | Type | Description |
|---|---|---|
| obj | java.lang.Object | Other System.Object instance, that is presumably of ImageType type, to check on equality with this |
Returns: boolean - True if are equal, false if are unequal
public static boolean op_Equality(ImageType first, ImageType second)
Defines whether two specific ImageType instances are equal
Parameters:
| Parameter | Type | Description |
|---|---|---|
| first | ImageType | First ImageType instance to check |
| second | ImageType | Second ImageType instance to check |
Returns: boolean - True if are equal, false if are unequal
public static boolean op_Inequality(ImageType first, ImageType second)
Defines whether two specific ImageType instances are not equal
Parameters:
| Parameter | Type | Description |
|---|---|---|
| first | ImageType | First ImageType instance to check |
| second | ImageType | Second ImageType instance to check |
Returns: boolean - True if are unequal, false if are equal
public int hashCode()
Returns a hash-code, which is an immutable number for this specific instance
Returns: int - Signed 4-byte integer
public static ImageType parseFromFilenameWithExtension(String filename)
Returns ImageType value, which is equivalent of filename extension, which is extracted from specified filename
Parameters:
| Parameter | Type | Description |
|---|---|---|
| filename | java.lang.String | Arbitrary filename, can be a relative or full path |
Returns: ImageType - ImageType value. Returns ImageType.Undefined, if extension cannot be recognized.
public static ImageType parseFromMime(String mimeCode)
Returns ImageType value, which is equivalent of specified MIME code
Parameters:
| Parameter | Type | Description |
|---|---|---|
| mimeCode | java.lang.String | Arbitrary MIME-code |
Returns: ImageType - ImageType value. Returns ImageType.Undefined, if extension cannot be recognized.
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.