Hello!
I barely touch Roblox Studio nowadays, but lately I have been playing around with the EditableImage (which I have done previously), however one problem which I am unable wrap my head around are the bleeding colours.
Here are some examples of what the bleeding looks like (in different scenarios):


Here comes the code for the first image:
Which is a normal script parented to an ImageLabel, and with a RunContext of client
local AssetService = game:GetService("AssetService");
local ImageLabel = script.Parent;
local Image = AssetService:CreateEditableImage({Size = ImageLabel.AbsoluteSize});
local Buf = buffer.create(Image.Size.X*Image.Size.Y*4);
local ByteCount = 0;
local Row = 0;
local Col = 0;
while(ByteCount < buffer.len(Buf)) do
local Colour = (Row > 24) and Color3.new(1,0,0) or Color3.new(0,1,0);
buffer.writeu8(Buf, ByteCount+0, Colour.R*255);
buffer.writeu8(Buf, ByteCount+1, Colour.G*255);
buffer.writeu8(Buf, ByteCount+2, 0);
buffer.writeu8(Buf, ByteCount+3, 255);
Col += 1;
ByteCount += 4;
if(Col == Image.Size.X) then Col = 0; Row += 1; end
end
ImageLabel.ImageContent = Content.fromObject(Image);
Image:WritePixelsBuffer(Vector2.zero, Image.Size, Buf);
I want to tear myself apart, this driving me insane…