Module:Sandbox/Imagesize/doc

From blackwiki
< Module:Sandbox‎ | Imagesize
Revision as of 20:49, 31 March 2019 by blackwiki>RexxS (creating documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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