Repository navigation
fix(raster): JPEG refusals name their values, orientation calls documented, guards pinned - #681
Merged
Merged
Conversation
…ented, guards pinned
Contributor
|
Fast lane: merged into dev (181 lines, 9 files, Fast-Check marker). |
prakashUXtech
added a commit
that referenced
this pull request
Oct 19, 2026
prakashUXtech
added a commit
that referenced
this pull request
Oct 19, 2026
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.
Anatomy round 3, IC-jpeg, batch b1. This PR fixes the eight findings from the JPEG review. It is part of #562.
What and why
JPEGInfo.orientationnow lists thePixelBuffercalls for each EXIF value 1...8:flipped(.horizontal),rotated(.degrees180),flipped(.vertical), transpose =rotated(.degrees90)thenflipped(.horizontal),rotated(.degrees90), transverse =rotated(.degrees270)thenflipped(.horizontal), androtated(.degrees270). Proved byJPEGReadTests.orientationCallsTurnUpright: it applies each documented call to a 2x3 frame and compares the result with the EXIF definition.CodecError.unsupportedcovers. Its doc now says it covers both a file feature the codec does not read or write and an encoder option the caller asked for.JPEG.writesays that a quality outside 1...100 is a caller argument. This change is docs only.pixels()now splits "no SOF" from the sRGB transfer failure. Proved byJPEGReadGuardTests.sofRefusalsPrintValues,blockBoundNamedandJPEGReadTests.damagedThrows.JPEGReadGuardTests.widthZero: both info and read throwdamagedcontaining "width 0". Mutation entry: CoreRaster.JPEG "SOF width 0".JPEGReadTests.damagedThrows. Mutation entry: "SOS no longer refuses a component without its DQT".JPEGReadGuardTests.exifOrientationWrongType: an Orientation entry typed ASCII or LONG reads as 1, and a SHORT control reads as 6. The fixtureexifgains atype:argument. Mutation entry: "EXIF Orientation type check is dropped".JPEGReadGuardTests.badTableNamesItInHex. Mutation entry: "DHT of over 256 values".segmentLengthUnderTwo), SOF Tq over 3, 4-component SOF, progressive AC-before-DC, and a progressive band past 63. The band case also gets a message assertion inJPEGReadTests.progressiveScanChecks.seededSOFFieldsThrowrandomises SOF fields with seeded SplitMix64 and checks that every read throws aCodecErroror decodes.New byte fixtures are built as lists of parts, as in #665, so the macOS type checker can handle them.
No platform or library API is new here: only Swift stdlib basics already used in these files. The docs MCP tools were not needed for that.
Gate
scripts/ciprintedCI: PASSon the head below, after rebasing on dev.scripts/mutate --run --changed-since origin/devcaught 33/33.Belt-Lead: act-1a15227fc25-tkce
Feature: image-codecs
Slice: IC-jpeg
Mutate: 33/33 CoreRaster.JPEG, CoreRaster.JPEGDecode, CoreRaster.JPEGProgressive, CoreRaster.JPEGWrite, CoreRaster.StackXML
Fast-Check: pass
Head: 468358b