Closed sbesson closed 2 years ago
Heh. I was hesitant to start this conversation but since you brought it up, I am also not convinced by the --min-size
terminology which is confusing as proven by your example. To be precise, the parameter actually specifies a maximum allowed size rather than a minimal value but it applies to the smallest resolution.
If we were to agree on the thumbnail nomenclature, I would propose something along the lines of --max-thumbnail-size
. Should we brainstorm for additional terms before we introduce the option in the command-line?
I'm fine with --max-thumbnail-size
. --max-apex-size
is the only other option that comes to mind (to avoid confusion between the smallest resolution and any separate thumbnail image), but that's probably not any clearer overall.
My inclination is to call this --target-min-size
or similar and refer to what the "target" is explicitly in the documentation. As mentioned this is a desired minimum size of longest side of the highest level of the pyramid rather than a hard limit.
75b2863d274e01c5c41f7145b9674e6ad94d93d7 conceptually looks great to me. Will defer to @melissalinkert for anything else here.
Looks good to me too, thanks!
The current implementation stops downsampling the image as soon as both X and Y dimensions are smaller than 256. In some cases, we want this cut-off values to be configurable.
This commit makes the minimal change by keeping the default as 256 but allowing to override it via command-line option.
Tests are also added to cover the min-size arguments with various scenarios