psd_tools.constants

Various constants for psd_tools

BlendMode

class psd_tools.constants.BlendMode[source]

Blend modes.

COLOR = b'colr'
COLOR_BURN = b'idiv'
COLOR_DODGE = b'div '
DARKEN = b'dark'
DARKER_COLOR = b'dkCl'
DIFFERENCE = b'diff'
DISSOLVE = b'diss'
DIVIDE = b'fdiv'
EXCLUSION = b'smud'
HARD_LIGHT = b'hLit'
HARD_MIX = b'hMix'
HUE = b'hue '
LIGHTEN = b'lite'
LIGHTER_COLOR = b'lgCl'
LINEAR_BURN = b'lbrn'
LINEAR_DODGE = b'lddg'
LINEAR_LIGHT = b'lLit'
LUMINOSITY = b'lum '
MULTIPLY = b'mul '
NORMAL = b'norm'
OVERLAY = b'over'
PASS_THROUGH = b'pass'
PIN_LIGHT = b'pLit'
SATURATION = b'sat '
SCREEN = b'scrn'
SOFT_LIGHT = b'sLit'
SUBTRACT = b'fsub'
VIVID_LIGHT = b'vLit'

ChannelID

class psd_tools.constants.ChannelID[source]

Channel types.

CHANNEL_0 = 0
CHANNEL_1 = 1
CHANNEL_2 = 2
CHANNEL_3 = 3
CHANNEL_4 = 4
CHANNEL_5 = 5
CHANNEL_6 = 6
CHANNEL_7 = 7
CHANNEL_8 = 8
CHANNEL_9 = 9
REAL_USER_LAYER_MASK = -3
TRANSPARENCY_MASK = -1
USER_LAYER_MASK = -2

Clipping

class psd_tools.constants.Clipping[source]

Clipping.

BASE = 0
NON_BASE = 1

ColorMode

class psd_tools.constants.ColorMode[source]

Color mode.

BITMAP = 0
CMYK = 4
DUOTONE = 8
GRAYSCALE = 1
INDEXED = 2
LAB = 9
MULTICHANNEL = 7
RGB = 3
channels = <function ColorMode.channels>[source]

ColorSpaceID

class psd_tools.constants.ColorSpaceID[source]

Color space types.

CMYK = 2
GRAYSCALE = 8
HSB = 1
LAB = 7
RGB = 0

Compression

class psd_tools.constants.Compression[source]

Compression modes.

Compression. 0 = Raw Data, 1 = RLE compressed, 2 = ZIP without prediction, 3 = ZIP with prediction.

PACK_BITS = 1
RAW = 0
ZIP = 2
ZIP_WITH_PREDICTION = 3

EffectOSType

class psd_tools.constants.EffectOSType[source]

OS Type keys for Layer Effects.

BEVEL = b'bevl'
COMMON_STATE = b'cmnS'
DROP_SHADOW = b'dsdw'
INNER_GLOW = b'iglw'
INNER_SHADOW = b'isdw'
OUTER_GLOW = b'oglw'
SOLID_FILL = b'sofi'

GlobalLayerMaskKind

class psd_tools.constants.GlobalLayerMaskKind[source]

Global layer mask kind.

COLOR_PROTECTED = 1
COLOR_SELECTED = 0
PER_LAYER = 128

LinkedLayerType

class psd_tools.constants.LinkedLayerType[source]

Linked layer types.

ALIAS = b'liFA'
DATA = b'liFD'
EXTERNAL = b'liFE'

PathResourceID

class psd_tools.constants.PathResourceID[source]

An enumeration.

CLIPBOARD = 7
CLOSED_KNOT_LINKED = 1
CLOSED_KNOT_UNLINKED = 2
CLOSED_LENGTH = 0
INITIAL_FILL = 8
OPEN_KNOT_LINKED = 4
OPEN_KNOT_UNLINKED = 5
OPEN_LENGTH = 3
PATH_FILL = 6

