# Class e.p.b.m.i.ImageModel(Model):

Part of elisa.plugins.base.models.image View In Hierarchy

Known subclasses: elisa.plugins.coherence.models.UpnpImageModel

Representation of an image.

An image model contains a list of references to image files that are in fact one image in various dimensions. This list is ordered by increasing size of image. This allows to easily retrieve the largest or the smallest representation of an image.

'A simple example': the image is used as the cover art of an `elisa.plugins.base.models.audio.AlbumModel`. A resource provider fills this image model with a thumbnail and a huge high contrast image. Now the UI can decide that it does not want to show such a high quality image because it is going to be used as an icon in a list. It uses `model.cover.references[0]` (the first one, the smallest image) and the amount of data to load is minimal. Later the user decides to play a track of the album and the UI wants to show it in fullscreen, it always uses the last image in the list because it is the largest one (and very probably the one with the best quality for a huge picture): `model.cover.references[-1]`.

Instance Variables | references | images ordered by increasing size of raw data (type: `list` of `elisa.core.media_uri.MediaUri` )

Line # | Kind | Name | Docs
--- | --- | --- | ---
55 | Method | __init__ | Constructor. Initialize all the fields.

Inherited from Bindable (via Model):

Line # | Kind | Name | Docs
--- | --- | --- | ---
34 | Method | bind | Bind a local `attribute` to `destination_attribute` of
73 | Method | unbind | Remove the binding of `attribute` to `destination_attribute` of
104 | Method | unbind_object | Remove all the bindings you have for a certain `destination_object`.
118 | Method | __setattr__ | Undocumented
136 | Method | __delattr__ | Undocumented

def __init__(self):
overrides elisa.core.utils.bindable.Bindable.__init__
Constructor. Initialize all the fields.