Difference between revisions of "Cropimage"
From Sega Retro
m |
|||
Line 1: | Line 1: | ||
− | <includeonly><div style="{{#if: {{{float|}}} |float:{{{float}}}; |}}display:inline-block; overflow:hidden; width:{{#if: {{{width|}}} |{{{width}}}px|auto}}; height:{{#if: {{{height|}}} |{{{height}}}px|auto}}"><div style="position:relative; top:-{{{y|0}}}px; left:-{{{x|0}}}px; width:{{#mediawidth:{{{image|}}}}}px; height:{{#mediaheight:{{{image|}}}}}px;">{{#if: {{{image|}}} |[[File:{{{image}}}]]|No image to display. | + | <includeonly><div style="{{#if: {{{float|}}} |float:{{{float}}}; |}}display:inline-block; overflow:hidden; width:{{#if: {{{width|}}} |{{{width}}}px|auto}}; height:{{#if: {{{height|}}} |{{{height}}}px|auto}}"><div style="position:relative; top:-{{{y|0}}}px; left:-{{{x|0}}}px; width:{{#mediawidth:{{{image|}}}}}px; height:{{#mediaheight:{{{image|}}}}}px;">{{#if: {{{image|}}} |[[File:{{{image}}}|link=]]|No image to display.}}</div></div></includeonly><noinclude> |
This template will display part of an image. | This template will display part of an image. | ||
Revision as of 17:56, 19 January 2015
This template will display part of an image.
Usage
{{cropimage | image= | width= | height= | x= | y= | float= }}
- All parameters are optional except "image".
- "width" and "height" refer to the crop area (the area of the image which remains visible), not the size of the image itself. The image is not resized.
- "x" and "y" are distances from the left and top edges of the image where the visible area begins.
- "float" can be left or right.