psd_tools.psd.image_resources¶
Image resources section structure. Image resources are used to store non-pixel data associated with images, such as pen tool paths or slices.
See Resource
to check available
resource names.
Example:
from psd_tools.constants import Resource
version_info = psd.image_resources.get_data(Resource.VERSION_INFO)
The following resources are plain bytes:
Resource.OBSOLETE1: 1000
Resource.MAC_PRINT_MANAGER_INFO: 1001
Resource.MAC_PAGE_FORMAT_INFO: 1002
Resource.OBSOLETE2: 1003
Resource.DISPLAY_INFO_OBSOLETE: 1007
Resource.BORDER_INFO: 1009
Resource.DUOTONE_IMAGE_INFO: 1018
Resource.EFFECTIVE_BW: 1019
Resource.OBSOLETE3: 1020
Resource.EPS_OPTIONS: 1021
Resource.QUICK_MASK_INFO: 1022
Resource.OBSOLETE4: 1023
Resource.WORKING_PATH: 1025
Resource.OBSOLETE5: 1027
Resource.IPTC_NAA: 1028
Resource.IMAGE_MODE_RAW: 1029
Resource.JPEG_QUALITY: 1030
Resource.URL: 1035
Resource.COLOR_SAMPLERS_RESOURCE_OBSOLETE: 1038
Resource.ICC_PROFILE: 1039
Resource.SPOT_HALFTONE: 1043
Resource.JUMP_TO_XPEP: 1052
Resource.EXIF_DATA_1: 1058
Resource.EXIF_DATA_3: 1059
Resource.XMP_METADATA: 1060
Resource.CAPTION_DIGEST: 1061
Resource.ALTERNATE_DUOTONE_COLORS: 1066
Resource.ALTERNATE_SPOT_COLORS: 1067
Resource.HDR_TONING_INFO: 1070
Resource.PRINT_INFO_CS2: 1071
Resource.COLOR_SAMPLERS_RESOURCE: 1073
Resource.DISPLAY_INFO: 1077
Resource.MAC_NSPRINTINFO: 1084
Resource.WINDOWS_DEVMODE: 1085
Resource.PATH_INFO_N: 2000-2999
Resource.PLUGIN_RESOURCES_N: 4000-4999
Resource.IMAGE_READY_VARIABLES: 7000
Resource.IMAGE_READY_DATA_SETS: 7001
Resource.IMAGE_READY_DEFAULT_SELECTED_STATE: 7002
Resource.IMAGE_READY_7_ROLLOVER_EXPANDED_STATE: 7003
Resource.IMAGE_READY_ROLLOVER_EXPANDED_STATE: 7004
Resource.IMAGE_READY_SAVE_LAYER_SETTINGS: 7005
Resource.IMAGE_READY_VERSION: 7006
Resource.LIGHTROOM_WORKFLOW: 8000
ImageResources¶
-
class
psd_tools.psd.image_resources.
ImageResources
(items=NOTHING)[source]¶ Image resources section of the PSD file. Dict of
ImageResource
.
ImageResource¶
AlphaIdentifiers¶
AlphaNamesPascal¶
AlphaNamesUnicode¶
GridGuidesInfo¶
HalftoneScreens¶
HalftoneScreen¶
LayerGroupEnabledIDs¶
LayerGroupInfo¶
LayerSelectionIDs¶
ShortInteger¶
PascalString¶
PixelAspectRatio¶
PrintFlags¶
PrintFlagsInfo¶
PrintScale¶
ResoulutionInfo¶
-
class
psd_tools.psd.image_resources.
ResoulutionInfo
(horizontal: int = 0, horizontal_unit: int = 0, width_unit: int = 0, vertical: int = 0, vertical_unit: int = 0, height_unit: int = 0)[source]¶ Resoulution info structure.
-
horizontal
¶
-
horizontal_unit
¶
-
width_unit
¶
-
vertical
¶
-
vertical_unit
¶
-
height_unit
¶
-
Slices¶
SlicesV6¶
SliceV6¶
-
class
psd_tools.psd.image_resources.
SliceV6
(slice_id: int = 0, group_id: int = 0, origin: int = 0, associated_id=None, name: str = '', slice_type: int = 0, bbox=NOTHING, url: str = '', target: str = '', message: str = '', alt_tag: str = '', cell_is_html: bool = False, cell_text: str = '', horizontal_align: int = 0, vertical_align: int = 0, alpha: int = 0, red: int = 0, green: int = 0, blue: int = 0, data=None)[source]¶ Slice element for version 6.
-
slice_id
¶
-
group_id
¶
-
origin
¶
-
associated_id
¶
-
name
¶
-
slice_type
¶
-
bbox
¶
-
url
¶
-
target
¶
-
message
¶
-
alt_tag
¶
-
cell_is_html
¶
-
cell_text
¶
-
horizontal
¶
-
vertical
¶
-
alpha
¶
-
red
¶
-
green
¶
-
blue
¶
-
data
¶
-