# QUALITY SETTINGS

## BASIC KNOWLEDGE

One of the most important things to take into account when you export your map is the quality of the final file. <br>

### **Things you want to control**

* The **size** of the file (in MB)
* The **resolution** of the image (in Pixels)
* The **compression** quality (visual artifacts)

Each of these aspects will impact the other ones, so you need to understand how they work together.&#x20;

If you're limited to a max size for file uploads on your VTT, you might want have control on that first.<br>

### **What affects the file size?**

* The export format (PNG, JPEG, WEBP...)
* The compression quality
* The resolution of the map (or PPI, for Pixel Per Inch)
* The size of the map

### What affects the visual quality of the map?

* The export format (PNG, JPEG, WEBP...)
* The compression quality
* The resolution of the map (or PPI, for Pixel Per Inch)

## **FORMATS**

Dungeondraft offers to export in four different formats: PNG, JPEG, WEBP and Universal VTT.

* **PNG** is a high quality format, **it's the best option for quality prints**. It's not really designed for online use, but support transparency. If you need to print your map, PNG is the best out of the four options.
* **JPEG** is a compressed format, you can set its quality with a slider. It doesn't support transparency. It's a very generic format that can be read by any software. **It's a good choice for online use.**
* **WEBP** is also a compressed format, but it supports transparency. See it as a mix of PNG and JPEG. It's more optimized than **JPEG** and will produce smaller file sizes for the same compression quality, but some softwares can't read it. **It's usually a very good choice for online use.**
* **Universal VTT (or UVTT, or .dd2vtt)** is a special format that embeds a PNG image as well as walls, portals and lights data to import into most Virtual Tabletops (Roll20, FoundryVTT, Fantasy Grounds Unity...). It's useful when you don't want to redraw all your walls and place your portals and lights manually in your VTT. Due to embedding a PNG, the file size will be large, but some VTTs automatically convert it in WEBP to make it smaller.

{% hint style="success" %}
**Summary**

* **PNG =** Best quality, supports transparency, big file size, good for printing
* **JPEG =** Small file, lower quality, no transparency, good for online use
* **WEBP =** Smart and small, supports both transparency and quality, good for online use but not always supported
* **UVTT** = Only for Virtual Tabletops, embeds some data, big file size
  {% endhint %}

<figure><img src="/files/9GrBNHzwCjOugFn9RiLB" alt=""><figcaption><p>The four different export formats</p></figcaption></figure>

## COMPRESSION

As said above, JPEG and WEBP are two **compressed** formats, so you can manually set the compression **quality** with a slider that appears when you choose one of these formats in the dropdown menu.&#x20;

For both, the **best quality** (100%) makes a **larger file size**. The best compromise is to set the quality somewhere from 75% to 90%, so the file size will be **significantly smaller** but there won't be too many **artifacts**.&#x20;

<figure><img src="/files/GU50dkEiZwldNnjHM8EJ" alt=""><figcaption><p>The quality slider for JPEG and WEBP</p></figcaption></figure>

<p align="center"></p>

<p align="center"></p>

<p align="center"><em><strong>Rough file size comparison for a 5000x5000 px map</strong></em></p>

| Compression Quality |  JPEG  |  WEBP  |
| :-----------------: | :----: | :----: |
| 100% (best quality) |  11 MB | 7,6 MB |
|         90%         | 4,4 MB | 2,8 MB |
|         70%         | 2,4 MB | 1,6 MB |
|         50%         | 1,7 MB | 1,2 MB |
|         30%         | 1,3 MB | 0,9 MB |
|         10%         | 0,7 MB | 0,6 MB |
|  0% (worst quality) | 0,3 MB | 0,3 MB |

<p align="center"><strong>Visual comparison between various compression qualities</strong></p>

<figure><img src="/files/jm4xtVCOeleRm2l0frcn" alt=""><figcaption><p>Visual artifacts<br>(custom assets: White Fox Works)</p></figcaption></figure>

## MAP SIZE AND RESOLUTION

As you can imagine, a **larger map** will produce a **bigger exported file**, so that might be something you need to consider when you're creating your map.&#x20;

However, you can adjust the **PPI** (Pixels Per Inch) of the exported file. To make it simple, it's the amount of pixels you will have along the side of one grid square.&#x20;

* The default PPI is 256, meaning you won't lose any detail with that setting.&#x20;
* Going above will stretch the map but will just make the image file blurrier when you look at it at 100% zoom (you can't go over 300 PPI). It won't add details or sharpness.
* Reducing the PPI will shrink the map, you will have a smaller resolution and a smaller file size, but you will lose more and more details the smaller you go.&#x20;

Enter the PPI you want to use into the **Grid PPI** box and press enter. You'll see the size output update under it.

<figure><img src="/files/U7bw8uRPlgWVMiSigjq0" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
**Pro Tip:** *if you're playing online, most VTTs won't allow files over 16384 x 16384 px. That number might also depend on the GPU used to display the map online (yours and your players').*
{% endhint %}

You can also choose a defined PPI in the Grid Presets dropdown menu.

<figure><img src="/files/JNj6vcm93lw0Bud4sVHy" alt=""><figcaption></figcaption></figure>

<p align="center"><strong>Examples of various PPI</strong></p>

<figure><img src="/files/P3MtxVm57d0KMiplYjcq" alt=""><figcaption><p>Image size and file size differences</p></figcaption></figure>

<figure><img src="/files/Q7WNdumdPMfWmTQBINPZ" alt=""><figcaption><p>Quality drop with lower PPI (default assets)</p></figcaption></figure>

<figure><img src="/files/7w4euMuCnHGSDTic4b3z" alt=""><figcaption><p>Quality drop with lower PPI<br>(custom assets: White Fox Works)</p></figcaption></figure>

{% hint style="success" %}
**Pro Tip:** *You can crop a part of your map that you don't want with the* <kbd><mark style="color:blue;">**Crop**<mark style="color:blue;"></kbd> *Button.*\
*You can also reset it to the full map by clicking on* <kbd><mark style="color:blue;">**Reset Crop**<mark style="color:blue;"></kbd>*.*

<p align="center"><img src="/files/ISPZxkWia85qCZWsjfXe" alt=""></p>
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dungeondraft-encyclopaedia.gitbook.io/guide/final-steps/exporting-your-map/quality-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
