moo-man / FVTT-DD-Import

Allows Importing Dungeondraft map files into FoundryVTT
MIT License
59 stars 27 forks source link

Option to Allow Conversion Quality? #111

Closed Volksters closed 10 months ago

Volksters commented 2 years ago

At the moment there is no way to set the quality when it converts to .webp, I would like to propose a percentage of quality, like how they done it in DungeonDraft, for example.

hogart commented 1 year ago

The default quality for WebP images in Canvas.toBlob method is 0.8, if this SO answer to be believed (but it seems close enough), and the compression artefacts start to be quite noticeable.

With conversion With conversion

Without conversion Without

The fast and dirty fix is to supply a higher number (I personally prefer 0.9, it's a nice trade-off with barely visible compression) in line 253.