public class CurvResource extends AdjustmentLayerResource
Class CurvResource. Resource of Curves Adjustment Layer 1 byte - 0 if use curves, 1 if used pixels on map if 0 then: 2 bytes - short. Default is 1 4 bytes - int. Used only last byte by bit. First bit is for 1 channel, the Fourth bit for 4 channel for example 2 bytes - short points count 4 bytes * count of point - points of curve 2 short: first position, second height 4 bytes - word "Crv " 2 bytes - short default is 4 for Curves 4 bytes - int. Default is 1 4 bytes - point count 4 bytes * point count - points of curve 2 short: first position, second height 0-4 bytes - Leading to be fold for four if 1 then: 2 bytes - short. Default is 1 4 bytes - int. Used only last byte. One channel is in one bit. First bit is for 1 channel, the Fourth bit for 4 channel for example 256 * count of changed channels - ordered values of channel in range 0 - 255 4 bytes - word "Crv " 2 bytes - short. Default is 3 for pixels on map 4 bytes - int Channel count (2 + 256) bytes - short 2 for channel index, 256 is ordered values of channel in range 0 - 255
AdjustmentLayerResource
,
LayerResource
Modifier and Type | Field and Description |
---|---|
static int |
TypeToolKey
The type tool info key.
|
PsbResourceSignature, ResourceSignature
Constructor and Description |
---|
CurvResource(byte[] bytes)
Initializes a new instance of the
CurvResource class. |
CurvResource(int maxChannelCount)
Initializes a new instance of the
CurvResource class. |
Modifier and Type | Method and Description |
---|---|
CurvesManager |
getActiveManager()
Gets the active manager.
|
byte[] |
getChannelData(int channelIndex)
Gets the channel data.
|
CurvesManager |
getCurveManager()
Gets the curve manager.
|
int |
getKey()
Gets the layer resource key.
|
int |
getLength()
Gets the layer resource length in bytes.
|
int |
getPsdVersion()
Gets the psd version.
|
boolean |
isDataStoredDiscretely()
Gets or sets a value indicating whether this instance is data stored discrete.
|
void |
save(StreamContainer streamContainer,
int psdVersion)
Saves the resource to the specified stream container.
|
void |
setDataStoredDiscretely(boolean value)
Gets or sets a value indicating whether this instance is data stored discrete.
|
getData, getSignature
toString
public static final int TypeToolKey
The type tool info key.
public CurvResource(int maxChannelCount)
Initializes a new instance of the CurvResource
class.
maxChannelCount
- The maximum channel count.public CurvResource(byte[] bytes)
Initializes a new instance of the CurvResource
class.
bytes
- The bytes.public int getKey()
Gets the layer resource key.
getKey
in class LayerResource
public int getLength()
Gets the layer resource length in bytes.
getLength
in class LayerResource
public int getPsdVersion()
Gets the psd version.
getPsdVersion
in class LayerResource
public final boolean isDataStoredDiscretely()
Gets or sets a value indicating whether this instance is data stored discrete.
Value:true
if this instance is data stored discrete; otherwise, false
.public final void setDataStoredDiscretely(boolean value)
Gets or sets a value indicating whether this instance is data stored discrete.
Value:true
if this instance is data stored discrete; otherwise, false
.public final byte[] getChannelData(int channelIndex)
Gets the channel data.
channelIndex
- Index of the channel.public final CurvesManager getActiveManager()
Gets the active manager.
public void save(StreamContainer streamContainer, int psdVersion)
Saves the resource to the specified stream container.
save
in class AdjustmentLayerResource
streamContainer
- The stream container to save to.psdVersion
- The PSD version.public final CurvesManager getCurveManager()
Gets the curve manager.
CurvesDiscreteManager
or CurvesContinuousManager