APIdia Launch Partner
Top Fields Constructors Methods
com.sun.imageio.plugins.tiff

public Class TIFFYCbCrDecompressor

extends TIFFDecompressor
Class Inheritance
Imports
java.awt.image.BufferedImage, .ColorModel, java.io.ByteArrayInputStream, .EOFException, .IOException, javax.imageio.ImageReader, javax.imageio.metadata.IIOMetadata, javax.imageio.stream.MemoryCacheImageInputStream, .ImageInputStream, javax.imageio.plugins.tiff.BaselineTIFFTagSet, .TIFFField

Field Summary

Modifier and TypeField and Description
private int
private int
private float
private boolean
private TIFFDecompressor
private static final int
private static final float
private int[]
private int[]
private int[]
private int[]
private int[]
private int[]
private float
private float
private float
private float
private float
private float
private float
private float
private float
private BufferedImage
Inherited from com.sun.imageio.plugins.tiff.TIFFDecompressor:
activeSrcHeightactiveSrcMinXactiveSrcMinYactiveSrcWidthbitsPerSamplebyteCountcolorConvertercolorMapcompressiondestinationBandsdstHeightdstMinXdstMinYdstWidthdstXOffsetdstYOffsetextraSamplesimagemetadataoffsetphotometricInterpretationplanarplanarBandrawImagereadersampleFormatsamplesPerPixelsourceBandssourceXOffsetsourceYOffsetsrcHeightsrcMinXsrcMinYsrcWidthstreamsubsampleXsubsampleY

Constructor Summary

AccessConstructor and Description
public
TIFFYCbCrDecompressor(TIFFDecompressor decompressor, boolean colorConvert)

Method Summary

Modifier and TypeMethod and Description
public void
beginDecoding()

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.beginDecoding.

This routine is called prior to a sequence of calls to the decode method, in order to allow any necessary tables or other structures to be initialized based on metadata values.

private byte
clamp(int f)

public void
decodeRaw(byte[] buf, int dstOffset, int bitsPerPixel, int scanlineStride)

Implements abstract com.sun.imageio.plugins.tiff.TIFFDecompressor.decodeRaw.

Decodes the source data into the provided byte array b, starting at the offset given by dstOffset.

public void
setActiveSrcHeight(int activeSrcHeight)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setActiveSrcHeight.

Sets the value of the activeSrcHeight field.

public void
setActiveSrcMinX(int activeSrcMinX)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setActiveSrcMinX.

Sets the value of the activeSrcMinX field.

public void
setActiveSrcMinY(int activeSrcMinY)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setActiveSrcMinY.

Sets the value of the activeSrcMinY field.

public void
setActiveSrcWidth(int activeSrcWidth)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setActiveSrcWidth.

Sets the value of the activeSrcWidth field.

public void
setBitsPerSample(int[] bitsPerSample)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setBitsPerSample.

Sets the value of the bitsPerSample field.

public void
setByteCount(int byteCount)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setByteCount.

Sets the value of the byteCount field.

public void
setColorMap(char[] colorMap)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setColorMap.

Sets the value of the colorMap field.

public void
setCompression(int compression)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setCompression.

Sets the value of the compression field.

public void
setDestinationBands(int[] destinationBands)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDestinationBands.

Sets the value of the destinationBands field.

public void
setDstHeight(int dstHeight)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstHeight.

Sets the value of the dstHeight field.

public void
setDstMinX(int dstMinX)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstMinX.

Sets the value of the dstMinX field.

public void
setDstMinY(int dstMinY)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstMinY.

Sets the value of the dstMinY field.

public void
setDstWidth(int dstWidth)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstWidth.

Sets the value of the dstWidth field.

public void
setDstXOffset(int dstXOffset)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstXOffset.

Sets the value of the dstXOffset field.

public void
setDstYOffset(int dstYOffset)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstYOffset.

Sets the value of the dstYOffset field.

public void
setExtraSamples(int[] extraSamples)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setExtraSamples.

Sets the value of the extraSamples field.

public void
setImage(BufferedImage image)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setImage.

Sets the value of the image field.

public void
setMetadata(IIOMetadata metadata)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setMetadata.

Sets the value of the metadata field.

public void
setOffset(long offset)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setOffset.

Sets the value of the offset field.

public void
setPhotometricInterpretation(int photometricInterpretation)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setPhotometricInterpretation.

Sets the value of the photometricInterpretation field.

public void
setPlanar(boolean planar)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setPlanar.

Sets the value of the planar field.

public void
setReader(ImageReader reader)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setReader.

Sets the value of the reader field.

public void
setSampleFormat(int[] sampleFormat)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSampleFormat.

