Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
InfoTagPicture

Detailed Description

Kodi's picture info tag class.

Class: InfoTagPicture()

Access and / or modify the picture metadata of a ListItem.


v20 Python API changes
New class added.

Example:

...
tag = item.getPictureInfoTag()
datetime_taken = tag.getDateTimeTaken()
tag.setResolution(1920, 1080)
...

Function Documentation

◆ InfoTagPicture()

Function: xbmc.InfoTagPicture([offscreen])


Create a picture info tag.

Parameters
offscreen[opt] bool (default False) - if GUI based locks should be avoided. Most of the times listitems are created offscreen and added later to a container for display (e.g. plugins) or they are not even displayed (e.g. python scrapers). In such cases, there is no need to lock the GUI when creating the items (increasing your addon performance). Note however, that if you are creating listitems and managing the container itself (e.g using WindowXML or WindowXMLDialog classes) subsquent modifications to the item will require locking. Thus, in such cases, use the default value (False).

v20 Python API changes
New function added.

Example:

...
pictureinfo = xbmc.InfoTagPicture(offscreen=False)
...

◆ getResolution()

getResolution ( )

Function: getResolution()


Get the resolution of the picture in the format "w x h".

Returns
[string] Resolution of the picture in the format "w x h".

v20 Python API changes
New function added.

◆ getDirector()

getDirector ( )

Function: getDateTimeTaken()


Get the date and time at which the picture was taken in W3C format.

Returns
[string] Date and time at which the picture was taken in W3C format.

v20 Python API changes
New function added.

◆ setResolution()

setResolution ( ...)

Function: setResolution(width, height)


Sets the resolution of the picture.

Parameters
widthint - Width of the picture in pixels.
heightint - Height of the picture in pixels.

v20 Python API changes
New function added.

◆ setDateTimeTaken()

setDateTimeTaken ( ...)

Function: setDateTimeTaken(datetimetaken)


Sets the date and time at which the picture was taken in W3C format. The following formats are supported:

  • YYYY
  • YYYY-MM-DD
  • YYYY-MM-DDThh:mm[TZD]
  • YYYY-MM-DDThh:mm:ss[TZD] where the timezone (TZD) is always optional and can be in one of the following formats:
  • Z (for UTC)
  • +hh:mm
  • -hh:mm
Parameters
datetimetakenstring - Date and time at which the picture was taken in W3C format.

v20 Python API changes
New function added.