Examples of JPEGQTable


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

        JPEGQTable [] retval = null;
        if (tables.size() != 0) {
            retval = new JPEGQTable[tables.size()];
            for (int i = 0; i < retval.length; i++) {
                retval[i] =
                    new JPEGQTable(((DQTMarkerSegment.Qtable)tables.get(i)).data);
            }
        }
        return retval;
    }
View Full Code Here

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

            // a comparable scaling of chrominance frequency response of the
            // eye.
            float scaleFactor = ((float)(luma.data[largestPos]))
                / ((float)(JPEGQTable.K1Div2Luminance.getTable()[largestPos]));
            //    generate a new table
            JPEGQTable jpegTable =
                JPEGQTable.K2Div2Chrominance.getScaledInstance(scaleFactor,
                                                               true);
            newGuy = new Qtable(jpegTable, 1);
        }
        return newGuy;
View Full Code Here

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

            35, 36, 48, 49, 57, 58, 62, 63
        };

        Qtable(boolean wantLuma, float quality) {
            elementPrecision = 0;
            JPEGQTable base = null;
            if (wantLuma) {
                tableID = 0;
                base = JPEGQTable.K1Div2Luminance;
            } else {
                tableID = 1;
                base = JPEGQTable.K2Div2Chrominance;
            }
            if (quality != JPEG.DEFAULT_QUALITY) {
                quality = JPEG.convertToLinearQuality(quality);
                if (wantLuma) {
                    base = JPEGQTable.K1Luminance.getScaledInstance
                        (quality, true);
                } else {
                    base = JPEGQTable.K2Div2Chrominance.getScaledInstance
                        (quality, true);
                }
            }
            data = base.getTable();
        }
View Full Code Here

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

                }
                elementPrecision = 0;
                tableID = getAttributeValue(node, attrs, "qtableId", 0, 3, true);
                if (node instanceof IIOMetadataNode) {
                    IIOMetadataNode ourNode = (IIOMetadataNode) node;
                    JPEGQTable table = (JPEGQTable) ourNode.getUserObject();
                    if (table == null) {
                        throw new IIOInvalidTreeException
                            ("dqtable node must have user object", node);
                    }
                    data = table.getTable();
                } else {
                    throw new IIOInvalidTreeException
                        ("dqtable node must have user object", node);
                }
            } else {
View Full Code Here

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

            IIOMetadataNode node = new IIOMetadataNode("dqtable");
            node.setAttribute("elementPrecision",
                              Integer.toString(elementPrecision));
            node.setAttribute("qtableId",
                              Integer.toString(tableID));
            node.setUserObject(new JPEGQTable(data));
            return node;
        }
View Full Code Here

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

        void print() {
            System.out.println("Table id: " + Integer.toString(tableID));
            System.out.println("Element precision: "
                               + Integer.toString(elementPrecision));

            (new JPEGQTable(data)).toString();
            /*
              for (int i = 0; i < 64; i++) {
              if (i % 8 == 0) {
              System.out.println();
              }
View Full Code Here

Examples of com.google.code.appengine.imageio.plugins.jpeg.JPEGQTable

            if (rounded > maxValue) {
                rounded = maxValue;
            }
            table[i] = rounded;
        }
        return new JPEGQTable(table);
    }
View Full Code Here

Examples of com.sun.image.codec.jpeg.JPEGQTable

            //
            if (jaiEP.isQTableSet(i)) {
                qTab = jaiEP.getQTable(i);
                val = jaiEP.getQTableSlot(i);
                j2dEP.setQTableComponentMapping(i, val);
                j2dEP.setQTable(val, new JPEGQTable(qTab));
            }
        }

        // Apply new quality, if set
        if (jaiEP.isQualitySet()) {
View Full Code Here

Examples of com.sun.image.codec.jpeg.JPEGQTable

  // if the quality is not set, extract the quantization tables from
  // the stream; otherwise, define them with the default values.
  if (!paramList.getBooleanParameter("qualitySet"))
      for (int i = 0; i < 4; i++) {
    JPEGQTable table = jdp.getQTable(i);
    paramList.setParameter("quantizationTable"+i,
        (table == null) ? null : table.getTable());
      }
  else {
      ParameterListDescriptor pld
    = paramList.getParameterListDescriptor();
      for (int i = 0; i < 4; i++) {
View Full Code Here

Examples of com.sun.image.codec.jpeg.JPEGQTable

            int[] qTab
                 = (int[]) paramList.getObjectParameter("quantizationTable"+i) ;
      if(qTab != null &&
         qTab.equals(ParameterListDescriptor.NO_PARAMETER_DEFAULT)){
    j2dJP.setQTableComponentMapping(i, qTabSlot[i]) ;
    j2dJP.setQTable(qTabSlot[i], new JPEGQTable(qTab)) ;
      }
        }

        if(paramList.getBooleanParameter("qualitySet")) {
            float quality = paramList.getFloatParameter("quality") ;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.