当前位置: 首页>>代码示例>>Java>>正文


Java JPEGHuffmanTable类代码示例

本文整理汇总了Java中javax.imageio.plugins.jpeg.JPEGHuffmanTable的典型用法代码示例。如果您正苦于以下问题:Java JPEGHuffmanTable类的具体用法?Java JPEGHuffmanTable怎么用?Java JPEGHuffmanTable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


JPEGHuffmanTable类属于javax.imageio.plugins.jpeg包,在下文中一共展示了JPEGHuffmanTable类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: print

import javax.imageio.plugins.jpeg.JPEGHuffmanTable; //导入依赖的package包/类
void print() {
    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]));
      }
      int count = 0;
      if (values.length > 16) {
      System.out.println("\nFirst 16 Values:");
      count = 16;
      } else {
      System.out.println("\nValues:");
      count = values.length;
      }
      for (int i=0; i<count; i++) {
      System.out.println(Integer.toString(values[i]&0xff));
      }
    */
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:DHTMarkerSegment.java

示例2: writeImage

import javax.imageio.plugins.jpeg.JPEGHuffmanTable; //导入依赖的package包/类
/**
 * Returns <code>true</code> if the write was aborted.
 */
private native boolean writeImage(long structPointer,
                                  byte [] data,
                                  int inCsType, int outCsType,
                                  int numBands,
                                  int [] bandSizes,
                                  int srcWidth,
                                  int destWidth, int destHeight,
                                  int stepX, int stepY,
                                  JPEGQTable [] qtables,
                                  boolean writeDQT,
                                  JPEGHuffmanTable[] DCHuffmanTables,
                                  JPEGHuffmanTable[] ACHuffmanTables,
                                  boolean writeDHT,
                                  boolean optimizeHuffman,
                                  boolean progressive,
                                  int numScans,
                                  int [] scans,
                                  int [] componentIds,
                                  int [] HsamplingFactors,
                                  int [] VsamplingFactors,
                                  int [] QtableSelectors,
                                  boolean haveMetadata,
                                  int restartInterval);
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:JPEGImageWriter.java

示例3: readImage

import javax.imageio.plugins.jpeg.JPEGHuffmanTable; //导入依赖的package包/类
/**
 * Returns {@code true} if the read was aborted.
 */
private native boolean readImage(int imageIndex,
                                 long structPointer,
                                 byte [] buffer,
                                 int numRasterBands,
                                 int [] srcBands,
                                 int [] bandSizes,
                                 int sourceXOffset, int sourceYOffset,
                                 int sourceWidth, int sourceHeight,
                                 int periodX, int periodY,
                                 JPEGQTable [] abbrevQTables,
                                 JPEGHuffmanTable [] abbrevDCHuffmanTables,
                                 JPEGHuffmanTable [] abbrevACHuffmanTables,
                                 int minProgressivePass,
                                 int maxProgressivePass,
                                 boolean wantUpdates);
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:19,代码来源:JPEGImageReader.java

示例4: writeImage

import javax.imageio.plugins.jpeg.JPEGHuffmanTable; //导入依赖的package包/类
/**
 * Returns {@code true} if the write was aborted.
 */
private native boolean writeImage(long structPointer,
                                  byte [] data,
                                  int inCsType, int outCsType,
                                  int numBands,
                                  int [] bandSizes,
                                  int srcWidth,
                                  int destWidth, int destHeight,
                                  int stepX, int stepY,
                                  JPEGQTable [] qtables,
                                  boolean writeDQT,
                                  JPEGHuffmanTable[] DCHuffmanTables,
                                  JPEGHuffmanTable[] ACHuffmanTables,
                                  boolean writeDHT,
                                  boolean optimizeHuffman,
                                  boolean progressive,
                                  int numScans,
                                  int [] scans,
                                  int [] componentIds,
                                  int [] HsamplingFactors,
                                  int [] VsamplingFactors,
                                  int [] QtableSelectors,
                                  boolean haveMetadata,
                                  int restartInterval);
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:JPEGImageWriter.java

