Making my image not blurry

I’m getting a image from a Decal, and the image is blurry. How do I fix this? I can’t increase the resolution.

decal = {
		RankLevel = 1,
		Description = "Places a image onto a block with the corresponding ID",
		Creator = "gravitycoil828",
		OtherPeople = 0,
		ParseTargetAsInfo = true,
		ShowOnList = true,
		AllowEZ = true,
		ExName = "decal [id / username]",
		Alias = {"decal"},
		Function = function(player, target)
			local filteredText = ""
			filteredText = target
			if tonumber(filteredText) then
				filteredText = "rbxthumb://type=Asset&w=768&h=432&id=" .. tonumber(filteredText)
			else
				--return --TODO: make player thingies work
				local success = pcall(function()
					game.Players:GetUserIdFromNameAsync(filteredText)
				end)
				if success then
					filteredText = game.Players:GetUserThumbnailAsync(game.Players:GetUserIdFromNameAsync(filteredText), Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
				else
					warn(success .. game.Players:GetUserIdFromNameAsync(filteredText))
					return
				end
			end
			local event1 = game.ReplicatedStorage.Files.Events.NonNative.GetBlockNP
			local event2 = game.ReplicatedStorage.Files.Events.NonNative.GetSideNP
			event1:FireClient(player)
			event2:FireClient(player)
			local block = nil
			local side = nil
			event1.OnServerEvent:Connect(function(plra, response)
				if plra == player then
					block = response
				end
			end)
			event2.OnServerEvent:Connect(function(plra, response)
				if plra == player then
					side = response
				end
			end)
			repeat
				task.wait()
			until block ~= nil and side ~= nil
			local docheck = false
			if not block:FindFirstChild("BlockViewPropertiesDecal_" .. side) then
				local viewprops = Instance.new("SurfaceGui")
				viewprops.Name = "BlockViewPropertiesDecal_" .. side
				viewprops.Parent = block
				viewprops.Face = Enum.NormalId[side]
				local a = Instance.new("ImageLabel")
				a.Parent = viewprops
				a.Image = filteredText
				a.BackgroundTransparency = 1
				a.Size = UDim2.new(1, 0, 1, 0)
				a.Name = "Image"
				a.AnchorPoint = Vector2.new(0.5, 0.5)
				a.Position = UDim2.new(0.5, 0,0.5, 0)
				docheck = true
			else
				local existingViewProps = block:FindFirstChild("BlockViewPropertiesDecal_" .. side)
				if existingViewProps then
					if target == nil or target == ""  then
						existingViewProps:Destroy()
					else
						existingViewProps.Image.Image = filteredText
					end
				else
					local viewprops = Instance.new("SurfaceGui")
					viewprops.Name = "BlockViewPropertiesDecal_" .. side
					viewprops.Parent = block
					viewprops.Face = Enum.NormalId[side]
					local a = Instance.new("ImageLabel")
					a.Parent = viewprops
					a.Image = filteredText
					a.BackgroundTransparency = 1
					a.Size = UDim2.new(1, 0, 1, 0)
					a.Name = "Image"
					a.AnchorPoint = Vector2.new(0.5, 0.5)
					a.Position = UDim2.new(0.5, 0,0.5, 0)
					docheck = true
				end
			end
			if not block:FindFirstChild("DecalProperties") then
				local check = Instance.new("BoolValue")
				check.Name = "DecalProperties"
				check.Parent = block
			end
		end
	},

You can change the ResampleMode on an ImageLabel to Enum.ResamplerMode.Pixelated to preserve the sharp edges of pixels.

Sorry, I found a solution… sorry about wasting your time.

No worries. You should share your solution in case other people come across this post looking for the same answer!

local success, obj = pcall(function()
					game:GetService("InsertService"):LoadAsset(filteredText)
				end)
				if success then
					obj = game:GetService("InsertService"):LoadAsset(filteredText)
					if obj:FindFirstChildWhichIsA("Decal") then
						filteredText = obj:FindFirstChildWhichIsA("Decal").Texture
					end
				else
					--warn(success)
					--warn(obj)
					return
				end

filteredtext should be your iD

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.