com.groupdocs.editor.htmlcss.resources.images

Class ImageType

  • All Implemented Interfaces:
    IResourceType


    public class ImageType
    extends Object
    implements IResourceType

    Represents one supportable image type (format), supports both raster and vector formats

    • Constructor Detail

      • ImageType

        public ImageType()
    • Method Detail

      • equals

        public final boolean equals(ImageType other)

        Determines whether this instance is equal with specified "ImageType" instance

        Parameters:
        other - Other ImageType instance to check on equality with this
        Returns:
        True if are equal, false if are unequal
      • equals

        public boolean equals(Object obj)

        Determines whether this instance is equal with specified uncasted object, which presumably is another "ImageType" instance

        Overrides:
        equals in class Object
        Parameters:
        obj - Other System.Object instance, that is presumably of ImageType type, to check on equality with this
        Returns:
        True if are equal, false if are unequal
      • getBmp

        public static ImageType getBmp()

        BMP image type

      • getEmf

        public static ImageType getEmf()

        EMF (Enhanced MetaFile) vector image type

      • 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'.

        Specified by:
        getFileExtension in interface IResourceType
      • 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.

        Specified by:
        getFormalName in interface IResourceType
      • getGif

        public static ImageType getGif()

        GIF image type

      • getIcon

        public static ImageType getIcon()

        ICON image type

      • getJpeg

        public static ImageType getJpeg()

        JPEG image type

      • getMimeCode

        public final String getMimeCode()

        MIME code of a particular image type as a string. For the Undefined type returns a string 'unsefined'.

        Specified by:
        getMimeCode in interface IResourceType
      • getPng

        public static ImageType getPng()

        PNG image type

      • getSvg

        public static ImageType getSvg()

        SVG vector image type

      • getTiff

        public static ImageType getTiff()

        TIFF (Tagged Image File Format) raster image type

      • getUndefined

        public static ImageType getUndefined()

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

      • getWmf

        public static ImageType getWmf()

        WMF (Windows MetaFile) vector image type

      • hashCode

        public int hashCode()

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

        Overrides:
        hashCode in class Object
        Returns:
        Signed 4-byte integer
      • isVector

        public final boolean isVector()

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

      • op_Equality

        public static boolean op_Equality(ImageType first,
                          ImageType second)

        Defines whether two specific ImageType instances are equal

        Parameters:
        first - First ImageType instance to check
        second - Second ImageType instance to check
        Returns:
        True if are equal, false if are unequal
      • op_Inequality

        public static boolean op_Inequality(ImageType first,
                            ImageType second)

        Defines whether two specific ImageType instances are not equal

        Parameters:
        first - First ImageType instance to check
        second - Second ImageType instance to check
        Returns:
        True if are unequal, false if are equal
      • parseFromFilenameWithExtension

        public static ImageType parseFromFilenameWithExtension(String filename)

        Returns ImageType value, which is equivalent of filename extension, which is extracted from specified filename

        Parameters:
        filename - Arbitrary filename, can be a relative or full path
        Returns:
        ImageType value. Returns ImageType.Undefined, if extension cannot be recognized.
      • parseFromMime

        public static ImageType parseFromMime(String mimeCode)

        Returns ImageType value, which is equivalent of specified MIME code

        Parameters:
        mimeCode - Arbitrary MIME-code
        Returns:
        ImageType value. Returns ImageType.Undefined, if extension cannot be recognized.
      • toString

        public String toString()

        Returns a FormalName property

        Overrides:
        toString in class Object
        Returns: