Difference between revisions of "Template:ScaleImage"
Jump to navigation
Jump to search
(Created page with "<noinclude> This template is useful for scaling the given image by percentage or, as usual, by absolute size. E.g. Scaling the image to 15%: <pre> {{ScaleImage |imagename=ela...") |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
|caption=Città di Eland | |caption=Città di Eland | ||
|newwidth=15 | |newwidth=15 | ||
+ | |alignment=center | ||
}} | }} | ||
</pre> | </pre> | ||
Line 18: | Line 19: | ||
|caption=Città di Eland | |caption=Città di Eland | ||
|newwidth=80px | |newwidth=80px | ||
+ | |alignment=center | ||
}} | }} | ||
</pre> | </pre> | ||
− | </noinclude><includeonly>[[ | + | </noinclude><includeonly>[[File:{{{imagename}}}|{{ #if:{{#pos:{{{newwidth|100}}}|px}}|{{{newwidth|100}}}| {{#expr: ({{#imgw: {{{imagename}}} }} * {{{newwidth|100}}}) / 100 round 0}}px }}|{{{alignment|}}}|{{{caption|}}}|]]</includeonly> |
Latest revision as of 17:09, 31 May 2020
This template is useful for scaling the given image by percentage or, as usual, by absolute size.
E.g. Scaling the image to 15%:
{{ScaleImage |imagename=eland.png |caption=Città di Eland |newwidth=15 |alignment=center }}
E.g. Scaling the image to 80 pixel:
{{ScaleImage |imagename=eland.png |caption=Città di Eland |newwidth=80px |alignment=center }}