-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Canvas area to image file #5
Comments
Saving the whole map in a single image is hard if you want to have a good definition of every road because you need to have a lot of RAM memory, not only for creating it but also for managing it. Best way is reducing the whole map in more tiles. |
@edoaxyz Hello! Tell, please, and how you get tiles from a game, for example for leaflet.js? Are you using some solution of your own? |
Actually I'm using this software, a little modified by me, for taking pictures from the canvas that is displayed and moving along the whole map. I can put it here on github but I need to do some editings on it. |
Actually I don't have time for rewriting it, because I'm very busy with other projects. Anyway it seems that @dariowouters has made something about it in the latest commits in branch develop. |
If save to file more than 1-2 times with a resolution higher 10000х10000, there is a crash of the program (System.ArgumentException). |
@meatlayer I believe the cause for that is that the bitmap is never disposed. You can see how I generate tiles (only 4000×4000 instead of 256×256 at the moment) here. You can also stitch the map, but that will take around 24 hours and 500GB of temporary storage. |
Sorry it took this long to answer and give a solution, but I took some time off from the project and just the game(s) in general. Here you can see a quick example of the ETS2 map with a max zoom level of 4. Here you can find the source of the web page and how you can use the tile map with OpenLayers. |
Thank you very much - this is really useful functionality! I checked with zoom = 8, tiles generated in 12 minutes on configuration: Very fast result! 👍 |
You consider the possibility to add function in canvas area to save full map in a bitmap file .png ?
By add an appropriate button on form and the ability to select zoom/scope and image resolution when saving.
The text was updated successfully, but these errors were encountered: