Last updated on
Sep 15, 2025
Note
Documentation for Substance Automation Toolkit is now included in the SAT package. You can access the documentation by opening html-doc.zip inside your downloaded SAT package.
psdparser
class psdparser.PSDLayer(aName, aLayerNo, aFormat, aWidth, aHeight, aDepth, aColorMode)
Bases: object
Class PSDLayer is used to gather information on a layer of a PSD file
- Members:
- mName (str): name of the function definition.
- mLayerNo (str): unique identifier in the package/ context.
- mFormat (str): various attributes
- mWidth (int): width in pixel
- mHeight (int): height in pixel
- mDepth (
sbsenum.OutputFormatEnum): bit depth - mColorMode (
sbsenum.ColorModeEnum): color mode
static convertColorToSbsEnum(aColor)
static convertDepthToSbsEnum(aDepth)
getFilterParamColor()
getFilterParamSize()
psdparser.extractCompositeTo(aContext, aPsdFileAbsPath, aDestinationFolder)
Extract the composite image of the given .psd file into a .png file, and save it in the destination folder.
| Parameters: |
|
|---|---|
| Returns: | the output path as a string |
psdparser.extractLayerTo(aContext, aPsdFileAbsPath, aLayer, aDestinationFolder)
Extract the layer image of the given .psd file into a .png file, and save it in the destination folder.
psdparser.getLayers(aContext, aPsdFileAbsPath)
Get the list of layers included in the given .psd file.
psdparser.getPsdLayerFromList(aPsdLayerList, aLayerName)
psdparser.getPsdLayerNameFromResource(aResource)
| Parameters: | aResource (class:.SBSResource) – A Resource which should be based on a .psd layer |
|---|---|
| Returns: | The layer name as save in the .psd file, or None if the resource is not extracted from a .psd file |