Toggle menu
15
236
81
27.9K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:ImageRatio/doc: Difference between revisions

From Kenshi Wiki
Prd (talk | contribs)
Created page with "{{doc sub}} {{Module rating| release}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> == Usage == <code><nowiki>{{</nowiki>#invoke:ImageRatio|ratio|Filename.jpg<nowiki>}}</nowiki></code> This returns the ratio of width to height (w/h) for an image. Defaults to returning 1 if the image doesn't exist, this avoids divide by 0 errors in templates that use it. <includeonly>{{Sandbox other|| <!-- Categories below this line; in..."
 
Prd (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{doc sub}}
{{doc sub}}
{{Module rating| release}}
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->


Line 10: Line 9:
<includeonly>{{Sandbox other||
<includeonly>{{Sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
<!-- Categories below this line; interwikis at Wikidata -->
 
[[Category:Modules]]
}}</includeonly><noinclude>
}}</includeonly><noinclude>
[[Category:Module documentation pages]]
[[Category:Module documents]]
</noinclude>
</noinclude>

Latest revision as of 03:47, 15 March 2025

Usage

{{#invoke:ImageRatio|ratio|Filename.jpg}}

This returns the ratio of width to height (w/h) for an image. Defaults to returning 1 if the image doesn't exist, this avoids divide by 0 errors in templates that use it.

Contents