0 votes

I rendered a large coordinate text file (16M lines) into a pixelated picture. How do I go about saving the results to an image file? I created it on a black background TextureRec using the code below:

func _draw():
    var f = File.new()
    f.open(file, File.READ)
    #for loop in range(0,1000000):
    while not f.eof_reached():
        var line = f.get_line()
        if (line == null):

        var xcoord = (int(line.get_slice(",", 0))/40)
        var ycoord = (int(line.get_slice(",", 1))/40)

        var point = PoolVector2Array([Vector2(xcoord, ycoord)])
        var color = PoolColorArray([Color(255, 0, 0)])
        draw_primitive(point, color, PoolVector2Array())

Godot version v3.5.1.stable.official [6fed1ffa3]
in Engine by (79 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.