Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions libpsd-0.9/include/libpsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ typedef enum {
psd_layer_info_type_gradient_map, // Key is 'grdm'.
psd_layer_info_type_photo_filter, // Key is 'phfl'.
psd_layer_info_type_type_tool, // 'tySh'. Type Tool Info (Photoshop 5.0 and 5.5 only)
psd_layer_info_type_type_tool_object, // 'TySh'. Type tool object setting (Photoshop 6.0)
psd_layer_info_type_type_tool6, // 'TySh'. Type tool object setting (Photoshop 6.0)
psd_layer_info_type_effects, // Effects Layer (Photoshop 5.0). The key for the effects layer is 'lrFX'.
psd_layer_info_type_effects2, // 'lfx2', Photoshop 6.0
psd_layer_info_type_solid_color, // Key is 'SoCo'
Expand Down Expand Up @@ -420,7 +420,8 @@ typedef struct _psd_slices_resource_block
// Slices resource format
// Adobe Photoshop 6.0 and later stores slices information for an image in an image
// resource block. .
typedef struct _psd_slices_resource{
typedef struct _psd_slices_resource
{
psd_int bounding_top; // Bounding rectangle for all of the slices: top, left, bottom, right of all the slices
psd_int bounding_left;
psd_int bounding_bottom;
Expand Down Expand Up @@ -541,7 +542,7 @@ typedef struct _psd_path
// Channel information, Six bytes per channel
typedef struct _psd_channel_info
{
psd_short channel_id; // 2 bytes for Channel ID: 0 = red, 1 = green, etc.; C1 = transparency mask; C2 = user supplied layer mask
psd_short channel_id; // 2 bytes for Channel ID: 0 = red, 1 = green, etc.; ¨C1 = transparency mask; ¨C2 = user supplied layer mask
psd_int data_length; // 4 bytes for length of corresponding channel data. (**PSB** 8 bytes for length of corresponding channel data.)
psd_bool restricted;
} psd_channel_info;
Expand Down Expand Up @@ -600,7 +601,7 @@ struct _psd_layer_record
psd_channel_info * channel_info; //Channel information
psd_blend_mode blend_mode; // Blend mode key
psd_uchar opacity; // 0 = transparent ... 255 = opaque
psd_bool clipping; // 0 = base, 1 = nonCbase
psd_bool clipping; // 0 = base, 1 = non¨Cbase
psd_bool transparency_protected;
psd_bool visible;
psd_bool obsolete;
Expand Down Expand Up @@ -723,31 +724,31 @@ typedef struct _psd_layer_color_balance


// HUE/SATURATION
// Hue/Saturation settings files are loaded and saved in Photoshop��s Hue/Saturation dialog
// Hue/Saturation settings files are loaded and saved in Photoshop¡¯s Hue/Saturation dialog
typedef struct _psd_layer_hue_saturation
{
psd_uchar hue_or_colorization; // 0 = Use settings for hue-adjustment; 1 = Use settings for colorization.
psd_short colorization_hue; // Photoshop 5.0: The actual values are stored for the new version. Hue is - 180...180, Saturation is 0...100, and Lightness is -100...100.
psd_short colorization_saturation;// Photoshop 4.0: Three psd_short integers Hue, Saturation, and Lightness from C100...100.
psd_short colorization_lightness; // The user interface represents hue as C180...180, saturation as 0...100, and Lightness as -100...1000, as the traditional HSB color wheel, with red = 0.
psd_short colorization_saturation;// Photoshop 4.0: Three psd_short integers Hue, Saturation, and Lightness from ¨C100...100.
psd_short colorization_lightness; // The user interface represents hue as ¨C180...180, saturation as 0...100, and Lightness as -100...1000, as the traditional HSB color wheel, with red = 0.
psd_short master_hue; // Master hue, saturation and lightness values.
psd_short master_saturation;
psd_short master_lightness;
psd_short range_values[6][4]; // For RGB and CMYK, those values apply to each of the six hextants in the HSB color wheel: those image pixels nearest to red, yellow, green, cyan, blue, or magenta. These numbers appear in the user interface from C60...60, however the slider will reflect each of the possible 201 values from C100...100.
psd_short setting_values[6][3]; // For Lab, the first four of the six values are applied to image pixels in the four Lab color quadrants, yellow, green, blue, and magenta. The other two values are ignored ( = 0). The values appear in the user interface from C90 to 90.
psd_short range_values[6][4]; // For RGB and CMYK, those values apply to each of the six hextants in the HSB color wheel: those image pixels nearest to red, yellow, green, cyan, blue, or magenta. These numbers appear in the user interface from ¨C60...60, however the slider will reflect each of the possible 201 values from ¨C100...100.
psd_short setting_values[6][3]; // For Lab, the first four of the six values are applied to image pixels in the four Lab color quadrants, yellow, green, blue, and magenta. The other two values are ignored ( = 0). The values appear in the user interface from ¨C90 to 90.
psd_uchar lookup_table[6][360];
} psd_layer_hue_saturation;


// SELECTIVE COLOR
// Selective Color settings files are loaded and saved in Photoshop��s Selective Color dialog.
// Selective Color settings files are loaded and saved in Photoshop¡¯s Selective Color dialog.
typedef struct _psd_layer_selective_color
{
psd_ushort correction_method; // 0 = Apply color correction in relative mode; 1 = Apply color correction in absolute mode.
psd_short cyan_correction[10]; // Amount of cyan correction. Short integer from C100...100.
psd_short magenta_correction[10]; // Amount of magenta correction. Short integer from C100...100.
psd_short yellow_correction[10]; // Amount of yellow correction. Short integer from C100...100.
psd_short black_correction[10]; // Amount of black correction. Short integer from C100...100.
psd_short cyan_correction[10]; // Amount of cyan correction. Short integer from ¨C100...100.
psd_short magenta_correction[10]; // Amount of magenta correction. Short integer from ¨C100...100.
psd_short yellow_correction[10]; // Amount of yellow correction. Short integer from ¨C100...100.
psd_short black_correction[10]; // Amount of black correction. Short integer from ¨C100...100.
} psd_layer_selective_color;


Expand Down Expand Up @@ -1201,6 +1202,14 @@ typedef struct _psd_layer_type_tool
psd_argb_color color;
psd_bool anti_alias; // Anti alias on/off
} psd_layer_type_tool;

typedef struct _psd_layer_type_tool6
{
psd_double transform_info[6]; // 6 * 8 double precision numbers for the transform information
psd_char *pszTextData;
psd_short warp_version;
psd_double warp_info[4];
} psd_layer_type_tool6;


// end of additional layer information
Expand Down