fix(deps): update dependencies - #27
Merged
Merged
Conversation
Contributor
Author
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
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.
This PR contains the following updates:
v0.20.0→v0.21.0v0.297.0→v0.300.0Release Notes
go-pdfkit/render (github.com/go-pdfkit/render)
v0.21.0: — a subsampled JPEG now looks like everyone else renders itCompare Source
Go's
image/jpegreplicates a subsampled chroma sample across the pixels it covers. libjpeg interpolates — nearer sample ×3, further ×1 each way, its "fancy upsampling", on by default and never turned off by poppler. Every PDF viewer built on libjpeg therefore shows a 4:2:0 JPEG slightly differently from how we did, and the gap is not small: a median of 27 levels on the corpus, reaching 127.rendernow reproduces libjpeg's filter, and only where libjpeg applies it — 4:2:0, 4:2:2 and 4:4:0 above two chroma samples wide. 4:1:1 and 4:1:0 go through libjpeg'sint_upsample, which replicates, and are asserted byte-for-byte unchanged.Why this was worth changing
Neither behaviour violates ISO/IEC 10918, and pdf.js replicates too. This is a deliberate choice to agree with the renderer a reader is most likely to have seen the document in, rather than to be defensible in isolation.
It was found by measurement and diagnosed before being fixed. A per-channel comparison across 23 corpus populations and 3280 documents put
JPXDecodeat 99.2% agreement with poppler andDCTDecodeat 34.0% — so the tolerance was not too tight in general, something was specifically wrong with JPEG.The judge was cleared before our code was blamed, which matters because poppler's extraction tool has twice been the wrong side in this project: poppler has one JPEG path shared by
pdfimagesandpdftoppm;pdftoppmsampled at block centres is bit-identical topdfimages -png; andpdfimages -pngmatchesdjpegbyte for byte while ours matcheddjpeg -nosmooth. The disagreement is that one option.The decomposition then showed it is only this. Of 559 corpus JPEGs, greyscale — which has no chroma to reconstruct — differs by at most 1 level, and 4:4:4 by at most 4. One level is exactly what ISO/IEC 10918-2 allows a conformant decoder, so the Huffman decode, the dequantiser and the IDCT were never in question.
Effect
On
us-dol/CA-10.pdf: 56 levels on 48.3% of pixels becomes 3 levels on 0.018%.Correction, 2026-08-31. This section first claimed corpus-wide agreement with poppler rising from 61.2% to 99.3%. That was wrong: the figure was
DCTDecodealone, at a magnitude gate of 4, over a denominator that admitted colour-converted pictures — and the 61.2% has no source in any landed record. Measured since by the conformance baseline, at a gate of 2 and with that denominator corrected:DCTDecode34.0% → 42.8% agreement, holding the bucketing rule fixed.Neither of those is this release in isolation:
go-gfx/gfxmoved v0.16.0 → v0.19.0 over the same interval. The cleanest number attributable to this change alone is theuk-govukpopulation, 92.3% → 100.0%, which moved no picture between buckets.And the agreement rate understates the change, because a gate is a cliff and this was a change of magnitude. The per-population peak medians for directly compared JPEG fell from
16 18 23 23 26 31 34 47 50 58 62to3 3 3 3 3 3 4 4 4 4— most pictures crossed the gate at once, which a pass/fail rate cannot show. Three populations stayed gross and are not chroma reconstruction.100% statement coverage,
go vetand-raceclean, nine cross-compile targets, CGO-free.go-widgets/toolkit (github.com/go-widgets/toolkit)
v0.300.0Compare Source
v0.299.0Compare Source
v0.298.0Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate CLI.