Template:Cropped image is used to display a normal file image with the margins cropped.

Usage

{{Cropped image
|markers={{image marker|top=##|left=##}}
|[[File:Name|##px]]
|align=[left/right]
|crop-left=
|crop-top=
|crop-right=
|crop-bottom=
|width=
|height=
|thumb=
}}

To center the image, an additional div tag will need to be used.

<div style="width:[width of image after crop];margin:auto">{{Cropped Image|[file and crop info]}}</div>

Parameters

Optional

markers

Markers to be used on the cropped image. These should use {{image marker}} template, with an appropriate X and Y coordinate to place the marker properly. This can require some trial and error, so preview to see the marker's position before saving the edit.

The following line adds a marker:

|markers={{Cropped Image Marker|top=##|left=##}}

Required

<unnamed 1>

The file of the image to be cropped.

Optional

align

The alignment of the template on the page, either left or right.

Optional

crop-left, crop-top, crop-rigt, crop-bottom

The position the image should be cropped.

Optional

width, height

The width and height of the output, as alternatives to crop-bottom or crop-right.

Optional

thumb

Make the cropped images similar to a thumbnail image with a description by filling in the parameter with a description. If the image is meant to be a thumbnail but not have a description, the code &nbsp; should be added to the thumbnail parameter.

Examples

As example usages, the file: File:RCSprites.png:

[[File:RCSprites.png]]

RCSprites.png

{{Cropped image|[[File:RCSprites.png]]|width=12px|height=12px}}
RCSprites.png
{{Cropped image|[[File:RCSprites.png]]|crop-top=12px|crop-left=12px|width=12px|height=12px}}
RCSprites.png
{{Cropped image|[[File:RCSprites.png]]|crop-left=4px|crop-right=4px|crop-bottom=4px|crop-top=4px}}
RCSprites.png
Community content is available under CC-BY-SA unless otherwise noted.