Windows image attachments#1245
Merged
Merged
Conversation
Contributor
Author
|
Proper support for GDI+ is blocked by swiftlang/swift#83408. |
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
@swift-ci test Windows |
…usImage so that not all attachable images are forced to be UnsafeMutablePointer
briancroom
reviewed
Jul 30, 2025
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
@swift-ci test |
…an be referenced directly from Swift
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
@swift-ci test Linux |
Contributor
Author
|
@swift-ci test macOS |
… and letting the library call delete
…he documentation)
Contributor
Author
|
@swift-ci test |
stmontgomery
approved these changes
Jul 31, 2025
Contributor
|
I don't see Windows CI listed here, any idea why that would be missing? 🤔 |
Contributor
Author
|
@swift-ci test Windows |
briancroom
approved these changes
Jul 31, 2025
…g/swift-testing into jgrynspan/gdiplus-image-overlay
Contributor
Author
|
@swift-ci test |
Contributor
Author
|
@swift-ci test Linux |
Contributor
Author
|
@swift-ci test macOS |
compnerd
approved these changes
Jul 31, 2025
| public init?(pathExtension: String, encodingQuality: Float = 1.0) { | ||
| let pathExtension = pathExtension.drop { $0 == "." } | ||
| let clsid = Self._computeCLSID(forPathExtension: String(pathExtension)) | ||
| if let clsid { |
Contributor
Author
There was a problem hiding this comment.
Doesn't make a huge difference. I can change it if you feel strongly.
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.
Add support for attaching images on Windows if they are instances of types we can convert to
Gdiplus::Image. Due to current limitations on Swift/C++ interop, it's not possible to attach aGdiplus::Imagedirectly (they get brought in as the nefariousOpaquePointertype) but you can attach anHBITMAPorHICON.Direct support for WIC and Direct2D types first requires Swift support for COM interfaces/types.
Checklist: