Support raster inputs and JPG output in image-processing#318
Merged
Conversation
- Accept svg, png, jpg, jpeg, and webp inputs through convert --in. - Add rust-backed raster decode and encode paths for png, webp, and jpg outputs. - Flatten alpha onto white for jpg output and report source input metadata. - Expand image-processing tests and isolate codex-cli exec tests from ephemeral env leakage.
CoverageTotal line coverage: 86.46% (60163/69586 lines hit). |
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.
Support raster inputs and JPG output in image-processing
Summary
This PR expands
image-processing convertfrom an SVG-only flow into a general conversion path that acceptssvg,png,jpg,jpeg, andwebpinputs and emitspng,webp, orjpgoutputs with the same JSON/report contract style already used by the CLI. It also hardenscodex-clicommand-shape tests so workspace CI is not affected by a leakedCODEX_CLI_EPHEMERAL_ENABLEDenvironment variable.Changes
convert --from-svgcontract withconvert --in <path>and validate a single input path plus--to png|webp|jpg.image-processingJSON/report metadata to include source input path and input format for both convert andsvg-validateflows.png,webp, andjpgoutputs, plus explicitjpg/webpinput cases and contract edge cases.image-processingsurface.codex-cliexec/template/runtime tests fromCODEX_CLI_EPHEMERAL_ENABLEDleakage so required checks pass consistently in CI.Testing
./.agents/skills/nils-cli-verify-required-checks/scripts/nils-cli-verify-required-checks.sh(pass)cargo llvm-cov nextest --profile ci --workspace --lcov --output-path target/coverage/lcov.info --fail-under-lines 85(pass)scripts/ci/coverage-summary.sh target/coverage/lcov.info(86.49%total line coverage)Risk / Notes
image-processing convert --from-svgcallers must migrate toconvert --in; README and runbook examples are updated in this PR.--to jpgnow flattens transparent pixels onto white by design, and the summary metadata reportsbackground: whitefor that mode.codex-clitest changes are harness-only; they do not change runtime behavior, only remove external env sensitivity.