示例5: readImage

import javax.imageio.plugins.jpeg.JPEGHuffmanTable; //导入依赖的package包/类
/**
 * Returns <code>true</code> if the read was aborted.
 */
private native boolean readImage(int imageIndex,
                                 long structPointer,
                                 byte [] buffer,
                                 int numRasterBands,
                                 int [] srcBands,
                                 int [] bandSizes,
                                 int sourceXOffset, int sourceYOffset,
                                 int sourceWidth, int sourceHeight,
                                 int periodX, int periodY,
                                 JPEGQTable [] abbrevQTables,
                                 JPEGHuffmanTable [] abbrevDCHuffmanTables,
                                 JPEGHuffmanTable [] abbrevACHuffmanTables,
                                 int minProgressivePass,
                                 int maxProgressivePass,
                                 boolean wantUpdates);
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:19,代码来源:JPEGImageReader.java

示例6: getDefaultHuffmanTables

import javax.imageio.plugins.jpeg.JPEGHuffmanTable; //导入依赖的package包/类
/**
 * Return an array of default Huffman tables.
 */
static JPEGHuffmanTable [] getDefaultHuffmanTables(boolean wantDC) {
    JPEGHuffmanTable [] tables = new JPEGHuffmanTable[2];
    if (wantDC) {
        tables[0] = JPEGHuffmanTable.StdDCLuminance;
        tables[1] = JPEGHuffmanTable.StdDCChrominance;
    } else {
        tables[0] = JPEGHuffmanTable.StdACLuminance;
        tables[1] = JPEGHuffmanTable.StdACChrominance;
    }
    return tables;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:JPEG.java

示例7: DHTMarkerSegment

import javax.imageio.plugins.jpeg.JPEGHuffmanTable; //导入依赖的package包/类
DHTMarkerSegment(boolean needFour) {
    super(JPEG.DHT);
    tables.add(new Htable(JPEGHuffmanTable.StdDCLuminance, true, 0));
    if (needFour) {
        tables.add(new Htable(JPEGHuffmanTable.StdDCChrominance, true, 1));
    }
    tables.add(new Htable(JPEGHuffmanTable.StdACLuminance, false, 0));
    if (needFour) {
        tables.add(new Htable(JPEGHuffmanTable.StdACChrominance, false, 1));
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:DHTMarkerSegment.java

示例8: Htable

import javax.imageio.plugins.jpeg.JPEGHuffmanTable; //导入依赖的package包/类
Htable(Node node) throws IIOInvalidTreeException {
    if (node.getNodeName().equals("dhtable")) {
        NamedNodeMap attrs = node.getAttributes();
        int count = attrs.getLength();
        if (count != 2) {
            throw new IIOInvalidTreeException
                ("dhtable node must have 2 attributes", node);
        }
        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 {
        throw new IIOInvalidTreeException
            ("Invalid node, expected dqtable", node);
    }

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:DHTMarkerSegment.java

示例9: getNativeNode

import javax.imageio.plugins.jpeg.JPEGHuffmanTable; //导入依赖的package包/类
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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:DHTMarkerSegment.java

示例10: readImage

import javax.imageio.plugins.jpeg.JPEGHuffmanTable; //导入依赖的package包/类
/**
 * Returns <code>true</code> if the read was aborted.
 */
private native boolean readImage(long structPointer,
                                 byte [] buffer,
                                 int numRasterBands,
                                 int [] srcBands,
                                 int [] bandSizes,
                                 int sourceXOffset, int sourceYOffset,
                                 int sourceWidth, int sourceHeight,
                                 int periodX, int periodY,
                                 JPEGQTable [] abbrevQTables,
                                 JPEGHuffmanTable [] abbrevDCHuffmanTables,
                                 JPEGHuffmanTable [] abbrevACHuffmanTables,
                                 int minProgressivePass,
                                 int maxProgressivePass,
                                 boolean wantUpdates);
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:JPEGImageReader.java


注:本文中的javax.imageio.plugins.jpeg.JPEGHuffmanTable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。