Replies: 1 comment 1 reply
-
Format wise I like how the second option looks better, it seems more expandable in the future. I do hate breaking reverse compatibility, though I'm not sure renaming formatQuality is a huge change... (does anyone have an opinion on that?) I don't see us moving away from sharp any time soon, but if we did the options can always be adjusted as long as they are documented. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm considering making a PR to expose some PNG configuration options from
sharp
, the library used for image I/O. Specifically, I'm interested in adding the option to make paletted/indexed PNGs, as these are about 1/3 the size with no reduction in quality for my particular style that only uses a few colors, and it seems like such an option could be generally useful for others to at least evaluate for their tilesets/styles. While I'm at it, it would probably be good to expose other knobs related to paletted PNGs like the number of colors to be used for the palette (if quantization is required) and theeffort
/quality
parameters.I have a couple questions I'd like to discuss and reach consensus on before I change the code:
sharp
in the config file? For example, theeffort
parameter, or at least the interpretation of it, is something that other image libraries might not have or might treat differently. Exposingeffort
in the configuration file and documenting that it does anything in particular would tietileserver-gl
to usingsharp
, or its removal would be a breaking change to the configuration file format.formatQuality
, but this is structured as a single number for supported formats, as opposed to settings that apply to a specific format.Perhaps since
formatQuality
as a top-level option only has impact on JPEG and WebP, it would be okay to add another top-level parameter that only has impact on PNG? For example:I could also see it being desirable from a conceptual-integrity perspective to have all image format options centralized under one top-level setting, though this would be a breaking change to the configuration schema if we removed
formatQuality
. For example:Thoughts on which of these (or any other) schemas would be most appropriate to represent settings that apply only to PNG output?
Beta Was this translation helpful? Give feedback.
All reactions