Sets the value of the sampleFormat field.

public void
setSamplesPerPixel(int samplesPerPixel)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSamplesPerPixel.

Sets the value of the samplesPerPixel field.

public void
setSourceBands(int[] sourceBands)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSourceBands.

Sets the value of the sourceBands field.

public void
setSourceXOffset(int sourceXOffset)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSourceXOffset.

Sets the value of the sourceXOffset field.

public void
setSourceYOffset(int sourceYOffset)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSourceYOffset.

Sets the value of the sourceYOffset.

public void
setSrcHeight(int srcHeight)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSrcHeight.

Sets the value of the srcHeight field.

public void
setSrcMinX(int srcMinX)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSrcMinX.

Sets the value of the srcMinX field.

public void
setSrcMinY(int srcMinY)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSrcMinY.

Sets the value of the srcMinY field.

public void
setSrcWidth(int srcWidth)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSrcWidth.

Sets the value of the srcWidth field.

public void
setStream(ImageInputStream stream)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setStream.

Sets the value of the stream field.

private void
warning(String message)

Inherited from com.sun.imageio.plugins.tiff.TIFFDecompressor:
createComponentCMcreateInterleavedSMcreateRawImagedecodedecodeRawdecodeRawdecodeRawdecodeRawgetRawImageTypegetRawImageTypeSpecifiersetColorConvertersetPlanarBandsetSubsampleXsetSubsampleY

Field Detail

chromaSubsampleHback to summary
private int chromaSubsampleH
chromaSubsampleVback to summary
private int chromaSubsampleV
codingRangeYback to summary
private float codingRangeY
colorConvertback to summary
private boolean colorConvert
decompressorback to summary
private TIFFDecompressor decompressor
FRAC_BITSback to summary
private static final int FRAC_BITS
FRAC_SCALEback to summary
private static final float FRAC_SCALE
iCbTabback to summary
private int[] iCbTab
iCrTabback to summary
private int[] iCrTab
iGCbTabback to summary
private int[] iGCbTab
iGCrTabback to summary
private int[] iGCrTab
iGYTabback to summary
private int[] iGYTab
iYTabback to summary
private int[] iYTab
lumaBlueback to summary
private float lumaBlue
lumaGreenback to summary
private float lumaGreen
lumaRedback to summary
private float lumaRed
referenceBlackCbback to summary
private float referenceBlackCb
referenceBlackCrback to summary
private float referenceBlackCr
referenceBlackYback to summary
private float referenceBlackY
referenceWhiteCbback to summary
private float referenceWhiteCb
referenceWhiteCrback to summary
private float referenceWhiteCr
referenceWhiteYback to summary
private float referenceWhiteY
tmpImageback to summary
private BufferedImage tmpImage

Constructor Detail

TIFFYCbCrDecompressorback to summary
public TIFFYCbCrDecompressor(TIFFDecompressor decompressor, boolean colorConvert)

Method Detail

beginDecodingback to summary
public void beginDecoding()

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.beginDecoding.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.beginDecoding.

This routine is called prior to a sequence of calls to the decode method, in order to allow any necessary tables or other structures to be initialized based on metadata values. This routine is guaranteed to be called any time the metadata values have changed.

The default implementation computes tables used by the decode method to rescale components to different bit depths. Thus, if this method is overridden, it is important for the subclass method to call super(), unless it overrides decode as well.

Annotations
@Override
clampback to summary
private byte clamp(int f)
decodeRawback to summary
public void decodeRaw(byte[] buf, int dstOffset, int bitsPerPixel, int scanlineStride) throws IOException

Implements abstract com.sun.imageio.plugins.tiff.TIFFDecompressor.decodeRaw.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.decodeRaw.

Decodes the source data into the provided byte array b, starting at the offset given by dstOffset. Each pixel occupies bitsPerPixel bits, with no padding between pixels. Scanlines are separated by scanlineStride bytes.

Annotations
@Override
Exceptions
IOException:
if an error occurs reading from the source ImageInputStream.
setActiveSrcHeightback to summary
public void setActiveSrcHeight(int activeSrcHeight)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setActiveSrcHeight.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setActiveSrcHeight.

Sets the value of the activeSrcHeight field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setActiveSrcMinXback to summary
public void setActiveSrcMinX(int activeSrcMinX)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setActiveSrcMinX.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setActiveSrcMinX.

Sets the value of the activeSrcMinX field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setActiveSrcMinYback to summary
public void setActiveSrcMinY(int activeSrcMinY)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setActiveSrcMinY.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setActiveSrcMinY.

