Skip to content

Conversation

@grynspan
Copy link
Contributor

@grynspan grynspan commented Nov 6, 2025

On Apple platforms, you can declare file types (uniform type identifiers, or "UTTypes" for short) that conform to existing types. That means a developer could conceivably say "save this image as .florb" where .florb represents a type that conforms to, but is not identical to, .jpeg.

This PR ensures that if a developer passes such a type, we handle it by passing the supported base type to Image I/O. And, if the developer passes some image format that is unsupported by Image I/O, we can throw an error with a more specific diagnostic than just "it failed."

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

On Apple platforms, you can declare file types (uniform type identifiers, or
"UTTypes" for short) that conform to existing types. That means a developer
could conceivably say "save this image as .florb" where `.florb` represents a
type that conforms to, but is not identical to, `.jpeg`.

This PR ensures that if a developer passes such a type, we handle it by passing
the supported base type to Image I/O. And, if the developer passes some image
format that is unsupported by Image I/O, we can throw an error with a more
specific diagnostic than just "it failed."
@grynspan grynspan added this to the Swift 6.3.0 milestone Nov 6, 2025
@grynspan grynspan self-assigned this Nov 6, 2025
@grynspan grynspan added enhancement New feature or request darwin 🍎 macOS, iOS, watchOS, tvOS, and visionOS support image-attachments 📸 Work related to image attachments labels Nov 6, 2025
@jakepetroules
Copy link

I think you need to rebase the PR to pick up the GItHub Actions fixes for Amazon Linux 2 + Android. It appears re-running a failing job will still use the commit of the swiftlang/github-workflows repository at the time the PR was last pushed, rather than when the job was last run.

@grynspan grynspan merged commit 6a52f30 into main Nov 7, 2025
27 checks passed
@grynspan grynspan deleted the jgrynspan/derived-image-types branch November 7, 2025 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

darwin 🍎 macOS, iOS, watchOS, tvOS, and visionOS support enhancement New feature or request image-attachments 📸 Work related to image attachments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants