Thank for your listing. But I'm still a bit confused...
I succeeded in making the "saving" part in reading the content or a tilemap and building an image from it :
var img = Image.new()
img.create(100, 100, false, Image.FORMAT_RGBA8)
img.lock()
for v in n: for u in n:
if get_cell(u,v) == 1: img.set_pixel(u,v,Color(1,1,1,1))
else: img.set_pixel(u,v,Color(0,0,0,1))
img.unlock()
img.save_png("res://image.png")
But I just can't get the "load" part working, when I want to "read" the pixels of the saved image to assign the correct values to my tilemap.
Here's my (not working) code for now :
var img = Image.new()
img = load("res://image.png")
for v in n: for u in n:
if img.get_pixel(u,v) == 1: set_cell(u,v,1)
else: set_cell(u,v,0)