I have added a /drawsize @ width height command. I have limited the width and height to a maximum of 32768. Also, /drawsize will not allow you to resize below the largest point that a /draw command has drawn to within the bitmap.

On my system, with 4GB free, /drawsize fails with 32768 x 32768. In paint.net, a bitmap of 32768 x 32768 just crashes paint.net. When it has managed to create it, paint.net uses up 2GB+ of memory. So it is still possible for /drawsize to cause issues, however I am assuming that most scripters will use it immediately after /window to set the maximum reasonable size that a scripter expects to use for that bitmap.