Module:Sandbox/Imagesize/doc
< Module:Sandbox | Imagesize
Jump to navigation
Jump to search
Revision as of 20:49, 31 March 2019 by blackwiki>RexxS (creating documentation)
This is the documentation page for Module:Sandbox/Imagesize
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}}→ 0x0{{#invoke:Sandbox/Imagesize|getWidth|Example.jpg}}→ 0{{#invoke:Sandbox/Imagesize|getHeight|Example.jpg}}→ 0{{#invoke:Sandbox/Imagesize|getDimensions|File:Bishzilla Lucia Looking Right.gif}}→ 0x0