If I do this:
save_image()
var/image/I = foobar()
var/savefile/F = new("icon.png")
F << I
read_image()
var/savefile/F = new("icon.png")
usr << F
The file is written in DM's format, and I can't view the image at all. DM can't even read it back in.
I can get around this problem, sort-of, by specifying a path.
save_image()
var/image/I = foobar()
var/savefile/F = new("icon.png")
F["icon"] << I
read_image()
var/savefile/F = new("icon.png")
usr << F["icon"]
But I can't read it into a variable for some reason, I can only send it through output.
Does anyone know how to save images/icons in their native format?