Please create a way to export map as image
Laynord opened this issue · 9 comments
template is bold
sample data is italicized
Feature Description:
Can you please maybe just create a tool/plugin/other to do it ?
The python script linked in this issue ( #686 ) takes =~ 9 h to export a decently sizeable map when it doesnt crash ( the fact that it aint mulltithreaded is a big part of it , there is a fork to implement it but not a working one ) ; And we dont have a single clue of the size of the map to input i just want a complete export of it if possible
maybe as a side util or just another small plugin to use on a backup / maintenance server
If it could export the markers too it would be wonderfull.
That is not in scope for our project and probably not something we can work on, you yourself are free to try to make one though
That is for creating 3D output of the map, iirc also was added by someone else but not sure: https://sketchfab.com/3d-models/dynmapexp-9db20f4d63bd407b9e9632b171b1a18f for example
I've often wished for a tool like this myself and always hoped that someone would make it one day. But now I'm a programmer myself and would be willing to try it, but I'd like to know beforehand whether I understand the structure (first only for flat) of the individual image files (tiles) correctly.
In the flat folder we have a large number of individual folders with an "x_y" scheme. Within these folders there are images with the scheme [z^q]x_y, where q is the number of 'z's and is between 0 and 5. The z represents an upscaling. Each image consists of exactly 128x128px, regardless of the scale.
Assuming that there are images from 0_0 to 0_31 in a folder and keeping the X value constant, and then in folder 0_1 there are images from 0_32 to 0_63, I assume that there can be no duplication of file names. Accordingly, for the sake of simplicity, it would be possible to save all images in one folder for processing and then iterate over all files and simply merge them according to the same scales if their coordinates are next to each other.
Finally, marginal problems remain. If I understand correctly, pixels from unloaded chunks are simply represented by transparent pixels and the map only saves what is there; speaks the card - and thus the image file names - do not necessarily have to be a closed structure. There may be holes in the map and thus also later in the iteration, which I would have to catch when creating a single file and would have to catch them with a NoneSet Pixel accordingly.
Since my result should be a single image, it would be good to determine the required total size beforehand. If I have understood the structure correctly so far, the size of the image is determined as follows:
-width: abs(min(X_Coordinates))*128+abs(max(X_Coordinates)) -height: abs(min(Y_Coordinates))*128+abs(max(Y_Coordinates))
That's just everything I've put together from 10 minutes of pure file viewing. But before I start coding that, I would like confirmation that I don't completely misunderstand the existing structure here. I would do this program primarily out of my own interest, but I would also offer it publicly, if I'm allowed to do so at all.
template is bold
sample data is italicizedFeature Description: Can you please maybe just create a tool/plugin/other to do it ? The python script linked in this issue ( #686 ) takes =~ 9 h to export a decently sizeable map when it doesnt crash ( the fact that it aint mulltithreaded is a big part of it , there is a fork to implement it but not a working one ) ; And we dont have a single clue of the size of the map to input i just want a complete export of it if possible maybe as a side util or just another small plugin to use on a backup / maintenance server If it could export the markers too it would be wonderfull.
Okay - as I needed a tool for exprorting a dynmap as standalone one picture datafile I've created a tool for that in MATLAB. The script needed about 270s for that task with z=0 scale (seems to be 4px = block). The resulted pic has a size of 36224x36352px² and needs 73,496MB.
Is that tool something you look for?
how do you trigger it ?
https://github.com/webbukkit/dynmap/wiki/Exporting-World-Data-in-Wavefront-OBJ-Format
Not sure what you mean with 'trigger it'; I created a standalone MATLAB script that inreads each picture saved by a dynmap and put them together. It works well so far; my only problem so far ist, that it requieres to copy all pictures out of their subfolder in one foulder for all of them.