Module:Sandbox/Imagesize/doc: Difference between revisions
Appearance
Content deleted Content added
creating documentation |
(No difference)
|
Revision as of 20:49, 31 March 2019
This module is adapted from the 'getdimensions' function in Module:Multiple image for use as a stand-alone.
It has three functions: getWidth, getHeight, getDimensions. They take a filename, with or without the "File:" prefix, and return the width, or the height, or both dimensions (WIDTHxHEIGHT), respectively. It works with files on Commons or local ones, and works with animated gifs using the dimensions of the first image.
Examples
{{#invoke:Sandbox/Imagesize|getDimensions|Example.jpg}}
→ 300x300{{#invoke:Sandbox/Imagesize|getWidth|Example.jpg}}
→ 300{{#invoke:Sandbox/Imagesize|getHeight|Example.jpg}}
→ 300{{#invoke:Sandbox/Imagesize|getDimensions|File:Bishzilla Lucia Looking Right.gif}}
→ 100x103