You can add the following line before the the gm2.write step:
> gm2._out = ['tile:box.jpg']
and this will write the image correctly, without error.
Note that in this example, the image will actually only tile 2x2 instead of the expected 4x4, because of what I can only assume is a bug in core GM where the image ends up doubled in size when applied as a background tile.
Steps to reproduce (box.jpg is a 100x100 image I am tiling):
You can add the following line before the the
gm2.write
step:and this will write the image correctly, without error.
Note that in this example, the image will actually only tile 2x2 instead of the expected 4x4, because of what I can only assume is a bug in core GM where the image ends up doubled in size when applied as a background tile.