Class PNG


public class PNG extends HeaderFormat
The headers found in a PNG file.
Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
    PNG()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected ImageFileFormat
    The associated ImageFileFormat with this header.
    protected Optional<ImageMetadata>
    populateFromMetadata(com.drew.metadata.Metadata metadata, ImageFileAttributes attributes)
    Creates a ImageMetadata, if possible, from metadata.

    Methods inherited from class org.anchoranalysis.plugin.io.bean.metadata.header.HeaderFormat

    populateFrom

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PNG

      public PNG()
  • Method Details

    • format

      protected ImageFileFormat format()
      Description copied from class: HeaderFormat
      The associated ImageFileFormat with this header.

      Only files whose paths end with an extension for this format will be accepted.

      Specified by:
      format in class HeaderFormat
      Returns:
      the format.
    • populateFromMetadata

      protected Optional<ImageMetadata> populateFromMetadata(com.drew.metadata.Metadata metadata, ImageFileAttributes attributes) throws ImageIOException
      Description copied from class: HeaderFormat
      Creates a ImageMetadata, if possible, from metadata.
      Specified by:
      populateFromMetadata in class HeaderFormat
      Parameters:
      metadata - the Metadata to infer ImageMetadata from.
      attributes - timestamps and other file-attributes associated with the metadata.
      Returns:
      the inferred metadata, if it was possible to infer it.
      Throws:
      ImageIOException - if the metadata does not meet expectations.