Class ColorSpecificationBox


  • public class ColorSpecificationBox
    extends Box
    This class is defined to represent a Color Specification Box of JPEG JP2 file format. A Channel Definition Box has a length, and a fixed type of "colr". Its content contains the method to define the color space, the precedence and approximation accuracy (0 for JP2 files), the enumerated color space, and the ICC color profile if any.
    • Constructor Detail

      • ColorSpecificationBox

        public ColorSpecificationBox​(byte m,
                                     byte p,
                                     byte a,
                                     int ecs,
                                     ICC_Profile profile)
        Creates a ColorSpecificationBox from the provided data elements.
      • ColorSpecificationBox

        public ColorSpecificationBox​(byte[] data)
        Creates a ColorSpecificationBox from the provided byte array.
    • Method Detail

      • getElementNames

        public static String[] getElementNames()
        This method will be called by the getNativeNodeForSimpleBox of the class Box to get the element names.
      • getMethod

        public byte getMethod()
        Returns the method to define the color space.
      • getPrecedence

        public byte getPrecedence()
        Returns Precedence.
      • getApproximationAccuracy

        public byte getApproximationAccuracy()
        Returns ApproximationAccuracy.
      • getEnumeratedColorSpace

        public int getEnumeratedColorSpace()
        Returns the enumerated color space.
      • getICCProfile

        public ICC_Profile getICCProfile()
        Returns the ICC color profile in this color specification box.
      • getNativeNode

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

        protected void parse​(byte[] data)
        Description copied from class: Box
        Parses the data elements from the byte array. The subclasses should override this method.
        Overrides:
        parse 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