psdparser module
- class psdparser.PSDLayer(aName, aLayerNo, aFormat, aWidth, aHeight, aDepth, aColorMode)
Bases:
objectClass 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 depthmColorMode (
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:
aContext (
Context) – current execution contextaPsdFileAbsPath (str) – path of the .psd file
aDestinationFolder (str) – absolute path of the destination folder
- 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