com.drew.metadata.jpeg
Class JpegComponent

java.lang.Object
  extended by com.drew.metadata.jpeg.JpegComponent
All Implemented Interfaces:
Serializable

public class JpegComponent
extends Object
implements Serializable

Stores information about a Jpeg image component such as the component id, horiz/vert sampling factor and quantization table number.

See Also:
Serialized Form

Field Summary
private  int _componentId
           
private  int _quantizationTableNumber
           
private  int _samplingFactorByte
           
 
Constructor Summary
JpegComponent(int componentId, int samplingFactorByte, int quantizationTableNumber)
           
 
Method Summary
 int getComponentId()
           
 String getComponentName()
          Returns the component name (one of: Y, Cb, Cr, I, or Q)
 int getHorizontalSamplingFactor()
           
 int getQuantizationTableNumber()
           
 int getVerticalSamplingFactor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_componentId

private final int _componentId

_samplingFactorByte

private final int _samplingFactorByte

_quantizationTableNumber

private final int _quantizationTableNumber
Constructor Detail

JpegComponent

public JpegComponent(int componentId,
                     int samplingFactorByte,
                     int quantizationTableNumber)
Method Detail

getComponentId

public int getComponentId()

getComponentName

public String getComponentName()
                        throws MetadataException
Returns the component name (one of: Y, Cb, Cr, I, or Q)

Returns:
the component name
Throws:
MetadataException - if the component id is not known

getQuantizationTableNumber

public int getQuantizationTableNumber()

getHorizontalSamplingFactor

public int getHorizontalSamplingFactor()

getVerticalSamplingFactor

public int getVerticalSamplingFactor()