javax.imageio.plugins.jpeg

Class JPEGHuffmanTable


  • public class JPEGHuffmanTable
    extends Object
    A class encapsulating a single JPEG Huffman table. Fields are provided for the "standard" tables taken from Annex K of the JPEG specification. These are the tables used as defaults.

    For more information about the operation of the standard JPEG plug-in, see the JPEG metadata format specification and usage notes

    • Field Detail

      • StdDCLuminance

        public static final JPEGHuffmanTable StdDCLuminance
        The standard DC luminance Huffman table.
      • StdDCChrominance

        public static final JPEGHuffmanTable StdDCChrominance
        The standard DC chrominance Huffman table.
      • StdACLuminance

        public static final JPEGHuffmanTable StdACLuminance
        The standard AC luminance Huffman table.
      • StdACChrominance

        public static final JPEGHuffmanTable StdACChrominance
        The standard AC chrominance Huffman table.
    • Constructor Detail

      • JPEGHuffmanTable

        public JPEGHuffmanTable(short[] lengths,
                        short[] values)
        Creates a Huffman table and initializes it. The input arrays are copied. The arrays must describe a possible Huffman table. For example, 3 codes cannot be expressed with a single bit.
        Parameters:
        lengths - an array of shorts where lengths[k] is equal to the number of values with corresponding codes of length k + 1 bits.
        values - an array of shorts containing the values in order of increasing code length.
        Throws:
        IllegalArgumentException - if lengths or values are null, the length of lengths is greater than 16, the length of values is greater than 256, if any value in lengths or values is less than zero, or if the arrays do not describe a valid Huffman table.
    • Method Detail

      • getLengths

        public short[] getLengths()
        Returns an array of shorts containing the number of values for each length in the Huffman table. The returned array is a copy.
        Returns:
        a short array where array[k-1] is equal to the number of values in the table of length k.
        See Also:
        getValues()
      • getValues

        public short[] getValues()
        Returns an array of shorts containing the values arranged by increasing length of their corresponding codes. The interpretation of the array is dependent on the values returned from getLengths. The returned array is a copy.
        Returns:
        a short array of values.
        See Also:
        getLengths()
      • toString

        public String toString()
        Returns a String representing this Huffman table.
        Overrides:
        toString in class Object
        Returns:
        a String representing this Huffman table.

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 07/12/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/imageio/plugins/jpeg/JPEGHuffmanTable.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, JPEGHuffmanTable

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut