Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

A Map Exporting Solution

1570902705

Edited 1570902835
Hello all, I had a pressing need to export one of my maps and was not happy with the options available (basically print screen and stitch.)&nbsp; I had to think a bit outside of the box for this one but I got a pretty good solution working and thought I would share. Here is an example of one of my maps I exported: A programmer by trade, the solution I came up with requires an extra application I developed to take a json representation of a map, which I generate with the API script, and produce an image file for it. With the script active for you game, as the GM type !EXPORT in the chat.&nbsp; A JSON representation of the map will be whispered to you, along with placed in the API log, which I find a bit easier to copy from.&nbsp; You then paste this into the app, select your options, and the export will produce an image file for you. Below is the API script: <a href="https://gist.github.com/kanageddaamen/97545f68c5cd1e2c85d34fbd94933e76" rel="nofollow">https://gist.github.com/kanageddaamen/97545f68c5cd1e2c85d34fbd94933e76</a> And here is a link to a google drive folder with the application and license file.&nbsp; Please read the license file if you are interested in trying it out: <a href="https://drive.google.com/drive/folders/1gPbyOEmBgLeUkqymLZvDlaNy-xRvmSJZ?usp=sharing" rel="nofollow">https://drive.google.com/drive/folders/1gPbyOEmBgLeUkqymLZvDlaNy-xRvmSJZ?usp=sharing</a> System requirements for the export app: This is Windows only Requires .Net framework 4.5 or later Limitations of the export script\application Only exports Map and GM layers No token auras, status indicators, or bars are included Maps can have a maximum total pixel count of&nbsp;536870912 after scaling, half of this if you are exporting with a grid Square grids only Features of the export application Export in png, jpeg, tiff, bmp and gif formats Scaling from within the app itself.&nbsp; Scaling is done as the map is being drawn, not as a post process.&nbsp; This allows higher resolution images to maintain their quality if a map is scaled up Include or exclude a grid and set a pixel thickness. Size and transparency values are pulled from the Roll20 settings Ability to include or exclude the GM layer, and specify a transparency value for it Text objects are included, including any font changes.&nbsp; If you are using a font other than Arial, that font must be installed on your computer.&nbsp; Any font family set via the API can be included, as long as it is installed on your computer. Drawings (eg shapes, freehand, etc) are all included Tints applied to tokens and tiles are preserved IMPORTANT!: Some image urls (namely dundjinni in my testing) may have SSL certificate errors.&nbsp; There is an option in the app to ignore these errors, but doing so may pose a risk.&nbsp; Use that option with discretion.&nbsp; Also, I make no guarantee that this is bug free.&nbsp; Use at your own risk, and all that. For Developers: Feel free to reference MapExport.dll and play around with it if you would like.&nbsp; If there is enough interest, I will post the source to github
1572001476
Stephen D
Pro
Marketplace Creator
This is an amazing script; but can I ask why it has the pixel limits? I have some big maps in roll20 that I would like to download and it won't do it? Also, does it automatically fail if you have animated GIFs on the map on one of the layers to be processed?
The pixel limits are due to the limitation in the .NET framework for image generation.&nbsp; You run in to memory limits unfortunately.&nbsp; There is likely some optimization that may be done to overcome that limitation, though I haven't had time to dig deeper in to it.&nbsp; I actually haven't tested GIFs either, so I can't say either way.