stalker.models.format.ImageFormat

Inheritance diagram of stalker.models.format.ImageFormat
class stalker.models.format.ImageFormat(width=None, height=None, pixel_aspect=1.0, print_resolution=300, **kwargs)

Bases: stalker.models.entity.Entity

Common image formats for the Projects.

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 cannot 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 cannot be zero or negative
__init__(width=None, height=None, pixel_aspect=1.0, print_resolution=300, **kwargs)

Methods

__init__([width, height, pixel_aspect, …])

Attributes

created_by The User who has created this object.
created_by_id The id of the User who has created this entity.
date_created A datetime.datetime instance showing the creation date and time of this object.
date_updated A datetime.datetime instance showing the update date and time of this object.
description Description of this object.
device_aspect returns the device aspect
entity_groups
entity_id
entity_type
generic_data This attribute can hold any kind of data which exists in SOM.
generic_text This attribute can hold any text.
height The height of this format
html_class
html_style
id
imageFormat_id
metadata
name Name of this object
nice_name Nice name of this object.
notes All the Notess attached to this entity.
pixel_aspect The pixel aspect ratio of this format.
plural_class_name the plural name of this class
print_resolution The print resolution of this format
query
tags A list of tags attached to this object.
thumbnail
thumbnail_id
tjp_id returns TaskJuggler compatible id
to_tjp renders a TaskJuggler compliant string used for TaskJuggler integration.
type The type of the object.
type_id The id of the Type of this entity.
updated_by The User who has updated this object.
updated_by_id The id of the User who has updated this entity.
width The width of this format.
created_by

The User who has created this object.

created_by_id

The id of the User who has created this entity.

date_created

A datetime.datetime instance showing the creation date and time of this object.

date_updated

A datetime.datetime instance showing the update date and time of this object.

description

Description of this object.

device_aspect

returns the device aspect

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

generic_data

This attribute can hold any kind of data which exists in SOM.

generic_text

This attribute can hold any text.

height

The height of this format

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

Name of this object

nice_name

Nice name of this object.

It has the same value with the name (contextually) but with a different format like, all the white spaces replaced by underscores (“_”), all the CamelCase form will be expanded by underscore (_) characters and it is always lower case.

notes

All the Notess attached to this entity.

It is a list of Note instances or an empty list, setting it to None will raise a TypeError.

pixel_aspect

The pixel aspect ratio of this format.

  • the pixel_aspect should be set to a positive non-zero float
  • integers are also accepted but will be converted to float
  • for improper inputs the object will raise an exception
plural_class_name

the plural name of this class

print_resolution

The print resolution of this format

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

A list of tags attached to this object.

It is a list of Tag instances which shows the tags of this object

tjp_id

returns TaskJuggler compatible id

to_tjp

renders a TaskJuggler compliant string used for TaskJuggler integration. Needs to be overridden in inherited classes.

type

The type of the object.

It is a Type instance with a proper Type.target_entity_type.

type_id

The id of the Type of this entity. Mainly used by SQLAlchemy to create a Many-to-One relates between SimpleEntities and Types.

updated_by

The User who has updated this object.

updated_by_id

The id of the User who has updated this entity.

width

The width of this format.

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