Advertisement
kphs2

Art Uploader

Mar 10th, 2022 (edited)
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. local function color_pixel(index,color)
  2. local connection = (getconnections(UI[tostring(index)].MouseButton1Click))[1]
  3. setupvalue(connection.Function,9,color)
  4. connection.Function()
  5. end
  6. local low_quality = 25
  7.  
  8. lq=low_quality
  9. for i=1,1024 do
  10. v=imageBytes[i]
  11. if not v or not v.R or not v.G or not v.B then continue end
  12. -- if v.R == 0 and v.G == 0 and v.B == 0 then v = {R=255,G=255,B=255} end
  13. local r,g,b = v.R or 0,v.G or 0,v.B or 0
  14. print(i, r-(r%lq),g-(g%lq),b-(b%lq))
  15. color_pixel(i,Color3.fromRGB(r-(r%lq),g-(g%lq),b-(b%lq)))
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement