All right, try this:
img.pixels[:] = mathutils.Vector.Fill(4, 1)[:] * size * size
This finishes in 2.19 secs on 8K to me
Not exactly in the milliseconds as you wanted, though.
All right, try this:
img.pixels[:] = mathutils.Vector.Fill(4, 1)[:] * size * size
This finishes in 2.19 secs on 8K to me
Not exactly in the milliseconds as you wanted, though.