ImageType

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

Constructors

Constructor Description
ImageType()

Methods

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

ImageType()

public ImageType()

getUndefined()

public static ImageType getUndefined()

Undefined image type - special value, which should not normally occur

Returns: ImageType

getJpeg()

public static ImageType getJpeg()

JPEG image type

Returns: ImageType

getPng()

public static ImageType getPng()

PNG image type

Returns: ImageType

getBmp()

public static ImageType getBmp()

BMP image type

Returns: ImageType

getGif()

public static ImageType getGif()

GIF image type

Returns: ImageType

getIcon()

public static ImageType getIcon()

ICON image type

Returns: ImageType

getSvg()

public static ImageType getSvg()

SVG vector image type

Returns: ImageType

getWmf()

public static ImageType getWmf()

WMF (Windows MetaFile) vector image type

Returns: ImageType

getEmf()

public static ImageType getEmf()

EMF (Enhanced MetaFile) vector image type

Returns: ImageType

getTiff()

public static ImageType getTiff()

TIFF (Tagged Image File Format) raster image type

Returns: ImageType

getFormalName()

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

isVector()

public final boolean isVector()

Indicates whether this particular format is vector (true) or raster (false)

Returns: boolean

getFileExtension()

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

toString()

public String toString()

Returns a FormalName property

Returns: java.lang.String -

getMimeCode()

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

equals(ImageType other)

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

equals(Object obj)

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

op_Equality(ImageType first, ImageType second)

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

op_Inequality(ImageType first, ImageType second)

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

hashCode()

public int hashCode()

Returns a hash-code, which is an immutable number for this specific instance

Returns: int - Signed 4-byte integer

parseFromFilenameWithExtension(String filename)

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.

parseFromMime(String mimeCode)

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.