Class ResolutionBox

java.lang.Object
com.sun.media.imageioimpl.plugins.jpeg2000.Box
com.sun.media.imageioimpl.plugins.jpeg2000.ResolutionBox

public class ResolutionBox extends Box
This class is defined to represent a Resolution Box of JPEG JP2 file format. A Data Entry URL Box has a length, and a fixed type of "resc" (capture resolution) or "resd" (default display resolution). Its contens includes the resolution numerators, denominator, and the exponents for both horizontal and vertical directions.
  • Constructor Details

    • ResolutionBox

      public ResolutionBox(int type, byte[] data)
      Constructs a ResolutionBox from the provided type and content data array.
    • ResolutionBox

      public ResolutionBox(int type, float hRes, float vRes)
      Constructs a ResolutionBox from the provided type and horizontal/vertical resolutions.
    • ResolutionBox

      public ResolutionBox(Node node) throws IIOInvalidTreeException
      Constructs a ResolutionBox based on the provided org.w3c.dom.Node.
      Throws:
      IIOInvalidTreeException
  • Method Details

    • getHorizontalResolution

      public float getHorizontalResolution()
      Return the horizontal resolution.
    • getVerticalResolution

      public float getVerticalResolution()
      Return the vertical resolution.
    • parse

      protected void parse(byte[] data)
      Parse the data elements from the provided content data array.
      Overrides:
      parse in class Box
    • getNativeNode

      public IIOMetadataNode getNativeNode()
      Creates an IIOMetadataNode from this resolution box. The format of this node is defined in the XML dtd and xsd for the JP2 image file.
      Overrides:
      getNativeNode in class Box
    • compose

      protected void compose()
      Description copied from class: Box
      Composes the content byte array from the data elements.
      Overrides:
      compose in class Box