com.groupdocs.metadata

Interfaces

Classes

Exceptions

com.groupdocs.metadata

Class ImageFormat

    • Constructor Detail

      • ImageFormat

        protected ImageFormat(String fileName)

        Initializes a new instance of the ImageFormat class.

        Parameters:
        fileName - Absolute path to the file.
      • ImageFormat

        protected ImageFormat(String fileName,
                   com.aspose.ms.System.Text.Encoding encoding)

        Initializes a new instance of the ImageFormat class.

        Parameters:
        fileName - Absolute path to the file.
        encoding - Image encoding.
      • ImageFormat

        protected ImageFormat(InputStream input)

        Initializes a new instance of the ImageFormat class.

        Parameters:
        input - File stream.
      • ImageFormat

        protected ImageFormat(InputStream input,
                   com.aspose.ms.System.Text.Encoding encoding)

        Initializes a new instance of the ImageFormat class.

        Parameters:
        input - File stream.
        encoding - Image encoding.
    • Method Detail

      • getWidth

        public int getWidth()

        Gets the image width.

        Returns:
        The width.
      • getHeight

        public int getHeight()

        Gets the image height.

        Returns:
        The height.
      • getByteOrder

        public final int getByteOrder()

        Gets the byte-order. See https://en.wikipedia.org/wiki/Endianness".

        Returns:
        The byte-order value.
      • fromFile

        public static ImageFormat fromFile(String fileName)

        Creates ImageFormat from the existing file.

        Parameters:
        fileName - Absolute path to the file.
        Returns:
        ImageFormat if fileName has image format; otherwise throws InvalidFormatException.
        Throws:
        ArgumentNullException - Path could not be null or empty.
        com.aspose.ms.System.IO.FileNotFoundException - File does not exist.
      • fromFile

        public static ImageFormat fromFile(String fileName,
                           Charset encoding)

        Creates ImageFormat from the existing file.

        Parameters:
        fileName - Absolute path to the file.
        encoding - The encoding using for text metadata for unknown encoding.
        Returns:
        ImageFormat if fileName has image format; otherwise throws InvalidFormatException.
      • fromStream

        public static ImageFormat fromStream(InputStream stream)

        Creates ImageFormat from the System.IO.Stream.

        Parameters:
        stream - Input stream.
        Returns:
        ImageFormat if stream is an image; otherwise throws InvalidFormatException.
        Throws:
        ArgumentNullException - Stream could not be null.
      • cleanMetadata

        public void cleanMetadata()

        Removes all metadata presented in image.


        This feature is not available in trial mode.

        Overrides:
        cleanMetadata in class FormatBase