Sets the value of the activeSrcMinY field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setActiveSrcWidthback to summary
public void setActiveSrcWidth(int activeSrcWidth)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setActiveSrcWidth.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setActiveSrcWidth.

Sets the value of the activeSrcWidth field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setBitsPerSampleback to summary
public void setBitsPerSample(int[] bitsPerSample)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setBitsPerSample.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setBitsPerSample.

Sets the value of the bitsPerSample field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setByteCountback to summary
public void setByteCount(int byteCount) throws IOException

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setByteCount.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setByteCount.

Sets the value of the byteCount field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setColorMapback to summary
public void setColorMap(char[] colorMap)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setColorMap.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setColorMap.

Sets the value of the colorMap field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setCompressionback to summary
public void setCompression(int compression)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setCompression.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setCompression.

Sets the value of the compression field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setDestinationBandsback to summary
public void setDestinationBands(int[] destinationBands)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDestinationBands.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setDestinationBands.

Sets the value of the destinationBands field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setDstHeightback to summary
public void setDstHeight(int dstHeight)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstHeight.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstHeight.

Sets the value of the dstHeight field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setDstMinXback to summary
public void setDstMinX(int dstMinX)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstMinX.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstMinX.

Sets the value of the dstMinX field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setDstMinYback to summary
public void setDstMinY(int dstMinY)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstMinY.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstMinY.

Sets the value of the dstMinY field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setDstWidthback to summary
public void setDstWidth(int dstWidth)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstWidth.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstWidth.

Sets the value of the dstWidth field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setDstXOffsetback to summary
public void setDstXOffset(int dstXOffset)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstXOffset.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstXOffset.

Sets the value of the dstXOffset field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setDstYOffsetback to summary
public void setDstYOffset(int dstYOffset)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstYOffset.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setDstYOffset.

Sets the value of the dstYOffset field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setExtraSamplesback to summary
public void setExtraSamples(int[] extraSamples)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setExtraSamples.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setExtraSamples.

Sets the value of the extraSamples field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setImageback to summary
public void setImage(BufferedImage image)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setImage.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setImage.

Sets the value of the image field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setMetadataback to summary
public void setMetadata(IIOMetadata metadata)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setMetadata.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setMetadata.

Sets the value of the metadata field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setOffsetback to summary
public void setOffset(long offset)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setOffset.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setOffset.

Sets the value of the offset field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setPhotometricInterpretationback to summary
public void setPhotometricInterpretation(int photometricInterpretation)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setPhotometricInterpretation.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setPhotometricInterpretation.

Sets the value of the photometricInterpretation field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setPlanarback to summary
public void setPlanar(boolean planar)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setPlanar.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setPlanar.

Sets the value of the planar field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setReaderback to summary
public void setReader(ImageReader reader)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setReader.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setReader.

Sets the value of the reader field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setSampleFormatback to summary
public void setSampleFormat(int[] sampleFormat)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSampleFormat.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setSampleFormat.

Sets the value of the sampleFormat field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setSamplesPerPixelback to summary
public void setSamplesPerPixel(int samplesPerPixel)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSamplesPerPixel.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setSamplesPerPixel.

Sets the value of the samplesPerPixel field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setSourceBandsback to summary
public void setSourceBands(int[] sourceBands)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSourceBands.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setSourceBands.

Sets the value of the sourceBands field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setSourceXOffsetback to summary
public void setSourceXOffset(int sourceXOffset)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSourceXOffset.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setSourceXOffset.

Sets the value of the sourceXOffset field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setSourceYOffsetback to summary
public void setSourceYOffset(int sourceYOffset)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSourceYOffset.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setSourceYOffset.

Sets the value of the sourceYOffset.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setSrcHeightback to summary
public void setSrcHeight(int srcHeight)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSrcHeight.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setSrcHeight.

Sets the value of the srcHeight field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setSrcMinXback to summary
public void setSrcMinX(int srcMinX)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSrcMinX.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setSrcMinX.

Sets the value of the srcMinX field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setSrcMinYback to summary
public void setSrcMinY(int srcMinY)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSrcMinY.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setSrcMinY.

Sets the value of the srcMinY field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setSrcWidthback to summary
public void setSrcWidth(int srcWidth)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setSrcWidth.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setSrcWidth.

Sets the value of the srcWidth field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
setStreamback to summary
public void setStream(ImageInputStream stream)

Overrides com.sun.imageio.plugins.tiff.TIFFDecompressor.setStream.

Doc from com.sun.imageio.plugins.tiff.TIFFDecompressor.setStream.

Sets the value of the stream field.

If this method is called, the beginDecoding method must be called prior to calling any of the decode methods.

Annotations
@Override
warningback to summary
private void warning(String message)