Say when a /Decode array shaped a picture - #32
Merged
Conversation
A picture and the same picture as another tool EXTRACTS it can be exact complements of each other for a reason that is not a disagreement. /Decode maps the stored samples onto the range the colour space wants; this applies it, as a viewer must, and pdfimages writes the samples as stored. On a one-bit mask a /Decode of [1 0] therefore inverts every pixel. Judged against pdfimages over a corpus of scanned medical pages, 8 of 23 JBIG2 masks differed at exactly 1.0000 — every pixel — and the pages they are on differ from poppler's rendering by a median of 0.0000. Nothing was wrong except the comparison. Of the 248 JBIG2 masks on those first pages, 22 carry /Decode [1 0]. All 22 are soft masks; not one of the 194 stencils carries one. So a picture now says whether an array shaped it, which is the one thing a comparison needs in order to tell that case apart from a real one. 100% statement coverage, go vet and -race clean, nine cross-compile targets.
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.
A picture and the same picture as another tool extracts it can be exact complements of each other for a reason that is not a disagreement.
/Decodemaps the stored samples onto the range the colour space wants; this applies it, as a viewer must, andpdfimageswrites the samples as stored.On a one-bit mask a
/Decodeof[1 0]therefore inverts every pixel. Judged againstpdfimagesover a corpus of scanned medical pages, 8 of 23 JBIG2 masks differed at exactly 1.0000 — every pixel — and the pages they are on differ from poppler's rendering by a median of 0.0000. Nothing was wrong except the comparison.Of the 248 JBIG2 masks on those first pages, 22 carry
/Decode [1 0]. All 22 are soft masks; not one of the 194 stencils carries one.So a picture now says whether an array shaped it — the one thing a comparison needs in order to tell that case apart from a real one.
100% statement coverage,
go vetand-raceclean, nine cross-compile targets.