gif.close
Finalizes the animated GIF and completes file writing.
close finishes the GIF encoding process by writing
the GIF trailer and closing the underlying file handle.
Calling this method ensures the animated GIF is valid and properly formatted.
close multiple times is safeclose may leave the GIF corruptedclose after the last add_framegif = GD::Gif.new("animation.gif")
img = GD::Image.new(200, 200)
img.filled_circle(100, 100, 50, GD::Color.rgb(0, 128, 255))
gif.add_frame(img)
gif.close