foundryvtt / pf2e

A community contributed game system for Pathfinder Second Edition.
https://foundryvtt.com/packages/pf2e
Apache License 2.0
416 stars 349 forks source link

Add option to auto-convert images (especially scene maps) to webp #16104

Closed ThiefMaster closed 2 months ago

ThiefMaster commented 2 months ago

Some DMs create huge maps for their scenes which is of course great for details and zooming in, but not so great for those who are not lucky enough to have a gigabit internet connection at home.

The WEBP format is excellent at compression images without a visible loss in quality (even without lossless mode). For example, I was able to 11176x8128 PNG file (which is an actual map someone uses in their campaign) from 122 MB down to 9.3 MB (or 70 MB lossless).

The only drawback is that converting huge images takes its time - on a few-year-old NUC with a i5-8259U CPU it took 35s for lossy and 1 min for lossless encoding of that image mentioned above. So it would almost certainly require a progress/activity indicator, or possibly client-side encoding (according to a quick search people already compiled cwebp to WASM, I have not looked into its performance though) to avoid putting high load on servers (especially shared ones hosting multiple Foundry instances)

ammalagonc commented 2 months ago

Hello,

This would be a core Foundry request.

Please submit this request here - https://github.com/foundryvtt/foundryvtt/issues.

Thanks!

ThiefMaster commented 2 months ago

oops, that's where I intended to open this issue. not sure how I ended up in the pf2e repo... can you transfer it to that repo (if you have the necessary privileges)? otherwise I'll just reopen it over there

ammalagonc commented 2 months ago

I don't have those privileges :|

Probably for the best :P

ThiefMaster commented 2 months ago

Added it as a comment to this issue which is related: https://github.com/foundryvtt/foundryvtt/issues/4216#issuecomment-2295323792