|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrebuild.graphics.tiff.Tag
rebuild.graphics.tiff.tags.ShortTag
rebuild.graphics.tiff.tags.BitsPerSampleTag
public final class BitsPerSampleTag
The number of bits per component in the image.
Field Summary |
---|
Fields inherited from class rebuild.graphics.tiff.Tag |
---|
count, data, dataType, value |
Constructor Summary | |
---|---|
BitsPerSampleTag()
Create a new BitsPerSample tag. |
|
BitsPerSampleTag(int numberOfSamples)
Create a new BitsPerSample tag. |
|
BitsPerSampleTag(int numberOfSamples,
short value)
Create a new BitsPerSample tag. |
|
BitsPerSampleTag(short[] samples)
Create a new BitsPerSample tag. |
Method Summary | |
---|---|
short |
getSample(int index)
Get the sample value at the specified index. |
static short |
getTagTypeValue()
Get the Tag 's type. |
boolean |
hasDefault()
Get if this Tag can have a default value, often defined by a parameter-less constructor. |
boolean |
isDefault()
Get if this Tag 's current value is the default value. |
void |
setCount(int numberOfSamples)
Set the number of samples that the BitsPerSample tag has. |
void |
setSample(int index,
short value)
Set the sample value at the specified index. |
void |
setValue(int bitCount)
Set the bit count for all the samples. |
Methods inherited from class rebuild.graphics.tiff.tags.ShortTag |
---|
extraData, getShort, 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 |
Constructor Detail |
---|
public BitsPerSampleTag()
public BitsPerSampleTag(int numberOfSamples)
numberOfSamples
- The number of samples that the image has. Each sample will be set to 8 for 8 bits per sample.public BitsPerSampleTag(int numberOfSamples, short value)
numberOfSamples
- The number of samples that the image has.value
- The value of all the samples. If this is less than 1 bit it could make the image unreaable or cause errors.public BitsPerSampleTag(short[] samples)
samples
- The value of each sample.Method Detail |
---|
public static short getTagTypeValue()
Tag
's type.
Tag
's type.public void setValue(int bitCount)
setValue
in class Tag
bitCount
- The number of bits in each sample.getValue
public void setSample(int index, short value)
index
- The index of the sample.value
- The value to set at the specified index.public short getSample(int index)
index
- The index of the sample.
public void setCount(int numberOfSamples)
setCount
in class ShortTag
numberOfSamples
- The number of samples; Usually 1 for bilevel, grayscale, and palette-color images, 3 for RGB. The value is based off of SamplesPerPixel.getCount
public boolean hasDefault()
Tag
can have a default value, often defined by a parameter-less constructor.
hasDefault
in class ShortTag
true
if the Tag
has a default value, false
if otherwise. Default is false
.public boolean isDefault()
Tag
's current value is the default value. This is ignored if Tag#hasDefault()
returns false
.
isDefault
in class ShortTag
true
if the Tag
's value is the default value, false
if otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |