The Image
Module¶
Another key class inside the Paynter library is the Image class. This module will take care of storing all the layers data of the current image you are creating. It will also manage to merge all the layer during the final rendering process.
This class will normally be 100% managed through the :py:class`Paynter` class, so you should never instantiate it manually.
The Image
Class¶
-
class
paynter.image.
Image
¶ The
Image
class is structured as an array ofLayer
.An Image class is created when you create a
Paynter
, so you can access this class as follows:from paynter import * paynter = Paynter() image = paynter.image
-
Image.
getActiveLayer
()¶ Returns the currently active
Layer
.Return type: A Layer
object.
-
Image.
newLayer
(effect='')¶ Creates a new
Layer
and set that as the active.Parameters: effect – A string with the blend mode for that layer that will be used when during the rendering process. The accepted values are: 'soft_light','lighten','screen','dodge','addition','darken','multiply','hard_light','difference','subtract','grain_extract','grain_merge','divide','overlay'
.Return type: Nothing.
-
Image.
duplicateActiveLayer
()¶ Duplicates the current active
Layer
.Return type: Nothing.
-
Image.
mergeAllLayers
()¶ Merge all the layers together.
Return type: The result Layer
object.