Fields Summary |
---|
public static final int | TEMFor temporary use in arithmetic coding |
public static final int | SOF0Baseline DCT |
public static final int | SOF1Extended Sequential DCT |
public static final int | SOF2Progressive DCT |
public static final int | SOF3Lossless Sequential |
public static final int | DHTDefine Huffman Tables |
public static final int | SOF5Differential Sequential DCT |
public static final int | SOF6Differential Progressive DCT |
public static final int | SOF7Differential Lossless |
public static final int | JPGReserved for JPEG extensions |
public static final int | SOF9Extended Sequential DCT, Arithmetic coding |
public static final int | SOF10Progressive DCT, Arithmetic coding |
public static final int | SOF11Lossless Sequential, Arithmetic coding |
public static final int | DACDefine Arithmetic conditioning tables |
public static final int | SOF13Differential Sequential DCT, Arithmetic coding |
public static final int | SOF14Differential Progressive DCT, Arithmetic coding |
public static final int | SOF15Differential Lossless, Arithmetic coding |
public static final int | RST0 |
public static final int | RST1 |
public static final int | RST2 |
public static final int | RST3 |
public static final int | RST4 |
public static final int | RST5 |
public static final int | RST6 |
public static final int | RST7 |
public static final int | RESTART_RANGENumber of restart markers |
public static final int | SOIStart of Image |
public static final int | EOIEnd of Image |
public static final int | SOSStart of Scan |
public static final int | DQTDefine Quantisation Tables |
public static final int | DNLDefine Number of lines |
public static final int | DRIDefine Restart Interval |
public static final int | DHPDefine Heirarchical progression |
public static final int | EXPExpand reference image(s) |
public static final int | APP0APP0 used by JFIF |
public static final int | APP1 |
public static final int | APP2 |
public static final int | APP3 |
public static final int | APP4 |
public static final int | APP5 |
public static final int | APP6 |
public static final int | APP7 |
public static final int | APP8 |
public static final int | APP9 |
public static final int | APP10 |
public static final int | APP11 |
public static final int | APP12 |
public static final int | APP13 |
public static final int | APP14APP14 used by Adobe |
public static final int | APP15 |
public static final int | COMComment marker |
public static final int | DENSITY_UNIT_ASPECT_RATIOThe X and Y units simply indicate the aspect ratio of the pixels. |
public static final int | DENSITY_UNIT_DOTS_INCHPixel density is in pixels per inch. |
public static final int | DENSITY_UNIT_DOTS_CMPixel density is in pixels per centemeter. |
public static final int | NUM_DENSITY_UNITThe max known value for DENSITY_UNIT |
public static final int | ADOBE_IMPOSSIBLE |
public static final int | ADOBE_UNKNOWN |
public static final int | ADOBE_YCC |
public static final int | ADOBE_YCCK |
public static final String | vendor |
public static final String | version |
public static final String[] | names |
public static final String[] | suffixes |
public static final String[] | MIMETypes |
public static final String | nativeImageMetadataFormatName |
public static final String | nativeImageMetadataFormatClassName |
public static final String | nativeStreamMetadataFormatName |
public static final String | nativeStreamMetadataFormatClassName |
public static final int | JCS_UNKNOWN |
public static final int | JCS_GRAYSCALE |
public static final int | JCS_RGB |
public static final int | JCS_YCbCr |
public static final int | JCS_CMYK |
public static final int | JCS_YCC |
public static final int | JCS_RGBA |
public static final int | JCS_YCbCrA |
public static final int | JCS_YCCA |
public static final int | JCS_YCCK |
public static final int | NUM_JCS_CODES |
public static final int[] | bandOffsetsIJG can handle up to 4-channel JPEGs |
public static final int[] | bOffsRGB |
protected static final ColorSpace | sRGB |
protected static ColorSpace | YCC |
public static final float | DEFAULT_QUALITY |
Methods Summary |
---|
static float | convertToLinearQuality(float quality)Converts an ImageWriteParam (i.e. IJG) non-linear quality value
to a float suitable for passing to JPEGQTable.getScaledInstance().
// The following is converted from the IJG code.
if (quality <= 0.0F) {
quality = 0.01F;
}
if (quality > 1.00F) {
quality = 1.00F;
}
if (quality < 0.5F) {
quality = 0.5F / quality;
} else {
quality = 2.0F - (quality * 2.0F);
}
return quality;
|
static javax.imageio.plugins.jpeg.JPEGHuffmanTable[] | getDefaultHuffmanTables(boolean wantDC)Return an array of default Huffman tables.
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;
|
static javax.imageio.plugins.jpeg.JPEGQTable[] | getDefaultQTables()Return an array of default, visually lossless quantization tables.
JPEGQTable [] qTables = new JPEGQTable[2];
qTables[0] = JPEGQTable.K1Div2Luminance;
qTables[1] = JPEGQTable.K2Div2Chrominance;
return qTables;
|
static boolean | isJFIFcompliant(javax.imageio.ImageTypeSpecifier imageType, boolean input)Returns true if the given imageType can be used
in a JFIF file. If input is true, then the
image type is considered before colorspace conversion.
ColorModel cm = imageType.getColorModel();
// Can't have alpha
if (cm.hasAlpha()) {
return false;
}
// Gray is OK, always
int numComponents = imageType.getNumComponents();
if (numComponents == 1) {
return true;
}
// If it isn't gray, it must have 3 channels
if (numComponents != 3) {
return false;
}
if (input) {
// Must be RGB
if (cm.getColorSpace().getType() == ColorSpace.TYPE_RGB) {
return true;
}
} else {
// Must be YCbCr
if (cm.getColorSpace().getType() == ColorSpace.TYPE_YCbCr) {
return true;
}
}
return false;
|
static boolean | isNonStandardICC(java.awt.color.ColorSpace cs)Returns true if the given ColorSpace
object is an instance of ICC_ColorSpace but is not one of the
standard ColorSpaces returned by
ColorSpace.getInstance() .
boolean retval = false;
if ((cs instanceof ICC_ColorSpace)
&& (!cs.isCS_sRGB())
&& (!cs.equals(ColorSpace.getInstance(ColorSpace.CS_CIEXYZ)))
&& (!cs.equals(ColorSpace.getInstance(ColorSpace.CS_GRAY)))
&& (!cs.equals(ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB)))
&& (!cs.equals(ColorSpace.getInstance(ColorSpace.CS_PYCC)))
) {
retval = true;
}
return retval;
|
static int | transformForType(javax.imageio.ImageTypeSpecifier imageType, boolean input)Given an image type, return the Adobe transform corresponding to
that type, or ADOBE_IMPOSSIBLE if the image type is incompatible
with an Adobe marker segment. If input is true, then
the image type is considered before colorspace conversion.
int retval = ADOBE_IMPOSSIBLE;
ColorModel cm = imageType.getColorModel();
switch (cm.getColorSpace().getType()) {
case ColorSpace.TYPE_GRAY:
retval = ADOBE_UNKNOWN;
break;
case ColorSpace.TYPE_RGB:
retval = input ? ADOBE_YCC : ADOBE_UNKNOWN;
break;
case ColorSpace.TYPE_YCbCr:
retval = ADOBE_YCC;
break;
case ColorSpace.TYPE_CMYK:
retval = input ? ADOBE_YCCK : ADOBE_IMPOSSIBLE;
}
return retval;
|