< prev index next >
src/java.desktop/share/classes/javax/imageio/plugins/jpeg/JPEGQTable.java
Print this page
*** 135,147 ****
/**
* Constructs a quantization table from the argument, which must
* contain 64 elements in natural order (not zig-zag order).
* A copy is made of the input array.
! * @param table the quantization table, as an <code>int</code> array.
! * @throws IllegalArgumentException if <code>table</code> is
! * <code>null</code> or <code>table.length</code> is not equal to 64.
*/
public JPEGQTable(int[] table) {
if (table == null) {
throw new IllegalArgumentException("table must not be null.");
}
--- 135,147 ----
/**
* Constructs a quantization table from the argument, which must
* contain 64 elements in natural order (not zig-zag order).
* A copy is made of the input array.
! * @param table the quantization table, as an {@code int} array.
! * @throws IllegalArgumentException if {@code table} is
! * {@code null} or {@code table.length} is not equal to 64.
*/
public JPEGQTable(int[] table) {
if (table == null) {
throw new IllegalArgumentException("table must not be null.");
}
*** 160,177 ****
return Arrays.copyOf(qTable, qTable.length);
}
/**
* Returns a new quantization table where the values are multiplied
! * by <code>scaleFactor</code> and then clamped to the range 1..32767
! * (or to 1..255 if <code>forceBaseline</code> is true).
* <p>
! * Values of <code>scaleFactor</code> less than 1 tend to improve
* the quality level of the table, and values greater than 1.0
* degrade the quality level of the table.
* @param scaleFactor multiplication factor for the table.
! * @param forceBaseline if <code>true</code>,
* the values will be clamped to the range 1..255
* @return a new quantization table that is a linear multiple
* of the current table.
*/
public JPEGQTable getScaledInstance(float scaleFactor,
--- 160,177 ----
return Arrays.copyOf(qTable, qTable.length);
}
/**
* Returns a new quantization table where the values are multiplied
! * by {@code scaleFactor} and then clamped to the range 1..32767
! * (or to 1..255 if {@code forceBaseline} is true).
* <p>
! * Values of {@code scaleFactor} less than 1 tend to improve
* the quality level of the table, and values greater than 1.0
* degrade the quality level of the table.
* @param scaleFactor multiplication factor for the table.
! * @param forceBaseline if {@code true},
* the values will be clamped to the range 1..255
* @return a new quantization table that is a linear multiple
* of the current table.
*/
public JPEGQTable getScaledInstance(float scaleFactor,
< prev index next >