getAssetProperties

From RPTools Wiki
Revision as of 22:42, 29 November 2019 by Merudo (talk | contribs) (Created page with "{{MacroFunction |name= getAssetProperty |version=1.5.8 |description= Returns a JSON Object holding the properties of the asset. |usage= <source lang="mtmacro" line> getAs...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

getAssetProperty() Function

Introduced in version 1.5.8
Returns a JSON Object holding the properties of the asset.

Usage

getAssetProperty(assetId)

Parameters

  • assetId - The Asset ID for an image.

The fields returned for an image are:

  • subtype: the extension of the image, such as png or jpeg
  • name: the name of the file from which the asset originated
  • status: the status of the asset. Broken means the assetId is incorrect, and loading means the asset hasn't be fully loaded yet.
  • width: the width of the image
  • height: the height of the image