Package ae.javax.imageio.plugins.jpeg

Examples of ae.javax.imageio.plugins.jpeg.JPEGHuffmanTable


                }
                tableClass = getAttributeValue(node, attrs, "class", 0, 1, true);
                tableID = getAttributeValue(node, attrs, "htableId", 0, 3, true);
                if (node instanceof IIOMetadataNode) {
                    IIOMetadataNode ourNode = (IIOMetadataNode) node;
                    JPEGHuffmanTable table =
                        (JPEGHuffmanTable) ourNode.getUserObject();
                    if (table == null) {
                        throw new IIOInvalidTreeException
                            ("dhtable node must have user object", node);
                    }
                    numCodes = table.getLengths();
                    values = table.getValues();
                } else {
                    throw new IIOInvalidTreeException
                        ("dhtable node must have user object", node);
                }
            } else {
View Full Code Here


        IIOMetadataNode getNativeNode() {
            IIOMetadataNode node = new IIOMetadataNode("dhtable");
            node.setAttribute("class", Integer.toString(tableClass));
            node.setAttribute("htableId", Integer.toString(tableID));

            node.setUserObject(new JPEGHuffmanTable(numCodes, values));

            return node;
        }
View Full Code Here

            System.out.println("Huffman Table");
            System.out.println("table class: "
                               + ((tableClass == 0) ? "DC":"AC"));
            System.out.println("table id: " + Integer.toString(tableID));

            (new JPEGHuffmanTable(numCodes, values)).toString();
            /*
              System.out.print("Lengths:");
              for (int i=0; i<16; i++) {
              System.out.print(" " + Integer.toString(numCodes[i]));
              }
View Full Code Here

                for (int j = 0; j < tables.size(); j++) {
                    if (htables[j].tableID == i) {
                        if (retval[i] != null) {
                            throw new IIOException("Metadata has duplicate Htables!");
                        }
                        retval[i] = new JPEGHuffmanTable(htables[j].numCodes,
                                                         htables[j].values);
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of ae.javax.imageio.plugins.jpeg.JPEGHuffmanTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.