Template:Imageclip

From Terraria Wiki
Jump to navigation Jump to search
Template-info.svg Documentation The documentation below is transcluded from Template:Imageclip/doc. (edit | history)

Used to clip an image.

Usage

To display text in front or behind the image, place the template and text in adjacent cells in a table (see example below).

{{imageclip|image=image_name.ext|size=##px|clipleft=##px|clipwidth=##px}}

image

image name including extension

size

##px; optional, re-sizes image first

clipleft

##px; amount to crop image from the left; default 0

cliptop

##px; amount to crop image from the top; default 0

clipwidth

##px; width of returned image; default full width (minus clip)

clipheight

##px; height of returned image; default full height (minus clip)

Exampes

This code Produces
{|
|{{imageclip|image=Tree.png|size=90px|clipleft=10px|clipwidth=30px}}||big tree
Tree.png
big tree
|-
|align=right|{{imageclip|image=Tree.png|size=40px|clipleft=5px|clipwidth=15px}}||small tree
Tree.png
small tree
|-
|align=right|{{imageclip|image=Tree.png|size=90px|clipleft=55px|cliptop=105px|clipheight=35px}}||branch
Tree.png
branch
|-
|align=center|{{imageclip|image=Mature Herbs.png|clipleft=36px|clipwidth=18px}}||Blinkroot
Mature Herbs.png
Blinkroot
|}