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...") |
|||
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>[[Image:{{{imagename}}}|{{ #if:{{#pos:{{{newwidth|100}}}|px}}|{{{newwidth|100}}}| {{#expr: ({{#imgw: {{{imagename}}} }} * {{{newwidth|100}}}) / 100 }}px }}|{{{caption|}}}]]</includeonly> | + | </noinclude><includeonly>[[Image:{{{imagename}}}|{{ #if:{{#pos:{{{newwidth|100}}}|px}}|{{{newwidth|100}}}| {{#expr: ({{#imgw: {{{imagename}}} }} * {{{newwidth|100}}}) / 100 }}px }}|{{{caption|}}}|{{{alignment|}}}]]</includeonly> |
Revision as of 05:45, 17 August 2016
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 }}