local datareal = asset:CreateEditableImageAsync(a)
-- some other stuff
datareal:Crop(Vector2.zero, Vector2.new(1024, 576))
local modifiedimag = {}
for x=0,math.floor(datareal.Size.X)-1 do
for y=0,math.floor(datareal.Size.Y)-1 do
local pixel = datareal:ReadPixels(Vector2.new(x, y), Vector2.new(1,1))
table.insert(modifiedimag, pixel[1])
table.insert(modifiedimag, pixel[2])
table.insert(modifiedimag, pixel[3])
table.insert(modifiedimag, 1)
end
end
datareal:WritePixels(Vector2.zero, Vector2.new(datareal.Size.X, datareal.Size.Y), modifiedimag)
end
for now im just trying to rewrite the whole table so that i can modify the pixels later on, but instead of providing me of basically a screenshot, it gives this distorted mess