Difference between revisions of "Getdim"
From Sega Retro
m (Text replacement - "Category:Sega Retro templates" to "Category:Templates") |
|||
Line 24: | Line 24: | ||
returns: {{getdim|file=Sonic1 title.png|w=1000|h=112|output=w}} | returns: {{getdim|file=Sonic1 title.png|w=1000|h=112|output=w}} | ||
− | [[Category: | + | [[Category:Templates]]</noinclude> |
Latest revision as of 13:24, 1 January 2022
This template obtains the width or height of a resized image, given the real dimensions of that image.
Usage
{{getdim|actual=320x224|w=160|output=h}}
returns: 112
{{getdim|actual=320x224|h=112|output=w}}
returns: 160
{{getdim|actual=320x224|h=112|w=1000|output=w}}
returns: 160
{{getdim|actual={{#mediadimensions:Sonic1 title.png}}|w=160|h=1000|output=w|var=sanic}}{{#var:sanic}}
returns: 160
{{getdim|file=Sonic1 title.png|w=1000|h=112|output=w}}
returns: 160