Expand Canvas without loosing Pixels/Art?
loohney opened this issue · 1 comments
Can you resize/expand the canvas?
I'd like to know if you can expand the current canvas without loosing any pixels and art on it. Would love to expand my 1000x1000 canvas to 2000x1000. Is that somehow possible?
Thank you.
There are no good tools for doing this. While it is technically possible, it has a number of challenges to take note of:
- Generating logs and timelapses becomes more challenging
- There will be some downtime
- The risk of data loss is not insignificant (make sure to backup before trying anything)
That said, a process that should work is as follows:
- Convert your
board.dat
to an image using either board2img.py or some other tool. - (Optional) Do the same for the heatmap and virginmap, though there are no good tools to do this.
- Adjust the size of the image(s) to what you desire. Expanding only down and right will keep coordinates correct, otherwise:
- Run this query on the database:
UPDATE pixels SET x = x + <left_expansion> AND y = y + <up_expansion>;
- Run this query on the database:
- Convert back to
.dat
and replace old files (if you have a placemap, don't forget that). - Set the correct width and height in configuration.
There is an exception to all this: you can expand down and only down by simply adding empty data to each of the .dat
files and changing the height in the configuration.
Again, this is an involved and manual process very prone to errors; it's possible I forgot a step or that you make a mistake, so keep a backup of everything before you do anything and proceed with caution. Other than that, best of luck if you do go through with it.