Add progressive_blur support - #88
Merged
Merged
Conversation
Adds the `progressive_blur` (`pbl`) option. It is documented as a processing option only, so it is not exposed for image info URLs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G8Aa3xeVUCaxKtQJDzZhMo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #83
Aligns the library with the imgproxy docs update, which added one new URL option (imgproxy Pro):
When
sigmais greater than0, imgproxy applies a progressive Gaussian blur that transitions from no blur at thestartposition to the specifiedsigmaat thestopposition.sigma— size of the mask used for the maximum blur;0disables the effectdirection— (optional)down(default),up,right,left, or an angle in degreesstart,stop— (optional) floats between0and1, defaulting to0.0and1.0Scope
progressive_bluris documented only as a processing option — it does not appear under## Info optionsin the image-info docs — so it lives insrc/options/+src/types/and is deliberately not wired intogenerateImageInfoUrl.Implementation notes
gradient, which shares the exactdirection/start/stopsemantics: samecorrectDirectionvalue set, same trailing-:trimming of omitted optional args.gradient: optional args are validated and rendered with!== undefined/??rather than truthiness. Ingradient,start: 0silently skips validation and renders as empty; herestart: 0validates and renders explicitly (pbl:10::0:0.85). Positionally both forms are equivalent to imgproxy, but the explicit form is what the caller asked for. Happy to switch to strictgradientparity if you'd rather keep the two identical.**PRO feature**in the typedocs on both the value interface and the*OptionsPartialinterface.Not included
The rest of the docs diff is server configuration with no representation in this package:
IMGPROXY_MAX_ML_CONCURRENCY(new Machine learning section) andIMGPROXY_S3_ACCESS_POINTSplus the S3 access points guide.Verification
tsc --noEmitclean,eslint src testscleanvitest run→ 98 files / 1117 tests passing (22 new)generateUrl(..., { width: 10, progressive_blur: { sigma: 10, direction: "right", start: 0.2, stop: 0.8 } })→/pbl:10:right:0.2:0.8/w:10/plain/img;{ pbl: { sigma: 5 } }→/pbl:5/plain/imgRelation to other open PRs
Independent — branched from
main, touches different files than #85 (bypass_cache/cache_tags) and #86 (video_thumbnail_keyframes), apart fromsrc/options/index.tsandsrc/types/index.ts, where insertions are in different regions.🤖 Generated with Claude Code
https://claude.ai/code/session_01G8Aa3xeVUCaxKtQJDzZhMo