Image Outliner ー Outline images in just a few clicks!

Image Outliner


Get the plugin here!

Heavily inspired by @Xsticcy’s ImgOutline plugin, make sure you check out his works!

Hello! I’d like to introduce my first-ever plugin that I have been working on, Image Outliner! Because Roblox does not allow you to make outlines for images, I decided to implement it myself. Image Outliner lets you outline images in just a few clicks!
*You can only create black outlines as of now.

Here are some screenshots of images that were outlined using this plugin:

Updates

4/15/23 - Added SurfaceGui and BillboardGui support.
4/16/23 - Added “Quality” parameter.

Plugin Instructions
  1. Find Image Outliner in your plugins tab.
    image

  2. Click on “Outline Image” and open the Image Outliner menu.
    image

  3. Select an ImageLabel.
    If this shows up, click on confirm. (This may break other UI elements such as CanvasGroup)
    image

  4. Pick whatever thickness and quality you like and click Create!
    (Thickness: How thick the outline will be in pixels. Quality: Creates outline that consists of 360 * n% ImageLabels)

  5. If you would like to remove the outline, simply click on the Remove button or remove the Frame named “Outlines” under the image.

ModuleScript Instructions

When you open the Image Outliner menu, it automatically places a ModuleScript named “ImageOutliner” in Workplace. This is so you can create outlines for images while the game is running.
There are two methods you can use within the script.

:warning:Do NOT run these functions in a script that is the child of the image you are trying to outline! This causes the game to crash!

CreateOutline(Image:ImageLabel,Thickness:number,Quality:number)


Creates an outline for Image, with the given Thickness and Quality.
(Thickness: How thick the outline will be in pixels. Quality: Creates outline that consists of 360 * n% ImageLabels)
Example Code:

local ImageOutliner = require(workspace:FindFirstChild("ImageOutliner"))
local Image = script.Parent.ImageLabel

ImageOutliner:CreateOutline(Image,5,50) -- This would create an outline with the thickness of 5 pixels and 50% quality.

RemoveOutline(Image:ImageLabel)


Removes the outline of Image.
Example Code:

local ImageOutliner = require(workspace:FindFirstChild("ImageOutliner"))
local Image = script.Parent.ImageLabel

ImageOutliner:RemoveOutline(Image) -- This code would remove the outline for Image.

Usage Example (LocalScript):

local Players = game:GetService("Players")
local ImageOutliner = require(workspace:FindFirstChild("ImageOutliner"))
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Parent = Players.LocalPlayer.PlayerGui
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Global
local Image = Instance.new("ImageLabel")
Image.Parent = ScreenGui
Image.BackgroundTransparency = 1
Image.AnchorPoint = Vector2.new(.5,.5)
Image.Position = UDim2.new(.5,0,.5,0)
Image.Size = UDim2.new(0,500,0,500)
Image.Image = Players:GetUserThumbnailAsync(Players.LocalPlayer.UserId,Enum.ThumbnailType.AvatarThumbnail,Enum.ThumbnailSize.Size420x420)

ImageOutliner:CreateOutline(Image,15,100)
-- This code creates an image of your avatar with an outline that has a thickness of 15 pixels and 100% quality in the center of your screen. 

Feel free to leave any feedback, suggestion, or question!
Thank you for reading this topic!

7 Likes

This is an interesting plugin, it works perfectly however there’s a problem: it creates many ImageLabels inside the original image and that gives lag.
I suggest to find a new way to have the same result or find a way to reduce the number of ImageLabels.

This plugin is great to be your first plugin, keep it up!

2 Likes

Thank you for your reply! I didn’t have any lag whatsoever while I was testing my plugin, so I never thought of the performance aspect. I will be trying my best to somehow reduce the number of ImageLabels!

2 Likes

Isn’t this just the same as adding a highlight to the object or putting it in a viewport frame and adjusting the border?

Anyways, good plugin, but I’m not sure where it would come in handy.

2 Likes

Yes, it is like adding a highlight to a 3D object, except Roblox doesn’t let you do that for UI objects so I created that feature as a plugin!

I myself can’t really think of many usage examples, but I’d say you could probably use this plugin to outline images to give a cartoony feeling to their UI.

2 Likes

Great news: I’ve added an option to change the number of ImageLabels it will make! Hopefully this will be a solution to the performance issue!
(20-50% is recommended to reduce lag, but 100% should work just fine.)

2 Likes

Why do we need this when I can slightly increase the size and change it’s color to black?

2 Likes

This is really only the solution to giving images an outline. This however will restrict the ability to change the transparency of the original image, as well as the outline. The outline can change transparency by storing them all in a CanvasGroup, and changing the GroupTransparency, but the image itself will still have restrictions.

2 Likes

This doesn’t work with all images.

image

4 Likes

That’s technically true, but I think it’s better to do do some resizing because it uses too much performance (I know jack (aka quin) did something like this but It isn’t too much addition)