PlacedLayerType

class psd_tools.constants.PlacedLayerType[source]

An enumeration.

IMAGE_STACK = 3
RASTER = 2
UNKNOWN = 0
VECTOR = 1

PrintScaleStyle

class psd_tools.constants.PrintScaleStyle[source]

Print scale style.

CENTERED = 0
SIZE_TO_FIT = 1
USER_DEFINED = 2

Resource

class psd_tools.constants.Resource[source]

Image resource keys.

Note the following is not defined for performance reasons.

  • PATH_INFO_10 to PATH_INFO_989 corresponding to 2010 - 2989
  • PLUGIN_RESOURCES_10 to PLUGIN_RESOURCES_989 corresponding to
    4010 - 4989
ALPHA_IDENTIFIERS = 1053
ALPHA_NAMES_PASCAL = 1006
ALPHA_NAMES_UNICODE = 1045
ALTERNATE_DUOTONE_COLORS = 1066
ALTERNATE_SPOT_COLORS = 1067
AUTO_SAVE_FILE_PATH = 1086
AUTO_SAVE_FORMAT = 1087
BACKGROUND_COLOR = 1010
BORDER_INFO = 1009
CAPTION_DIGEST = 1061
CAPTION_PASCAL = 1008
CLIPPING_PATH_NAME = 2999
COLOR_HALFTONING_INFO = 1013
COLOR_SAMPLERS_RESOURCE = 1073
COLOR_SAMPLERS_RESOURCE_OBSOLETE = 1038
COLOR_TRANSFER_FUNCTION = 1016
COPYRIGHT_FLAG = 1034
COUNT_INFO = 1080
DISPLAY_INFO = 1077
DISPLAY_INFO_OBSOLETE = 1007
DUOTONE_HALFTONING_INFO = 1014
DUOTONE_IMAGE_INFO = 1018
DUOTONE_TRANSFER_FUNCTION = 1017
EFFECTIVE_BW = 1019
EFFECTS_VISIBLE = 1042
EPS_OPTIONS = 1021
EXIF_DATA_1 = 1058
EXIF_DATA_3 = 1059
GLOBAL_ALTITUDE = 1049
GLOBAL_ANGLE = 1037
GRAYSCALE_HALFTONING_INFO = 1012
GRAYSCALE_TRANSFER_FUNCTION = 1015
GRID_AND_GUIDES_INFO = 1032
HDR_TONING_INFO = 1070
ICC_PROFILE = 1039
ICC_UNTAGGED_PROFILE = 1041
IDS_SEED_NUMBER = 1044
IMAGE_MODE_RAW = 1029
IMAGE_READY_DATA_SETS = 7001
IMAGE_READY_VARIABLES = 7000
INDEXED_COLOR_TABLE_COUNT = 1046
IPTC_NAA = 1028
JPEG_QUALITY = 1030
JUMP_TO_XPEP = 1052
LAYER_COMPS = 1065
LAYER_GROUPS_ENABLED_ID = 1072
LAYER_GROUP_INFO = 1026
LAYER_SELECTION_IDS = 1069
LAYER_STATE_INFO = 1024
LIGHTROOM_WORKFLOW = 8000
MAC_NSPRINTINFO = 1084
MAC_PRINT_MANAGER_INFO = 1001
MEASUREMENT_SCALE = 1074
OBSOLETE1 = 1000
OBSOLETE2 = 1003
OBSOLETE3 = 1020
OBSOLETE4 = 1023
OBSOLETE5 = 1027
ONION_SKINS = 1078
ORIGIN_PATH_INFO = 3000
PATH_INFO_0 = 2000
PATH_INFO_1 = 2001
PATH_INFO_2 = 2002
PATH_INFO_3 = 2003
PATH_INFO_4 = 2004
PATH_INFO_5 = 2005
PATH_INFO_6 = 2006
PATH_INFO_7 = 2007
PATH_INFO_8 = 2008
PATH_INFO_9 = 2009
PATH_INFO_990 = 2990
PATH_INFO_991 = 2991
PATH_INFO_992 = 2992
PATH_INFO_993 = 2993
PATH_INFO_994 = 2994
PATH_INFO_995 = 2995
PATH_INFO_996 = 2996
PATH_INFO_997 = 2997
PATH_SELECTION_STATE = 1088
PIXEL_ASPECT_RATIO = 1064
PLUGIN_RESOURCE_0 = 4000
PLUGIN_RESOURCE_1 = 4001
PLUGIN_RESOURCE_2 = 4002
PLUGIN_RESOURCE_3 = 4003
PLUGIN_RESOURCE_4 = 4004
PLUGIN_RESOURCE_4990 = 4990
PLUGIN_RESOURCE_4991 = 4991
PLUGIN_RESOURCE_4992 = 4992
PLUGIN_RESOURCE_4993 = 4993
PLUGIN_RESOURCE_4994 = 4994
PLUGIN_RESOURCE_4995 = 4995
PLUGIN_RESOURCE_4996 = 4996
PLUGIN_RESOURCE_4997 = 4997
PLUGIN_RESOURCE_4998 = 4998
PLUGIN_RESOURCE_4999 = 4990
PLUGIN_RESOURCE_5 = 4005
PLUGIN_RESOURCE_6 = 4006
PLUGIN_RESOURCE_7 = 4007
PLUGIN_RESOURCE_8 = 4008
PLUGIN_RESOURCE_9 = 4009
PRINT_FLAGS = 1011
PRINT_FLAGS_INFO = 10000
PRINT_INFO_CS2 = 1071
PRINT_INFO_CS5 = 1082
PRINT_SCALE = 1062
PRINT_STYLE = 1083
QUICK_MASK_INFO = 1022
RESOLUTION_INFO = 1005
SHEET_DISCLOSURE = 1076
SLICES = 1050
SPOT_HALFTONE = 1043
THUMBNAIL_RESOURCE = 1036
THUMBNAIL_RESOURCE_PS4 = 1033
TIMELINE_INFO = 1075
TRANSPARENCY_INDEX = 1047
URL = 1035
URL_LIST = 1054
VERSION_INFO = 1057
WATERMARK = 1040
WINDOWS_DEVMODE = 1085
WORKFLOW_URL = 1051
WORKING_PATH = 1025
XMP_METADATA = 1060
is_path_info = <function Resource.is_path_info>[source]
is_plugin_resource = <function Resource.is_plugin_resource>[source]

