CurvResource Class
Summary: 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
Module: aspose.psd.fileformats.psd.layers.layerresources
Full Name: aspose.psd.fileformats.psd.layers.layerresources.CurvResource
Inheritance: AdjustmentLayerResource
Aspose.PSD Version: 24.9.0
Constructors
Name | Description |
---|---|
CurvResource(bytes) | Initializes a new instance of the CurvResource class. |
CurvResource(max_channel_count) | Initializes a new instance of the CurvResource class. |
Properties
Name | Type | Access | Description |
---|---|---|---|
PSB_RESOURCE_SIGNATURE [static] | int | r | The PSB-specific resource signature. |
RESOURCE_SIGNATURE [static] | int | r | The common resource signature. |
TYPE_TOOL_KEY [static] | int | r | The type tool info key. |
is_data_stored_discretely | bool | r/w | Gets or sets a value indicating whether this instance is data stored discrete. |
key | int | r | Gets the layer resource key. |
length | int | r | Gets the layer resource length in bytes. |
psd_version | int | r | Gets the psd version. |
signature | int | r | Gets the signature. |
Methods
Name | Description |
---|---|
get_active_manager() | Gets the active manager. |
get_channel_data(channel_index) | Gets the channel data. |
get_curve_manager() | Gets the curve manager. |
save(stream_container, psd_version) | Saves the resource to the specified stream container. |
Constructor: CurvResource(bytes)
CurvResource(bytes)
Initializes a new instance of the CurvResource class.
Parameters:
Parameter | Type | Description |
---|---|---|
bytes | byte | The bytes. |
Constructor: CurvResource(max_channel_count)
CurvResource(max_channel_count)
Initializes a new instance of the CurvResource class.
Parameters:
Parameter | Type | Description |
---|---|---|
max_channel_count | int | The maximum channel count. |
Method: get_active_manager()
get_active_manager()
Gets the active manager.
Returns
Type | Description |
---|---|
CurvesManager | Active manager |
Method: get_channel_data(channel_index)
get_channel_data(channel_index)
Gets the channel data.
Parameters:
Parameter | Type | Description |
---|---|---|
channel_index | int | Index of the channel. |
Returns
Type | Description |
---|---|
byte | Channel data |
Method: get_curve_manager()
get_curve_manager()
Gets the curve manager.
Returns
Type | Description |
---|---|
CurvesManager | CurvesDiscreteManager or CurvesContinuousManager |
Method: save(stream_container, psd_version)
save(stream_container, psd_version)
Saves the resource to the specified stream container.
Parameters:
Parameter | Type | Description |
---|---|---|
stream_container | StreamContainer | The stream container to save to. |
psd_version | int | The PSD version. |