psd_tools.psd.engine_data

EngineData parser.

PSD file embeds text formatting data in its own markup language referred EngineData. The format looks like the following:

<<
  /EngineDict
  <<
    /Editor
    <<
      /Text (˛ˇMake a change and save.)
    >>
  >>
  /Font
  <<
    /Name (˛ˇHelveticaNeue-Light)
    /FillColor
    <<
      /Type 1
      /Values [ 1.0 0.0 0.0 0.0 ]
    >>
    /StyleSheetSet [
    <<
      /Name (˛ˇNormal RGB)
    >>
    ]
  >>
>>

EngineData

class psd_tools.psd.engine_data.EngineData(items=NOTHING)[source]

Dict-like element.

TYPE_TOOL_OBJECT_SETTING tagged block contains this object in its descriptor.

EngineData2

class psd_tools.psd.engine_data.EngineData2(items=NOTHING)[source]

Dict-like element.

TEXT_ENGINE_DATA tagged block has this object.

write(fp, indent=None, write_container=False, **kwargs)[source]

Write the element to a file-like object.

Bool

class psd_tools.psd.engine_data.Bool(value=False)[source]

Bool element.

classmethod frombytes(data)[source]

Read the element from bytes.

Parameters:data – bytes
classmethod read(fp)[source]

Read the element from a file-like object.

Parameters:fp – file-like object
write(fp, indent=0)[source]

Write the element to a file-like object.

Dict

class psd_tools.psd.engine_data.Dict(items=NOTHING)[source]

Dict-like element.

classmethod frombytes(data, **kwargs)[source]

Read the element from bytes.

Parameters:data – bytes
classmethod read(fp, **kwargs)[source]

Read the element from a file-like object.

Parameters:fp – file-like object
write(fp, indent=0, write_container=True)[source]

Write the element to a file-like object.

Float

class psd_tools.psd.engine_data.Float(value=0.0)[source]

Float element.

classmethod frombytes(data)[source]

Read the element from bytes.

Parameters:data – bytes
classmethod read(fp)[source]

Read the element from a file-like object.

Parameters:fp – file-like object
write(fp)[source]

Write the element to a file-like object.

Integer

class psd_tools.psd.engine_data.Integer(value=0)[source]

Integer element.

classmethod frombytes(data)[source]

Read the element from bytes.

Parameters:data – bytes
classmethod read(fp)[source]

Read the element from a file-like object.

Parameters:fp – file-like object
write(fp, indent=0)[source]

Write the element to a file-like object.

List

class psd_tools.psd.engine_data.List(items=NOTHING)[source]

List-like element.

classmethod frombytes(data)[source]

Read the element from bytes.

Parameters:data – bytes
classmethod read(fp)[source]

Read the element from a file-like object.

Parameters:fp – file-like object
write(fp, indent=None)[source]

Write the element to a file-like object.

Property

class psd_tools.psd.engine_data.Property(value=None)[source]

Property element.

classmethod frombytes(data)[source]

Read the element from bytes.

Parameters:data – bytes
classmethod read(fp)[source]

Read the element from a file-like object.

Parameters:fp – file-like object
write(fp)[source]

Write the element to a file-like object.

String

class psd_tools.psd.engine_data.String(value=None)[source]

String element.

classmethod frombytes(data)[source]

Read the element from bytes.

Parameters:data – bytes
classmethod read(fp)[source]

Read the element from a file-like object.

Parameters:fp – file-like object
write(fp)[source]

Write the element to a file-like object.