stalker.core.models.imageFormat.ImageFormat

Inheritance diagram of stalker.core.models.imageFormat.ImageFormat

class stalker.core.models.imageFormat.ImageFormat(width=None, height=None, pixel_aspect=1.0, print_resolution=300, **kwargs)[source]

Bases: stalker.core.models.entity.Entity

the image format class

adds up this parameters to the SimpleEntity:

Parameters:
  • width – the width of the format, it cannot be zero or negative, if a float number is given it will be converted to integer
  • height – the height of the format, it cannot be zero or negative, if a float number is given it will be converted to integer
  • pixel_aspect – the pixel aspect ratio of the current ImageFormat object, it can not be zero or negative, and if given as an integer it will be converted to a float, the default value is 1.0
  • print_resolution – the print resolution of the ImageFormat given as DPI (dot-per-inch). It can not be zero or negative
__init__(width=None, height=None, pixel_aspect=1.0, print_resolution=300, **kwargs)[source]

Methods

__init__(**kwargs[, width, height, ...])

Attributes

code
created_by gets and sets the User object who has created this
date_created gets and sets the datetime.datetime object which shows when
date_updated gets and sets the datetime.datetime object which shows when
description the description of the entity
device_aspect returns the device aspect
height this is a property to set and get the height of the
name the name of the entity
nice_name this is the nice name of the SimpleEntity. It has the same
pixel_aspect this is a property to set and get the pixel_aspect of the
print_resolution this is a property to set and get the print_resolution of the
tags a list of Tag objects which shows the related tags to the
updated_by gets and sets the User object who has updated this
width this is a property to set and get the width of the
created_by

gets and sets the User object who has created this AuditEntity

date_created

gets and sets the datetime.datetime object which shows when this object has been created

date_updated

gets and sets the datetime.datetime object which shows when this object has been updated

description

the description of the entity

device_aspect[source]

returns the device aspect

because the device_aspect is calculated from the width/height*pixel formula, this property is read-only.

height[source]

this is a property to set and get the height of the image_format

  • the height should be set to a positif non-zero integer
  • integers are also accepted but will be converted to float
  • for improper inputs the object will raise a ValueError
name

the name of the entity

nice_name

this is the nice name of the SimpleEntity. It has the same value with the name (contextually) but with a different format like, all the whitespaces replaced by underscores (“_”), all the CamelCase form will be expanded by underscore (_) characters and it is always lowercase.

There is also the code attribute which is simple the uppercase form of nice_name if it is not defined differently (i.e set to another value).

pixel_aspect[source]

this is a property to set and get the pixel_aspect of the ImageFormat

  • the pixel_aspect should be set to a positif non-zero float
  • integers are also accepted but will be converted to float
  • for improper inputs the object will raise a ValueError
print_resolution[source]

this is a property to set and get the print_resolution of the ImageFormat

  • it should be set to a positif non-zero float or integer
  • integers are also accepted but will be converted to float
  • for improper inputs the object will raise a ValueError
tags

a list of Tag objects which shows the related tags to the entity

updated_by

gets and sets the User object who has updated this AuditEntity

width[source]

this is a property to set and get the width of the image_format

  • the width should be set to a positif non-zero integer
  • integers are also accepted but will be converted to float
  • for improper inputs the object will raise a ValueError

Previous topic

stalker.core.models.imageFormat

Next topic

stalker.core.models.link

This Page