PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

ImageLabel

Show deprecated

ImageLabel

Show deprecated

An ImageLabel renders a rectangle, like a Frame does, with an image. The image must be a decal uploaded to the Roblox website. The display of the image can be manipulated through the ImageLabel/ImageColor3 and ImageLable/ImageTransparency properties. To display only the image and hide the rectangle, set GuiObject/BackgroundTransparency to 1.

The image is scaled to fit the entirety of the rectangle, but remember that images look best when displayed at their native resolution. Before uploading your image asset, you may want to apply alpha bleeding and take a few more steps when building UI for high-DPI devices (like phones).

Advanced ImageLabel usage

  • Spritesheets can be used with ImageLabel through the use of ImageLabel/ImageRectOffset and ImageLabel/ImageRectSize. Packing multiple images into one and using this property can make your game’s image assets load much quicker, especially if you use many small icons in your GUIs.
  • Nine-slice images can be created by setting ImageLabel/ScaleType to Enum.ScaleType.Slice, then ImageLabel/SliceCenter to the center area of the nine-slice image.
  • Tiled images can be created by setting ImageLabel/ScaleType to Enum.ScaleType.Tiled, then ImageLabel/TileSize to be the size of rendered tiles.

Properties

Content

Image

The image content displayed by the UI element.

Color3

ImageColor3

Determines how a rendered image will be colorized.

Vector2

ImageRectOffset

The offset in pixels of the sub-area of an image to be displayed

Vector2

ImageRectSize

Determines the size in pixels of the sub-area of an image to be displayed.

float

ImageTransparency

Determines the transparency of the rendered image

bool

IsLoaded

[ReadOnly] [NotReplicated]

Indicates whether the Image has finished loading from the Roblox website.

ScaleType

ScaleType

Determines how an image will scale if displayed in a UI element whose size differs from the source image.

Rect

SliceCenter

Determines the center of a nine-slice image.

float

SliceScale

Scales the 9slice edges by the specified ratio

UDim2

TileSize

Sets the tiling size of the ImageLabel.

Functions

Events