getImage: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Tweaking page layout and typography) |
||
Line 10: | Line 10: | ||
|example= | |example= | ||
To display the image from an [[Token:image token{{!}}image token]] called | To display the image from an [[Token:image token{{!}}image token]] called {{code|image:Map}} you can do the following: | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
<img src="[r: getImage('image:Map')]"></img> | <img src="[r: getImage('image:Map')]"></img> | ||
</source> | </source> | ||
Note that an | Note that an [[Image Token]] can be retrieved from ANY map (so it does NOT have to be on the current map). | ||
Alternatively this can be used to retrieve a normal token, which MUST be on the same map: | Alternatively this can be used to retrieve a normal token, which MUST be on the same map: | ||
Line 21: | Line 21: | ||
<img src="[r: getImage('Dragon')]"></img> | <img src="[r: getImage('Dragon')]"></img> | ||
</source> | </source> | ||
|also=[[getTokenImage]] (which you can give the size as parameter) | |||
}} | }} | ||
[[Category:Miscellaneous Function]] | [[Category:Miscellaneous Function]] |
Revision as of 18:30, 8 October 2012
getImage() Function
• Introduced in version 1.3b48
Usage
getImage(name)
Example
To display the image from an image token called
image:Map
you can do the following:
<img src="[r: getImage('image:Map')]"></img>
Note that an Image Token can be retrieved from ANY map (so it does NOT have to be on the current map).
Alternatively this can be used to retrieve a normal token, which MUST be on the same map:
<img src="[r: getImage('Dragon')]"></img>
See Also
getTokenImage (which you can give the size as parameter)