novhack / godot-gifexporter

GDNative plugin adding a GifExporter node that enables GIF file export to Godot Engine 3.2
MIT License
7 stars 1 forks source link

exported gif file dosent loop even with begin_export set to 0 #4

Open GNamimates opened 2 years ago

GNamimates commented 2 years ago

hello, ive recently been using your amazing godot gif exporter! but im having an issue with the exported gif not looping, ive set the begin_export to 0 or a really high number and the gif only loops once.

this is the code I used to export the image sequence into a gif:

var GifExporter = $GifExporter
    var err = GifExporter.begin_export("render/patpat/output.gif",512,512,0.025,0)
    if err:#check if compatible with hardware
        for I in range(5):#get images
            var img = Image.new()
            img.load(str("res://render/patpat/img",I,".png"))
            GifExporter.write_frame(img,Color(1,1,1),0.025)#apply the images to gif exporter

        GifExporter.end_export()

and this image is the output of exporting (it might not be animated until you click the image): output yes its a test hand petting a image place holder :)

GNamimates commented 2 years ago

ok ive found out why and ill tell so other people who uses this dont do the same mistake as me, what I did wrong is I set the frame_delay too low, its better to test with higher numbers first like 1 and slowly tweaking to some numbers, I thought the frame_delay is based on frames per second, I still dont know what it is but setting it to 1 is a good idea than setting it to what I did witch is 0.025

GNamimates commented 2 years ago

if anybody is asking why I am doing this, I wanna see mr.krabs getting pet while choking fsr output