SectionDivider

class psd_tools.constants.SectionDivider[source]

An enumeration.

BOUNDING_SECTION_DIVIDER = 3
CLOSED_FOLDER = 2
OPEN_FOLDER = 1
OTHER = 0

Tag

class psd_tools.constants.Tag[source]

Tagged blocks keys.

ALPHA = b'Alph'
ANIMATION_EFFECTS = b'anFX'
ANNOTATIONS = b'Anno'
ARTBOARD_DATA1 = b'artb'
ARTBOARD_DATA2 = b'artd'
ARTBOARD_DATA3 = b'abdd'
BLACK_AND_WHITE = b'blwh'
BLEND_CLIPPING_ELEMENTS = b'clbl'
BLEND_FILL_OPACITY = b'iOpa'
BLEND_INTERIOR_ELEMENTS = b'infx'
BRIGHTNESS_AND_CONTRAST = b'brit'
CHANNEL_BLENDING_RESTRICTIONS_SETTING = b'brst'
CHANNEL_MIXER = b'mixr'
COLOR_BALANCE = b'blnc'
COLOR_LOOKUP = b'clrL'
COMPUTER_INFO = b'cinf'
CONTENT_GENERATOR_EXTRA_DATA = b'CgEd'
CURVES = b'curv'
EFFECTS_LAYER = b'lrFX'
EXPORT_SETTING1 = b'extd'
EXPORT_SETTING2 = b'extn'
EXPOSURE = b'expA'
FILTER_EFFECTS1 = b'FXid'
FILTER_EFFECTS2 = b'FEid'
FILTER_EFFECTS3 = b'FELS'
FILTER_MASK = b'FMsk'
FOREIGN_EFFECT_ID = b'ffxi'
GRADIENT_FILL_SETTING = b'GdFl'
GRADIENT_MAP = b'grdm'
HUE_SATURATION = b'hue2'
HUE_SATURATION_V4 = b'hue '
INVERT = b'nvrt'
KNOCKOUT_SETTING = b'knko'
LAYER = b'Layr'
LAYER_16 = b'Lr16'
LAYER_32 = b'Lr32'
LAYER_ID = b'lyid'
LAYER_MASK_AS_GLOBAL_MASK = b'lmgm'
LAYER_NAME_SOURCE_SETTING = b'lnsr'
LAYER_VERSION = b'lyvr'
LEVELS = b'levl'
LINKED_LAYER1 = b'lnkD'
LINKED_LAYER2 = b'lnk2'
LINKED_LAYER3 = b'lnk3'
LINKED_LAYER_EXTERNAL = b'lnkE'
METADATA_SETTING = b'shmd'
NESTED_SECTION_DIVIDER_SETTING = b'lsdk'
OBJECT_BASED_EFFECTS_LAYER_INFO = b'lfx2'
OBJECT_BASED_EFFECTS_LAYER_INFO_V0 = b'lmfx'
OBJECT_BASED_EFFECTS_LAYER_INFO_V1 = b'lfxs'
PATTERNS1 = b'Patt'
PATTERNS2 = b'Pat2'
PATTERNS3 = b'Pat3'
PATTERN_DATA = b'shpa'
PATTERN_FILL_SETTING = b'PtFl'
PHOTO_FILTER = b'phfl'
PIXEL_SOURCE_DATA1 = b'PxSc'
PIXEL_SOURCE_DATA2 = b'PxSD'
PLACED_LAYER1 = b'plLd'
PLACED_LAYER2 = b'PlLd'
POSTERIZE = b'post'
PROTECTED_SETTING = b'lspf'
REFERENCE_POINT = b'fxrp'
SAVING_MERGED_TRANSPARENCY = b'Mtrn'
SAVING_MERGED_TRANSPARENCY16 = b'Mt16'
SAVING_MERGED_TRANSPARENCY32 = b'Mt32'
SECTION_DIVIDER_SETTING = b'lsct'
SELECTIVE_COLOR = b'selc'
SHEET_COLOR_SETTING = b'lclr'
SMART_OBJECT_LAYER_DATA1 = b'SoLd'
SMART_OBJECT_LAYER_DATA2 = b'SoLE'
SOLID_COLOR_SHEET_SETTING = b'SoCo'
TEXT_ENGINE_DATA = b'Txt2'
THRESHOLD = b'thrs'
TRANSPARENCY_SHAPES_LAYER = b'tsly'
TYPE_TOOL_INFO = b'tySh'
TYPE_TOOL_OBJECT_SETTING = b'TySh'
UNICODE_LAYER_NAME = b'luni'
UNICODE_PATH_NAME = b'pths'
USER_MASK = b'LMsk'
USING_ALIGNED_RENDERING = b'sn2P'
VECTOR_MASK_AS_GLOBAL_MASK = b'vmgm'
VECTOR_MASK_SETTING1 = b'vmsk'
VECTOR_MASK_SETTING2 = b'vsms'
VECTOR_ORIGINATION_DATA = b'vogk'
VECTOR_STROKE_CONTENT_DATA = b'vscg'
VECTOR_STROKE_DATA = b'vstk'
VIBRANCE = b'vibA'