Welcome to pyprocreate’s documentation!

class pyprocreate.Project(pro_file_path)

Class representing a procreate project

background_color
Returns:(r, g, b, a) tuple of the background color
background_hidden
Returns:bool - Is the background hidden?
bounding_rect
Returns:(left, top, right, bottom) tuple of content rect
dimensions
Returns:tuple of (width, height) in px
get_background_image_data()

Get a PIL Image() object of the project size filled with the project background color

Returns:PIL Image()
get_image_data()

Get a PIL Image() object of the entire project (composite) :return: PIL Image()

class pyprocreate.Layer(layer_obj, zipref, project, z_index)
UUID
Returns:str - the layer UUID
blend
Returns:int - the layer is blended with the above layer (unsure exact difference of ‘blend’ and ‘extendedBlend’)
bounding_rect
Returns:(left, top, right, bottom) tuple of content rect
clipped
Returns:bool - is the layer a clip layer (will it use the layer above as a mask to clip to content)
dimensions
Returns:(width, height) tuple of dimensions based on the content rect
extendedBlend
Returns:int - the layer is blended with the above layer (unsure exact difference of ‘blend’ and ‘extendedBlend’)
get_image_data(crop_on_bounding_rect=False)

Get a PIL Image() object of the layer

Parameters:crop_on_bounding_rect – should the output be cropped to the bounding rect of the layer, or remain the size of the whole project?
Returns:PIL Image()
hidden
Returns:bool - is the layer hidden
name
Returns:str - the layer name
opacity
Returns:float 0.0 - 1.0 defining opacity
preserve
Returns:bool - opposite of clipped, this will act as the mask for the below clipped layers
transform
Returns:16 tuple of currently unknown/unused decoded values defined as “transform”
visible
Returns:bool - is the layer visible
z_index

Get the stacking position of the layer. Lower numbers are ‘on top’ of higher numbers. The lowest value is 1. :return: int - the z_index of the layer

Indices and tables