Repository navigation
feat: add --quality presets and --dpi flag for png output - #28
RilusMahmud wants to merge 1 commit into
Conversation
|
Thanks for raising this, will review @RilusMahmud |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
I think there should also be an option 'low' – especially for testing/trying out/debugging having a quicker version would help |
|
Feels like the max dimension constraints, when using the width and length flags, could be updated as well since some of the presets surpass their limits maptoposter/create_map_poster.py Line 977 in 6d03069 It'd be nice to have an extra |
Replace the figsize-based quality presets with DPI-only presets that layer on the existing --width/--height flags, so presets no longer exceed the 20-inch dimension cap. Adds a low (150 DPI) preset for quick test renders and an explicit --dpi override; the two are mutually exclusive. DPI is only applied to png, matching upstream's svg/pdf handling. Documents the flags in the README and adds cases to test/all_variations.sh.
40abba1 to
a4733ef
Compare
|
Conflicts have been resolved. |
|
Rebased and reworked on current main. Presets are now DPI-only and layer on |
Rebuilt on current `main` (the original figsize-based presets conflicted with the later `--width`/`--height` flags and their 20-inch cap).
Adds DPI-only quality control that layers on `--width`/`--height`:
Addresses review comments: `low` preset for quick test renders (@Nudin), presets no longer exceed the dimension cap and `--dpi` is available for granular control with `-W`/`-H` (@necromeo).
Verified: flake8 + mypy clean (same invocation as `pr-checks.yml`); real renders checked with `sips`: `-q low` at 12x16 in -> ~1800x2400 px, `--dpi 600 -W 22` clamps to 20 in -> ~12000 px wide, `-q ultra -f svg` renders without applying DPI.