rebuild.graphics.tiff.tags
Class ExtraSamplesTag

java.lang.Object
  extended by rebuild.graphics.tiff.Tag
      extended by rebuild.graphics.tiff.tags.ShortTag
          extended by rebuild.graphics.tiff.tags.ExtraSamplesTag

public final class ExtraSamplesTag
extends ShortTag

Description of extra components.

Since:
BBX 1.0.1

Field Summary
static short ASSOCALPHA
          Associated alpha data (with pre-multiplied color)
static short UNASSALPHA
          Unassociated alpha data
static short UNSPECIFIED
          Unspecified data
 
Fields inherited from class rebuild.graphics.tiff.Tag
count, data, dataType, value
 
Constructor Summary
ExtraSamplesTag(short sample)
          Create a new ExtraSamples tag.
ExtraSamplesTag(short[] samples)
          Create a new ExtraSamples tag.
 
Method Summary
 void addSample(short sample)
          Add a sample to the ExtraSamplesTag.
 short getSample(int index)
          Get a sample at the specified index.
static short getTagTypeValue()
          Get the Tag's type.
 void removeSample(int index)
          Remove a sample at the specified index.
 void setCount(int count)
          Count determined can be changed with addSample/removeSample.
 void setSample(int index, short sample)
          Set a sample at the specified index.
 void setValue(int sample)
          Set the first sample value in the ExtraSamples tag.
 
Methods inherited from class rebuild.graphics.tiff.tags.ShortTag
extraData, getShort, hasDefault, isDefault, setDataType, setExtraData, setShort, setupForBigTIFF, writeData
 
Methods inherited from class rebuild.graphics.tiff.Tag
equals, getBigCount, getBigValue, getCount, getDataType, getExtraData, getIfExtraDataExists, getTagType, getValue, hashCode, setCount, setValue, toString, write, write, write, write, writeBig
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNSPECIFIED

public static final short UNSPECIFIED
Unspecified data

See Also:
Constant Field Values

ASSOCALPHA

public static final short ASSOCALPHA
Associated alpha data (with pre-multiplied color)

See Also:
Constant Field Values

UNASSALPHA

public static final short UNASSALPHA
Unassociated alpha data

See Also:
Constant Field Values
Constructor Detail

ExtraSamplesTag

public ExtraSamplesTag(short sample)
Create a new ExtraSamples tag.

Parameters:
samples - A single extra sample, what type of sample it represents.

ExtraSamplesTag

public ExtraSamplesTag(short[] samples)
Create a new ExtraSamples tag.

Parameters:
samples - Multiple extra samples, what type of samples it represents.
Method Detail

getTagTypeValue

public static short getTagTypeValue()
Get the Tag's type.

Returns:
The Tag's type.

setCount

public void setCount(int count)
Count determined can be changed with addSample/removeSample.

Overrides:
setCount in class ShortTag
Parameters:
count - The number of Writer.SHORT contained in the tag. If the number is bigger than the current count then it will add 0 Writer.SHORT, else it will remove the Writer.SHORT.
See Also:
setCount

setValue

public void setValue(int sample)
Set the first sample value in the ExtraSamples tag.

Overrides:
setValue in class Tag
Parameters:
sample - The value to set the sample to.
See Also:
getValue

addSample

public void addSample(short sample)
Add a sample to the ExtraSamplesTag.

Parameters:
sample - The sample type to add.

removeSample

public void removeSample(int index)
Remove a sample at the specified index.

Parameters:
index - The index to remove.

getSample

public short getSample(int index)
Get a sample at the specified index.

Parameters:
index - The index to get the sample.
Returns:
The sample at that index.

setSample

public void setSample(int index,
                      short sample)
Set a sample at the specified index.

Parameters:
index - The index to set the sample.
sample - The extra sample to add.