Skip to content

Commit 21553ea

Browse files
committed
Update NNNN-image-attachments-in-swift-testing-windows.md
Add pitch link
1 parent b30b24a commit 21553ea

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

proposals/testing/NNNN-image-attachments-in-swift-testing-windows.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Review Manager: TBD
66
* Status: **Awaiting review**
77
* Implementation: [swiftlang/swift-testing#1245](https://github.com/swiftlang/swift-testing/pull/1245), [swiftlang/swift-testing#1254](https://github.com/swiftlang/swift-testing/pull/1254), _et al_.
8-
* Review: ([pitch](https://forums.swift.org/...))
8+
* Review: ([pitch](https://forums.swift.org/t/pitch-image-attachments-in-swift-testing-windows/81871))
99

1010
## Introduction
1111

@@ -233,28 +233,31 @@ Conveniences over those COM classes' `CLSID` values are provided:
233233

234234
```swift
235235
extension AttachableImageFormat {
236-
/// The `CLSID` value corresponding to the WIC image encoder for this image
237-
/// format.
238-
public var clsid: CLSID { get }
236+
/// The `CLSID` value of the Windows Imaging Component (WIC) encoder class
237+
/// that corresponds to this image format.
238+
///
239+
/// For example, if this image format equals ``png``, the value of this
240+
/// property equals [`CLSID_WICPngEncoder`](https://learn.microsoft.com/en-us/windows/win32/wic/-wic-guids-clsids#wic-guids-and-clsids).
241+
public var encoderCLSID: CLSID { get }
239242

240-
/// Construct an instance of this type with the given `CLSID` value and
241-
/// encoding quality.
243+
/// Construct an instance of this type with the `CLSID` value of a Windows
244+
/// Imaging Component (WIC) encoder class and the desired encoding quality.
242245
///
243246
/// - Parameters:
244-
/// - clsid: The `CLSID` value corresponding to a WIC image encoder to use
245-
/// when encoding images.
247+
/// - encoderCLSID: The `CLSID` value of the Windows Imaging Component
248+
/// encoder class to use when encoding images.
246249
/// - encodingQuality: The encoding quality to use when encoding images. For
247250
/// the lowest supported quality, pass `0.0`. For the highest supported
248251
/// quality, pass `1.0`.
249252
///
250253
/// If the target image encoder does not support variable-quality encoding,
251254
/// the value of the `encodingQuality` argument is ignored.
252255
///
253-
/// If `clsid` does not represent an image encoder type supported by WIC, the
254-
/// result is undefined. For a list of image encoders supported by WIC, see
255-
/// the documentation for the [`IWICBitmapEncoder`](https://learn.microsoft.com/en-us/windows/win32/api/wincodec/nn-wincodec-iwicbitmapencoder)
256+
/// If `clsid` does not represent an image encoder class supported by WIC, the
257+
/// result is undefined. For a list of image encoder classes supported by WIC,
258+
/// see the documentation for the [`IWICBitmapEncoder`](https://learn.microsoft.com/en-us/windows/win32/api/wincodec/nn-wincodec-iwicbitmapencoder)
256259
/// class.
257-
public init(_ clsid: CLSID, encodingQuality: Float = 1.0)
260+
public init(encoderCLSID: CLSID, encodingQuality: Float = 1.0)
258261
}
259262
```
260263

@@ -337,10 +340,17 @@ None needed.
337340
`var attachableIWICBitmapSource: IWICBitmapSource { get throws }`) as it would
338341
be able to participate in Swift's automatic reference counting.
339342

343+
The Swift team is tracking COM interop with [swiftlang/swift#84056](https://github.com/swiftlang/swift/issues/84056).
344+
340345
- Adding support for managed (.NET or C#) image types. Support for managed types
341346
on Windows would first require a new Swift/.NET or Swift/C# interop feature
342347
and is therefore beyond the scope of this proposal.
343348

349+
- Adding support for WinRT image types. WinRT is a thin wrapper around COM and
350+
has C++ and .NET projections, neither of which are readily accessible from
351+
Swift. It may be possible to add support for WinRT image types if COM interop
352+
is implemented.
353+
344354
- Adding support for other platforms. See [ST-0014](https://github.com/swiftlang/swift-evolution/blob/main/proposals/testing/0014-image-attachments-in-swift-testing-apple-platforms.md#future-directions)
345355
for further discussion about supporting additional platforms.
346356

0 commit comments

Comments
 (0)