Build Information
Successful build of WICompress, reference main (90f058), with Swift 6.3 for macOS (SPM) on 11 Aug 2026 23:55:04 UTC.
Swift 6 data race errors: 0
Build Command
env DEVELOPER_DIR=/Applications/Xcode-26.4.0.app xcrun swift build --arch arm64Build Log
========================================
RunAll
========================================
Builder version: undefined version: run 'make version' to update
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Weixi779/WICompress.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Weixi779/WICompress
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 90f0583 docs: refresh Luban 2 README previews
Cloned https://github.com/Weixi779/WICompress.git
Revision (git rev-parse @):
90f05839bb4e58b59bea8cac2819dbd2bcea8be5
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/Weixi779/WICompress.git at main
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"traits": [
"default"
],
"dependencies": [
{
"identity": "wicompress",
"name": "WICompress",
"url": "https://github.com/Weixi779/WICompress.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/WICompress",
"traits": [
"default"
],
"dependencies": [
]
}
]
}
Fetching https://github.com/Weixi779/WICompress.git
[1/1873] Fetching wicompress
Fetched https://github.com/Weixi779/WICompress.git from cache (2.58s)
Creating working copy for https://github.com/Weixi779/WICompress.git
Working copy of https://github.com/Weixi779/WICompress.git resolved at main (90f0583)
warning: '.resolve-product-dependencies': dependency 'wicompress' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.3
Building package at path: $PWD
https://github.com/Weixi779/WICompress.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-26.4.0.app xcrun swift build --arch arm64
Building for debugging...
[0/17] Write sources
[7/17] Write WICompressDocAssetGenerator-entitlement.plist
[7/17] Write TargetCompressionBenchmark-entitlement.plist
[7/17] Write sources
[10/17] Write swift-version--6988338F2F200930.txt
[12/24] Compiling WIImageDomain Rect.swift
[13/24] Compiling WIImageDomain ImageFormat.swift
[14/24] Compiling WIImageDomain WIImageOrientation.swift
[15/24] Compiling WIImageDomain ImageMetadataOptions.swift
[16/24] Compiling WIImageDomain WIColor.swift
[17/24] Compiling WIImageDomain WIPixelSize.swift
[18/24] Emitting module WIImageDomain
[19/49] Compiling WIImageRendering ImageRenderingError.swift
[20/49] Compiling WIImageRendering ImageRenderer.swift
[21/49] Compiling WICompressDomain WICompressionSizing.swift
[22/50] Compiling WICompressDomain WICompressError.swift
[23/50] Compiling WICompressDomain WICompressionTarget.swift
[24/50] Compiling WICompressDomain WIImageProcess.swift
[25/50] Compiling WIImageRendering ImageRenderRequest.swift
[26/50] Emitting module WIImageRendering
[27/50] Compiling WIImageRendering BitmapCanvas.swift
[28/50] Compiling WICompressDomain WIImageOutput.swift
[29/50] Compiling WICompressDomain WIImageCrop.swift
[30/50] Compiling WICompressDomain WIImageRepresentation.swift
[31/50] Compiling WICompressDomain WIImageResizing.swift
[32/50] Compiling WIImageIO ImageMetadata.swift
[33/50] Compiling WIImageIO ImageTranscoding.swift
[34/50] Compiling WIImageIO ImageReader.swift
[35/50] Compiling WIImageIO ImageIOError.swift
[36/50] Compiling WIImageIO ImageFrame.swift
[37/50] Compiling WIImageIO ImageEncoding.swift
[38/50] Compiling WIImageIO ImageDecoding.swift
[39/50] Emitting module WIImageIO
[40/50] Compiling WIImageIO ImageInspection.swift
[41/50] Emitting module WICompressDomain
[42/50] Compiling WICompressDomain Double+Clamped.swift
[43/50] Compiling WICompressDomain WILuban.swift
[44/50] Compiling WICompressDomain WIResult.swift
[45/60] Compiling WICompressExecution TargetCandidate.swift
[46/61] Compiling WICompressExecution TargetSearch.swift
[47/61] Compiling WICompressExecution ImagePipeline+Target.swift
[48/61] Compiling WICompressExecution ImagePipeline+Output.swift
[49/61] Compiling WICompressExecution ImagePipeline+Process.swift
[50/61] Compiling WICompressExecution WIImageProcess+Geometry.swift
[51/61] Emitting module WICompressExecution
[52/61] Compiling WICompressExecution WICompressionSizing+Geometry.swift
[53/61] Compiling WICompressExecution ImageCropGeometry.swift
[54/61] Compiling WICompressExecution ImagePipeline.swift
[55/61] Compiling WICompressExecution TargetSizeEstimation.swift
[56/63] Emitting module WICompress
[57/63] Compiling WICompress WICompressor.swift
[58/75] Compiling WICompressDocAssetGenerator generate-doc-assets.swift
[59/75] Emitting module WICompressDocAssetGenerator
[59/75] Write Objects.LinkFileList
[60/75] Linking WICompressDocAssetGenerator
[61/75] Applying WICompressDocAssetGenerator
[63/75] Compiling TargetCompressionBenchmark main.swift
[64/75] Compiling TargetCompressionBenchmark Data+SHA256.swift
[65/75] Compiling TargetCompressionBenchmark BenchmarkRunner.swift
[66/75] Compiling TargetCompressionBenchmark BenchmarkReport.swift
[67/75] Compiling TargetCompressionBenchmark BenchmarkMetadataValidation.swift
[68/75] Compiling TargetCompressionBenchmark BenchmarkCorpus.swift
[69/75] Emitting module TargetCompressionBenchmark
[70/75] Compiling TargetCompressionBenchmark BenchmarkQuality.swift
[71/75] Compiling TargetCompressionBenchmark BenchmarkComparison.swift
[72/75] Compiling TargetCompressionBenchmark BenchmarkConfiguration.swift
[72/75] Write Objects.LinkFileList
[73/75] Linking TargetCompressionBenchmark
[74/75] Applying TargetCompressionBenchmark
Build complete! (10.69s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "WICompress",
"name" : "WICompress",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "14.0"
},
{
"name" : "macos",
"version" : "11.0"
},
{
"name" : "maccatalyst",
"version" : "14.0"
},
{
"name" : "tvos",
"version" : "14.0"
},
{
"name" : "watchos",
"version" : "7.0"
},
{
"name" : "visionos",
"version" : "1.0"
}
],
"products" : [
{
"name" : "WICompress",
"targets" : [
"WICompress"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "WIImageIO",
"targets" : [
"WIImageIO"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "WICompressDocAssetGenerator",
"targets" : [
"WICompressDocAssetGenerator"
],
"type" : {
"executable" : null
}
},
{
"name" : "TargetCompressionBenchmark",
"targets" : [
"TargetCompressionBenchmark"
],
"type" : {
"executable" : null
}
}
],
"swift_languages_versions" : [
"6"
],
"targets" : [
{
"c99name" : "WIImageRenderingTests",
"module_type" : "SwiftTarget",
"name" : "WIImageRenderingTests",
"path" : "Tests/WIImageRenderingTests",
"sources" : [
"WIImageRenderingTests.swift"
],
"target_dependencies" : [
"WIImageDomain",
"WIImageRendering"
],
"type" : "test"
},
{
"c99name" : "WIImageRendering",
"module_type" : "SwiftTarget",
"name" : "WIImageRendering",
"path" : "Sources/image/rendering",
"product_memberships" : [
"WICompress",
"WICompressDocAssetGenerator",
"TargetCompressionBenchmark"
],
"sources" : [
"BitmapCanvas.swift",
"ImageRenderRequest.swift",
"ImageRenderer.swift",
"ImageRenderingError.swift"
],
"target_dependencies" : [
"WIImageDomain"
],
"type" : "library"
},
{
"c99name" : "WIImageIOTests",
"module_type" : "SwiftTarget",
"name" : "WIImageIOTests",
"path" : "Tests/WIImageIOTests",
"sources" : [
"ImageFormatTests.swift",
"WIImageIOPublicSurfaceTests.swift",
"WIImageOperationsTests.swift"
],
"target_dependencies" : [
"WIImageIO"
],
"type" : "test"
},
{
"c99name" : "WIImageIO",
"module_type" : "SwiftTarget",
"name" : "WIImageIO",
"path" : "Sources/image/io",
"product_memberships" : [
"WICompress",
"WIImageIO",
"WICompressDocAssetGenerator",
"TargetCompressionBenchmark"
],
"sources" : [
"ImageDecoding.swift",
"ImageEncoding.swift",
"ImageFrame.swift",
"ImageIOError.swift",
"ImageInspection.swift",
"ImageMetadata.swift",
"ImageReader.swift",
"ImageTranscoding.swift"
],
"target_dependencies" : [
"WIImageDomain"
],
"type" : "library"
},
{
"c99name" : "WIImageDomainTests",
"module_type" : "SwiftTarget",
"name" : "WIImageDomainTests",
"path" : "Tests/WIImageDomainTests",
"sources" : [
"WIImageDomainTests.swift"
],
"target_dependencies" : [
"WIImageDomain"
],
"type" : "test"
},
{
"c99name" : "WIImageDomain",
"module_type" : "SwiftTarget",
"name" : "WIImageDomain",
"path" : "Sources/image/domain",
"product_memberships" : [
"WICompress",
"WIImageIO",
"WICompressDocAssetGenerator",
"TargetCompressionBenchmark"
],
"sources" : [
"internal/Rect.swift",
"public/ImageFormat.swift",
"public/ImageMetadataOptions.swift",
"public/WIColor.swift",
"public/WIImageOrientation.swift",
"public/WIPixelSize.swift"
],
"type" : "library"
},
{
"c99name" : "WICompressTests",
"module_type" : "SwiftTarget",
"name" : "WICompressTests",
"path" : "Tests/WICompressTests",
"resources" : [
{
"path" : "/Users/admin/builder/spi-builder-workspace/Tests/WICompressTests/Resources",
"rule" : {
"copy" : {
}
}
}
],
"sources" : [
"LubanRatioTests.swift",
"Support/CFStringDictionary.swift",
"Support/ImageInspection.swift",
"Support/Tags.swift",
"TargetSearchTests.swift",
"WICompressDataCharacterizationTests.swift",
"WICompressImageIOCoreTests.swift",
"WICompressionEstimationTests.swift",
"WICompressionSizingTests.swift",
"WICompressorPublicSurfaceTests.swift",
"WIImageProcessTests.swift"
],
"target_dependencies" : [
"WICompress",
"WICompressDomain",
"WICompressExecution",
"WIImageDomain",
"WIImageIO"
],
"type" : "test"
},
{
"c99name" : "WICompressExecution",
"module_type" : "SwiftTarget",
"name" : "WICompressExecution",
"path" : "Sources/compress/execution",
"product_memberships" : [
"WICompress",
"WICompressDocAssetGenerator",
"TargetCompressionBenchmark"
],
"sources" : [
"algorithm/ImageCropGeometry.swift",
"algorithm/WICompressionSizing+Geometry.swift",
"algorithm/WIImageProcess+Geometry.swift",
"pipeline/ImagePipeline+Output.swift",
"pipeline/ImagePipeline+Process.swift",
"pipeline/ImagePipeline+Target.swift",
"pipeline/ImagePipeline.swift",
"target/TargetCandidate.swift",
"target/TargetSearch.swift",
"target/TargetSizeEstimation.swift"
],
"target_dependencies" : [
"WIImageDomain",
"WICompressDomain",
"WIImageIO",
"WIImageRendering"
],
"type" : "library"
},
{
"c99name" : "WICompressDomainTests",
"module_type" : "SwiftTarget",
"name" : "WICompressDomainTests",
"path" : "Tests/WICompressDomainTests",
"sources" : [
"WICompressDomainTests.swift"
],
"target_dependencies" : [
"WIImageDomain",
"WICompressDomain"
],
"type" : "test"
},
{
"c99name" : "WICompressDomain",
"module_type" : "SwiftTarget",
"name" : "WICompressDomain",
"path" : "Sources/compress/domain",
"product_memberships" : [
"WICompress",
"WICompressDocAssetGenerator",
"TargetCompressionBenchmark"
],
"sources" : [
"internal/Double+Clamped.swift",
"internal/WILuban.swift",
"public/WICompressError.swift",
"public/WICompressionSizing.swift",
"public/WICompressionTarget.swift",
"public/WIImageCrop.swift",
"public/WIImageOutput.swift",
"public/WIImageProcess.swift",
"public/WIImageRepresentation.swift",
"public/WIImageResizing.swift",
"public/WIResult.swift"
],
"target_dependencies" : [
"WIImageDomain"
],
"type" : "library"
},
{
"c99name" : "WICompressDocAssetGenerator",
"module_type" : "SwiftTarget",
"name" : "WICompressDocAssetGenerator",
"path" : "scripts",
"product_memberships" : [
"WICompressDocAssetGenerator"
],
"sources" : [
"generate-doc-assets.swift"
],
"target_dependencies" : [
"WICompress"
],
"type" : "executable"
},
{
"c99name" : "WICompress",
"module_type" : "SwiftTarget",
"name" : "WICompress",
"path" : "Sources/WICompress",
"product_memberships" : [
"WICompress",
"WICompressDocAssetGenerator",
"TargetCompressionBenchmark"
],
"sources" : [
"WICompressor.swift"
],
"target_dependencies" : [
"WIImageDomain",
"WICompressDomain",
"WICompressExecution"
],
"type" : "library"
},
{
"c99name" : "TargetCompressionBenchmark",
"module_type" : "SwiftTarget",
"name" : "TargetCompressionBenchmark",
"path" : "benchmarks/target-compression/Sources",
"product_memberships" : [
"TargetCompressionBenchmark"
],
"sources" : [
"BenchmarkComparison.swift",
"BenchmarkConfiguration.swift",
"BenchmarkCorpus.swift",
"BenchmarkMetadataValidation.swift",
"BenchmarkQuality.swift",
"BenchmarkReport.swift",
"BenchmarkRunner.swift",
"Data+SHA256.swift",
"main.swift"
],
"target_dependencies" : [
"WICompress",
"WIImageIO"
],
"type" : "executable"
}
],
"tools_version" : "6.2"
}
✅ Doc result (pending) reported
========================================
GenerateDocs
========================================
Generating docs at path: $PWD/.docs/weixi779/wicompress/main
Repository: Weixi779/WICompress
Swift version used: 6.3
Target: WICompress
Extracting symbol information for 'WICompress'...
Finished extracting symbol information for 'WICompress'. (27.78s)
Building documentation for 'WICompress'...
warning: 'WICompressError' doesn't exist at '/WICompress/Concurrency-and-Cancellation'
--> Articles/en/Concurrency-and-Cancellation.md:50:27-50:42
48 |
49 | Async overloads use ordinary `async throws` because they can produce both the standard
50 + `CancellationError` and ``WICompressError``. Cancellation is not wrapped as a library
51 | error.
52 |
warning: 'WIImageProcess' doesn't exist at '/WICompress/Getting-Started'
--> Articles/en/Getting-Started.md:19:29-19:43
17 | ## Process encoded data
18 |
19 + The shortest call applies ``WIImageProcess/default``. The default uses Luban V2
20 | sizing, a lossy quality of `0.6`, strips non-display metadata, and preserves the
21 | source representation and normal display color semantics when possible.
warning: 'WIImageProcess' doesn't exist at '/WICompress/Migrating-to-2.0'
--> Articles/en/Migrating-to-2.0.md:28:7-28:21
26 | ## Replace Options and Policy
27 |
28 + Use ``WIImageProcess`` when the application specifies resize, crop, quality, and
29 | output behavior. Use ``WICompressionTarget`` when the encoded result must satisfy
30 | a hard `maxBytes` contract.
warning: 'WICompressionTarget' doesn't exist at '/WICompress/Migrating-to-2.0'
--> Articles/en/Migrating-to-2.0.md:29:24-29:43
27 |
28 | Use ``WIImageProcess`` when the application specifies resize, crop, quality, and
29 + output behavior. Use ``WICompressionTarget`` when the encoded result must satisfy
30 | a hard `maxBytes` contract.
31 |
warning: 'WIResult' doesn't exist at '/WICompress/Migrating-to-2.0'
--> Articles/en/Migrating-to-2.0.md:37:25-37:33
35 | ```
36 |
37 + Both paths now return ``WIResult``. Code that previously consumed Process `Data`
38 | directly should read `result.data`.
39 |
warning: 'WICompressionSizing' doesn't exist at '/WICompress/Migrating-to-2.0'
--> Articles/en/Migrating-to-2.0.md:43:11-43:30
41 |
42 | The 1.x `WICompressionGeometry` combined soft sizing with hard canvas layout.
43 + In 2.0, ``WICompressionSizing`` describes the starting pixels for byte-target
44 | search, and the search may reduce those dimensions to satisfy `maxBytes`.
45 |
warning: 'WICropAnchor' doesn't exist at '/WICompress/Migrating-to-2.0'
--> Articles/en/Migrating-to-2.0.md:51:81-51:93
49 | | `.fit(maxLongSide:)` | `WICompressionSizing(maximumPixelSize:)` |
50 | | `.fitInside(box:)` | No general Target equivalent. Resolve a source-aware longest-side cap, or use Process `WIImageResize.constrained(within:)` when no byte ceiling is required. |
51 + | `.fill(size:crop:)` | Target may use `aspectRatio`, `maximumPixelSize`, and ``WICropAnchor`` as soft constraints. Use Process crop plus `WIImageResize.exact(_:)` for an exact size. |
52 | | `.exactCanvas(size:placement:background:)` | No replacement. Compose canvas padding, placement, and background outside WICompress. |
53 |
warning: 'WICropAnchor' doesn't exist at '/WICompress/Migrating-to-2.0'
--> Articles/en/Migrating-to-2.0.md:57:3-57:15
55 | a 2.0 Target never upscales and may shrink below its base size. Normalized,
56 | top-left-origin
57 + ``WICropAnchor`` values replace `WICropMode` only for aspect-ratio crop, not for
58 | canvas alignment. `WIImagePlacement` and `WICompressionPreference` are removed.
59 |
warning: 'WIImageOutput' doesn't exist at '/WICompress/Migrating-to-2.0'
--> Articles/en/Migrating-to-2.0.md:60:33-60:46
58 | canvas alignment. `WIImagePlacement` and `WICompressionPreference` are removed.
59 |
60 + `WICompressionOutput` becomes ``WIImageOutput``, while
61 | `WICompressionResult` becomes ``WIResult`` and uses ``ImageFormat`` plus
62 | ``WIPixelSize`` for its image facts. The default Target still selects
warning: 'WIResult' doesn't exist at '/WICompress/Migrating-to-2.0'
--> Articles/en/Migrating-to-2.0.md:61:33-61:41
59 |
60 | `WICompressionOutput` becomes ``WIImageOutput``, while
61 + `WICompressionResult` becomes ``WIResult`` and uses ``ImageFormat`` plus
62 | ``WIPixelSize`` for its image facts. The default Target still selects
63 | PNG for alpha or JPEG otherwise and strips metadata, but rendered output now
warning: 'ImageFormat' doesn't exist at '/WICompress/Migrating-to-2.0'
--> Articles/en/Migrating-to-2.0.md:61:55-61:66
59 |
60 | `WICompressionOutput` becomes ``WIImageOutput``, while
61 + `WICompressionResult` becomes ``WIResult`` and uses ``ImageFormat`` plus
62 | ``WIPixelSize`` for its image facts. The default Target still selects
63 | PNG for alpha or JPEG otherwise and strips metadata, but rendered output now
warning: 'WIPixelSize' doesn't exist at '/WICompress/Migrating-to-2.0'
--> Articles/en/Migrating-to-2.0.md:62:3-62:14
60 | `WICompressionOutput` becomes ``WIImageOutput``, while
61 | `WICompressionResult` becomes ``WIResult`` and uses ``ImageFormat`` plus
62 + ``WIPixelSize`` for its image facts. The default Target still selects
63 | PNG for alpha or JPEG otherwise and strips metadata, but rendered output now
64 | converts to sRGB instead of preserving the source color space. Preserve the 1.x
warning: 'WICompressError' doesn't exist at '/WICompress/Migrating-to-2.0'
--> Articles/en/Migrating-to-2.0.md:78:52-78:67
76 | ```
77 |
78 + Construction now validates `maxBytes` and throws ``WICompressError``. The full
79 | mapping, including crop-anchor coordinates and removed output policies, is in
80 | the repository's migration guide.
warning: 'WIImageResize' doesn't exist at '/WICompress/Migrating-to-2.0'
--> Articles/en/Migrating-to-2.0.md:84:32-84:45
82 | ## Review the default sizing change
83 |
84 + The default Process now uses ``WIImageResize/lubanV2``. To retain WICompress's
85 | corrected Luban 1 sizing behavior, select it explicitly:
86 |
warning: 'WIImageProcess' doesn't exist at '/WICompress/Process-and-Target'
--> Articles/en/Process-and-Target.md:7:3-7:17
5 | ## Declare a Process
6 |
7 + ``WIImageProcess`` groups four facts that describe one operation:
8 |
9 | - `crop` optionally chooses an aspect-ratio region.
warning: 'WIImageResizing' doesn't exist at '/WICompress/Process-and-Target'
--> Articles/en/Process-and-Target.md:46:50-46:65
44 | Built-in resizing includes Luban V2, the corrected Luban 1 behavior, longest-side
45 | limits, two-dimensional proportional constraints, explicit scaling, and exact sizes.
46 + Custom implementations only need to conform to ``WIImageResizing`` and return one
47 | complete target pixel size.
48 |
warning: 'WICompressionTarget' doesn't exist at '/WICompress/Process-and-Target'
--> Articles/en/Process-and-Target.md:51:3-51:22
49 | ## Declare a Target
50 |
51 + ``WICompressionTarget`` is for external constraints such as an upload or sharing
52 | SDK that rejects files above a fixed byte count. WICompress searches candidate
53 | quality and dimensions, then verifies the final result against `maxBytes`.
warning: 'WICompressError' doesn't exist at '/WICompress/Process-and-Target'
--> Articles/en/Process-and-Target.md:82:40-82:55
80 | Target has no caller-selected quality. Quality and any additional size reduction are
81 | search variables owned by the compressor. If the supported output path cannot satisfy
82 + the hard limit, the operation throws ``WICompressError/targetUnsatisfiable(smallestByteCount:)``.
83 |
84 | ## Share output requirements
warning: 'WIImageOutput' doesn't exist at '/WICompress/Process-and-Target'
--> Articles/en/Process-and-Target.md:86:35-86:48
84 | ## Share output requirements
85 |
86 + Process and Target use the same ``WIImageOutput``. Representation, metadata, and
87 | color-space requirements therefore keep the same meaning on both paths.
88 |
warning: 'WICompressError' doesn't exist at '/WICompress/Concurrency-and-Cancellation-CN'
--> Articles/zh-Hans/Concurrency-and-Cancellation-CN.md:48:10-48:25
46 |
47 | 异步入口使用普通 `async throws`,因为它既可能抛出标准 `CancellationError`,也可能
48 + 抛出 ``WICompressError``。WICompress 不会把取消包装成自己的错误类型。
49 |
50 | ## 需要时使用同步入口
warning: 'WIImageProcess' doesn't exist at '/WICompress/Getting-Started-CN'
--> Articles/zh-Hans/Getting-Started-CN.md:19:22-19:36
17 | ## 处理编码数据
18 |
19 + 最短调用使用 ``WIImageProcess/default``。默认 Process 使用 Luban V2 尺寸算法、
20 | `0.6` 有损质量、移除非展示 metadata,并在可能时保留源图格式和正常显示色彩语义。
21 |
warning: 'WIResult' doesn't exist at '/WICompress/Getting-Started-CN'
--> Articles/zh-Hans/Getting-Started-CN.md:31:3-31:11
29 | ```
30 |
31 + ``WIResult`` 是 Process 与 Target 共同的结果类型。只有到 UI 边界时,才需要把
32 | `result.data` 解码成平台图片。
33 |
warning: 'WIImageProcess' doesn't exist at '/WICompress/Migrating-to-2.0-CN'
--> Articles/zh-Hans/Migrating-to-2.0-CN.md:28:70-28:84
26 | ## 替换 Options 与 Policy
27 |
28 + 当应用明确指定 resize、crop、quality 与 output 时使用 ``WIImageProcess``;当最终结果
29 | 必须满足硬性 `maxBytes` 时使用 ``WICompressionTarget``。
30 |
warning: 'WICompressionTarget' doesn't exist at '/WICompress/Migrating-to-2.0-CN'
--> Articles/zh-Hans/Migrating-to-2.0-CN.md:29:43-29:62
27 |
28 | 当应用明确指定 resize、crop、quality 与 output 时使用 ``WIImageProcess``;当最终结果
29 + 必须满足硬性 `maxBytes` 时使用 ``WICompressionTarget``。
30 |
31 | ```swift
warning: 'WIResult' doesn't exist at '/WICompress/Migrating-to-2.0-CN'
--> Articles/zh-Hans/Migrating-to-2.0-CN.md:36:34-36:42
34 | ```
35 |
36 + 两条路径现在统一返回 ``WIResult``。以前直接使用 Process `Data` 的代码应改为读取
37 | `result.data`。
38 |
warning: 'WICompressionSizing' doesn't exist at '/WICompress/Migrating-to-2.0-CN'
--> Articles/zh-Hans/Migrating-to-2.0-CN.md:42:3-42:22
40 |
41 | 1.x 的 `WICompressionGeometry` 同时包含 soft sizing 与 hard canvas layout。2.0 的
42 + ``WICompressionSizing`` 只描述 byte-target search 的起始 pixels;为了满足 `maxBytes`,
43 | 搜索可以继续缩小尺寸。
44 |
warning: 'WICropAnchor' doesn't exist at '/WICompress/Migrating-to-2.0-CN'
--> Articles/zh-Hans/Migrating-to-2.0-CN.md:50:80-50:92
48 | | `.fit(maxLongSide:)` | `WICompressionSizing(maximumPixelSize:)` |
49 | | `.fitInside(box:)` | 没有通用 Target 等价物。应先根据 source size 计算最长边上限;不需要 byte ceiling 时可改用 Process 的 `WIImageResize.constrained(within:)`。 |
50 + | `.fill(size:crop:)` | Target 可用 `aspectRatio`、`maximumPixelSize` 与 ``WICropAnchor`` 表达 soft constraints;exact size 应使用 Process crop 与 `WIImageResize.exact(_:)`。 |
51 | | `.exactCanvas(size:placement:background:)` | 没有替代;canvas padding、placement 与 background 应在 WICompress 外部组装。 |
52 |
warning: 'WICropAnchor' doesn't exist at '/WICompress/Migrating-to-2.0-CN'
--> Articles/zh-Hans/Migrating-to-2.0-CN.md:54:55-54:67
52 |
53 | 旧 hard `.fill` 允许放大且不会降低指定尺寸;2.0 Target 不会放大,并可能继续缩小到
54 + base size 以下。Normalized、top-left-origin 的 ``WICropAnchor`` 只替代
55 | aspect-ratio crop 的 `WICropMode`,不能替代 canvas alignment。`WIImagePlacement` 与
56 | `WICompressionPreference` 已删除。
warning: 'WIImageOutput' doesn't exist at '/WICompress/Migrating-to-2.0-CN'
--> Articles/zh-Hans/Migrating-to-2.0-CN.md:58:32-58:45
56 | `WICompressionPreference` 已删除。
57 |
58 + `WICompressionOutput` 改为 ``WIImageOutput``,`WICompressionResult` 改为
59 | ``WIResult``,图片事实改用 ``ImageFormat`` 与 ``WIPixelSize``。Target 默认仍按 alpha
60 | 选择 PNG/JPEG 并 strip metadata,但 rendered output 的 color space 已从保留 source
warning: 'WIResult' doesn't exist at '/WICompress/Migrating-to-2.0-CN'
--> Articles/zh-Hans/Migrating-to-2.0-CN.md:59:3-59:11
57 |
58 | `WICompressionOutput` 改为 ``WIImageOutput``,`WICompressionResult` 改为
59 + ``WIResult``,图片事实改用 ``ImageFormat`` 与 ``WIPixelSize``。Target 默认仍按 alpha
60 | 选择 PNG/JPEG 并 strip metadata,但 rendered output 的 color space 已从保留 source
61 | 改为转换到 sRGB。需要保留 1.x 默认语义时,应显式传入:
warning: 'ImageFormat' doesn't exist at '/WICompress/Migrating-to-2.0-CN'
--> Articles/zh-Hans/Migrating-to-2.0-CN.md:59:37-59:48
57 |
58 | `WICompressionOutput` 改为 ``WIImageOutput``,`WICompressionResult` 改为
59 + ``WIResult``,图片事实改用 ``ImageFormat`` 与 ``WIPixelSize``。Target 默认仍按 alpha
60 | 选择 PNG/JPEG 并 strip metadata,但 rendered output 的 color space 已从保留 source
61 | 改为转换到 sRGB。需要保留 1.x 默认语义时,应显式传入:
warning: 'WIPixelSize' doesn't exist at '/WICompress/Migrating-to-2.0-CN'
--> Articles/zh-Hans/Migrating-to-2.0-CN.md:59:57-59:68
57 |
58 | `WICompressionOutput` 改为 ``WIImageOutput``,`WICompressionResult` 改为
59 + ``WIResult``,图片事实改用 ``ImageFormat`` 与 ``WIPixelSize``。Target 默认仍按 alpha
60 | 选择 PNG/JPEG 并 strip metadata,但 rendered output 的 color space 已从保留 source
61 | 改为转换到 sRGB。需要保留 1.x 默认语义时,应显式传入:
warning: 'WICompressError' doesn't exist at '/WICompress/Migrating-to-2.0-CN'
--> Articles/zh-Hans/Migrating-to-2.0-CN.md:74:49-74:64
72 | ```
73 |
74 + 初始化现在会验证 `maxBytes` 并抛出 ``WICompressError``。完整映射、crop anchor 坐标与
75 | 删除的 output policies 见仓库 migration guide。
76 |
warning: 'WIImageResize' doesn't exist at '/WICompress/Migrating-to-2.0-CN'
--> Articles/zh-Hans/Migrating-to-2.0-CN.md:79:31-79:44
77 | ## 检查默认尺寸算法变化
78 |
79 + 默认 Process 现在使用 ``WIImageResize/lubanV2``。如果需要延续 WICompress 修正版
80 | Luban 1 的尺寸结果,应显式选择:
81 |
warning: 'WIImageProcess' doesn't exist at '/WICompress/Process-and-Target-CN'
--> Articles/zh-Hans/Process-and-Target-CN.md:7:3-7:17
5 | ## 定义 Process
6 |
7 + ``WIImageProcess`` 将一次图片操作分成四组事实:
8 |
9 | - `crop` 可选出一个宽高比区域。
warning: 'WIImageResizing' doesn't exist at '/WICompress/Process-and-Target-CN'
--> Articles/zh-Hans/Process-and-Target-CN.md:45:52-45:67
43 |
44 | 内置尺寸算法包括 Luban V2、修正版 Luban 1、最长边限制、二维等比约束、明确比例
45 + 与精确尺寸。自定义实现只需要遵守 ``WIImageResizing``,根据一个完整源图尺寸返回
46 | 一个完整目标尺寸。
47 |
warning: 'WICompressionTarget' doesn't exist at '/WICompress/Process-and-Target-CN'
--> Articles/zh-Hans/Process-and-Target-CN.md:50:3-50:22
48 | ## 定义 Target
49 |
50 + ``WICompressionTarget`` 面向上传或分享 SDK 这类硬性限制。WICompress 会搜索候选质量
51 | 与尺寸,并在结束前再次验证结果没有超过 `maxBytes`。
52 | 默认 Target 对含 Alpha 源图使用 PNG,否则使用 JPEG;同时移除非展示 metadata,
warning: 'WICompressError' doesn't exist at '/WICompress/Process-and-Target-CN'
--> Articles/zh-Hans/Process-and-Target-CN.md:80:3-80:18
78 | Target 不接受调用方指定的 quality。Quality 与后续降尺寸都是压缩器拥有的搜索变量。
79 | 如果当前支持的输出路径无法满足硬上限,操作会抛出
80 + ``WICompressError/targetUnsatisfiable(smallestByteCount:)``。
81 |
82 | ## 共用 Output
warning: 'WIImageOutput' doesn't exist at '/WICompress/Process-and-Target-CN'
--> Articles/zh-Hans/Process-and-Target-CN.md:84:38-84:51
82 | ## 共用 Output
83 |
84 + Process 与 Target 使用同一个 ``WIImageOutput``,因此格式、metadata 和色彩空间要求
85 | 在两条路径上具有完全相同的含义。
86 |
warning: 'WIResult' doesn't exist at '/WICompress'
--> WICompress.md:7:75-7:83
5 | ## Overview
6 |
7 + WICompress operates on encoded `Data` or file URLs and always returns a ``WIResult``.
8 | It coordinates ImageIO and Core Graphics while keeping UIKit and AppKit out of the
9 | compression core.
warning: 'WIResult' doesn't exist at '/WICompress'
--> WICompress.md:62:5-62:13
60 |
61 | - ``WICompressor``
62 + - ``WIResult``
63 | - ``WICompressError``
64 |
warning: 'WICompressError' doesn't exist at '/WICompress'
--> WICompress.md:63:5-63:20
61 | - ``WICompressor``
62 | - ``WIResult``
63 + - ``WICompressError``
| ╰─suggestion: Replace 'WICompressError' with 'WICompressor'
64 |
65 | ### Process
warning: 'WIImageProcess' doesn't exist at '/WICompress'
--> WICompress.md:67:5-67:19
65 | ### Process
66 |
67 + - ``WIImageProcess``
68 | - ``WIImageSizing``
69 | - ``WIImageResizing``
warning: 'WIImageSizing' doesn't exist at '/WICompress'
--> WICompress.md:68:5-68:18
66 |
67 | - ``WIImageProcess``
68 + - ``WIImageSizing``
69 | - ``WIImageResizing``
70 | - ``WIImageResize``
warning: 'WIImageResizing' doesn't exist at '/WICompress'
--> WICompress.md:69:5-69:20
67 | - ``WIImageProcess``
68 | - ``WIImageSizing``
69 + - ``WIImageResizing``
70 | - ``WIImageResize``
71 | - ``WIImageCrop``
warning: 'WIImageResize' doesn't exist at '/WICompress'
--> WICompress.md:70:5-70:18
68 | - ``WIImageSizing``
69 | - ``WIImageResizing``
70 + - ``WIImageResize``
71 | - ``WIImageCrop``
72 | - ``WIAspectRatio``
warning: 'WIImageCrop' doesn't exist at '/WICompress'
--> WICompress.md:71:5-71:16
69 | - ``WIImageResizing``
70 | - ``WIImageResize``
71 + - ``WIImageCrop``
72 | - ``WIAspectRatio``
73 | - ``WICropAnchor``
warning: 'WIAspectRatio' doesn't exist at '/WICompress'
--> WICompress.md:72:5-72:18
70 | - ``WIImageResize``
71 | - ``WIImageCrop``
72 + - ``WIAspectRatio``
73 | - ``WICropAnchor``
74 |
warning: 'WICropAnchor' doesn't exist at '/WICompress'
--> WICompress.md:73:5-73:17
71 | - ``WIImageCrop``
72 | - ``WIAspectRatio``
73 + - ``WICropAnchor``
74 |
75 | ### Target-Based Compression
warning: 'WICompressionTarget' doesn't exist at '/WICompress'
--> WICompress.md:77:5-77:24
75 | ### Target-Based Compression
76 |
77 + - ``WICompressionTarget``
| ├─suggestion: Replace 'WICompressionTarget' with 'WICompressor'
| ╰─suggestion: Replace 'WICompressionTarget' with 'Target-Based-Compression'
78 | - ``WICompressionSizing``
79 |
warning: 'WICompressionSizing' doesn't exist at '/WICompress'
--> WICompress.md:78:5-78:24
76 |
77 | - ``WICompressionTarget``
78 + - ``WICompressionSizing``
| ╰─suggestion: Replace 'WICompressionSizing' with 'WICompressor'
79 |
80 | ### Output
warning: 'WIImageOutput' doesn't exist at '/WICompress'
--> WICompress.md:82:5-82:18
80 | ### Output
81 |
82 + - ``WIImageOutput``
83 | - ``WIImageRepresentation``
84 | - ``WIJPEGBackground``
warning: 'WIImageRepresentation' doesn't exist at '/WICompress'
--> WICompress.md:83:5-83:26
81 |
82 | - ``WIImageOutput``
83 + - ``WIImageRepresentation``
84 | - ``WIJPEGBackground``
85 | - ``ImageMetadataOptions``
warning: 'WIJPEGBackground' doesn't exist at '/WICompress'
--> WICompress.md:84:5-84:21
82 | - ``WIImageOutput``
83 | - ``WIImageRepresentation``
84 + - ``WIJPEGBackground``
85 | - ``ImageMetadataOptions``
86 | - ``WIImageColorSpace``
warning: 'ImageMetadataOptions' doesn't exist at '/WICompress'
--> WICompress.md:85:5-85:25
83 | - ``WIImageRepresentation``
84 | - ``WIJPEGBackground``
85 + - ``ImageMetadataOptions``
86 | - ``WIImageColorSpace``
87 | - ``WIColorSpace``
warning: 'WIImageColorSpace' doesn't exist at '/WICompress'
--> WICompress.md:86:5-86:22
84 | - ``WIJPEGBackground``
85 | - ``ImageMetadataOptions``
86 + - ``WIImageColorSpace``
87 | - ``WIColorSpace``
88 | - ``WIColor``
warning: 'WIColorSpace' doesn't exist at '/WICompress'
--> WICompress.md:87:5-87:17
85 | - ``ImageMetadataOptions``
86 | - ``WIImageColorSpace``
87 + - ``WIColorSpace``
88 | - ``WIColor``
89 |
warning: 'WIColor' doesn't exist at '/WICompress'
--> WICompress.md:88:5-88:12
86 | - ``WIImageColorSpace``
87 | - ``WIColorSpace``
88 + - ``WIColor``
| ╰─suggestion: Replace 'WIColor' with 'WICompressor'
89 |
90 | ### Image Values
warning: 'ImageFormat' doesn't exist at '/WICompress'
--> WICompress.md:92:5-92:16
90 | ### Image Values
91 |
92 + - ``ImageFormat``
| ╰─suggestion: Replace 'ImageFormat' with 'Image-Values'
93 | - ``WIPixelSize``
94 | - ``WIImageOrientation``
warning: 'WIPixelSize' doesn't exist at '/WICompress'
--> WICompress.md:93:5-93:16
91 |
92 | - ``ImageFormat``
93 + - ``WIPixelSize``
94 | - ``WIImageOrientation``
warning: 'WIImageOrientation' doesn't exist at '/WICompress'
--> WICompress.md:94:5-94:23
92 | - ``ImageFormat``
93 | - ``WIPixelSize``
94 + - ``WIImageOrientation``
Finished building documentation for 'WICompress' (0.55s)
Generated documentation archive at:
/Users/admin/builder/spi-builder-workspace/.docs/weixi779/wicompress/main
Fetching https://github.com/swiftlang/swift-docc-plugin
[1/2345] Fetching swift-docc-plugin
Fetched https://github.com/swiftlang/swift-docc-plugin from cache (1.71s)
Computing version for https://github.com/swiftlang/swift-docc-plugin
Computed https://github.com/swiftlang/swift-docc-plugin at 1.5.0 (3.89s)
Fetching https://github.com/swiftlang/swift-docc-symbolkit
[1/3805] Fetching swift-docc-symbolkit
Fetched https://github.com/swiftlang/swift-docc-symbolkit from cache (1.41s)
Computing version for https://github.com/swiftlang/swift-docc-symbolkit
Computed https://github.com/swiftlang/swift-docc-symbolkit at 1.0.0 (2.12s)
Creating working copy for https://github.com/swiftlang/swift-docc-plugin
Working copy of https://github.com/swiftlang/swift-docc-plugin resolved at 1.5.0
Creating working copy for https://github.com/swiftlang/swift-docc-symbolkit
Working copy of https://github.com/swiftlang/swift-docc-symbolkit resolved at 1.0.0
Building for debugging...
[0/8] Write snippet-extract-tool-entitlement.plist
[1/8] Write sources
[4/8] Write swift-version--6988338F2F200930.txt
[6/54] Emitting module SymbolKit
[7/58] Compiling Snippets SnippetParser.swift
[8/58] Compiling Snippets SnippetLanguage.swift
[9/58] Compiling Snippets Snippet.swift
[10/58] Emitting module Snippets
[11/58] Compiling SymbolKit SemanticVersion.swift
[12/58] Compiling SymbolKit AccessControl.swift
[13/58] Compiling SymbolKit Availability.swift
[14/58] Compiling SymbolKit AvailabilityItem.swift
[15/58] Compiling SymbolKit Domain.swift
[16/58] Compiling SymbolKit DeclarationFragments.swift
[17/58] Compiling SymbolKit Fragment.swift
[18/58] Compiling SymbolKit FragmentKind.swift
[19/58] Compiling SymbolKit FunctionParameter.swift
[20/58] Compiling SymbolKit FunctionSignature.swift
[21/58] Compiling SymbolKit SourceRange.swift
[22/58] Compiling SymbolKit Metadata.swift
[23/58] Compiling SymbolKit Module.swift
[24/58] Compiling SymbolKit OperatingSystem.swift
[25/58] Compiling SymbolKit Platform.swift
[26/58] Compiling SymbolKit Names.swift
[27/58] Compiling SymbolKit SPI.swift
[28/58] Compiling SymbolKit Snippet.swift
[29/58] Compiling SymbolKit Extension.swift
[30/58] Compiling SymbolKit Relationship.swift
[31/58] Compiling SymbolKit RelationshipKind.swift
[32/58] Compiling SymbolKit SourceOrigin.swift
[33/58] Compiling SymbolKit GenericConstraints.swift
[34/58] Compiling SymbolKit Swift.swift
[35/58] Compiling SymbolKit Mixin+Equals.swift
[36/58] Compiling SymbolKit Mixin+Hash.swift
[37/58] Compiling SymbolKit Mixin.swift
[38/58] Compiling SymbolKit LineList.swift
[39/58] Compiling SymbolKit Position.swift
[40/58] Compiling SymbolKit Identifier.swift
[41/58] Compiling SymbolKit KindIdentifier.swift
[42/58] Compiling SymbolKit Location.swift
[43/58] Compiling SymbolKit Mutability.swift
[44/58] Compiling SymbolKit Symbol.swift
[45/58] Compiling SymbolKit SymbolKind.swift
[46/58] Compiling SymbolKit SymbolGraph.swift
[47/58] Compiling SymbolKit GraphCollector.swift
[48/58] Compiling SymbolKit GenericConstraint.swift
[49/58] Compiling SymbolKit GenericParameter.swift
[50/58] Compiling SymbolKit Generics.swift
[51/58] Compiling SymbolKit Namespace.swift
[52/58] Compiling SymbolKit UnifiedSymbol+Encodable.swift
[53/58] Compiling SymbolKit UnifiedSymbol.swift
[54/58] Compiling SymbolKit UnifiedSymbolGraph+Encodable.swift
[55/58] Compiling SymbolKit UnifiedSymbolGraph.swift
[56/62] Compiling snippet_extract URL+Status.swift
[57/62] Compiling snippet_extract SymbolGraph+Snippet.swift
[58/62] Emitting module snippet_extract
[59/62] Compiling snippet_extract SnippetBuildCommand.swift
[59/62] Write Objects.LinkFileList
[60/62] Linking snippet-extract-tool
[61/62] Applying snippet-extract-tool
Build of product 'snippet-extract' complete! (3.52s)
Building for debugging...
[0/1] Write swift-version--6988338F2F200930.txt
Build of target: 'WICompress' complete! (0.28s)
Target: WIImageIO
Extracting symbol information for 'WIImageIO'...
Finished extracting symbol information for 'WIImageIO'. (0.36s)
Building documentation for 'WIImageIO'...
warning: 'ImageFormat' doesn't exist at '/WIImageIO'
--> WIImageIO.md:85:5-85:16
83 | ### Shared Image Values
84 |
85 + - ``ImageFormat``
| ├─suggestion: Replace 'ImageFormat' with 'ImageFrame'
| ├─suggestion: Replace 'ImageFormat' with 'ImageIOError'
| ╰─suggestion: Replace 'ImageFormat' with 'ImageReader'
86 | - ``WIPixelSize``
87 | - ``WIImageOrientation``
warning: 'WIPixelSize' doesn't exist at '/WIImageIO'
--> WIImageIO.md:86:5-86:16
84 |
85 | - ``ImageFormat``
86 + - ``WIPixelSize``
87 | - ``WIImageOrientation``
88 | - ``ImageMetadataOptions``
warning: 'WIImageOrientation' doesn't exist at '/WIImageIO'
--> WIImageIO.md:87:5-87:23
85 | - ``ImageFormat``
86 | - ``WIPixelSize``
87 + - ``WIImageOrientation``
| ╰─suggestion: Replace 'WIImageOrientation' with 'ImageIO-Operations'
88 | - ``ImageMetadataOptions``
89 | - ``WIColorSpace``
warning: 'ImageMetadataOptions' doesn't exist at '/WIImageIO'
--> WIImageIO.md:88:5-88:25
86 | - ``WIPixelSize``
87 | - ``WIImageOrientation``
88 + - ``ImageMetadataOptions``
| ├─suggestion: Replace 'ImageMetadataOptions' with 'ImageDecodeOptions'
| ├─suggestion: Replace 'ImageMetadataOptions' with 'ImageEncodeOptions'
| ├─suggestion: Replace 'ImageMetadataOptions' with 'ImageTranscodeOptions'
| ├─suggestion: Replace 'ImageMetadataOptions' with 'ImageThumbnailOptions'
| ├─suggestion: Replace 'ImageMetadataOptions' with 'ImageIO-Operations'
| ╰─suggestion: Replace 'ImageMetadataOptions' with 'ImageIO-Operations-CN'
89 | - ``WIColorSpace``
90 | - ``WIColor``
warning: 'WIColorSpace' doesn't exist at '/WIImageIO'
--> WIImageIO.md:89:5-89:17
87 | - ``WIImageOrientation``
88 | - ``ImageMetadataOptions``
89 + - ``WIColorSpace``
90 | - ``WIColor``
warning: 'WIColor' doesn't exist at '/WIImageIO'
--> WIImageIO.md:90:5-90:12
88 | - ``ImageMetadataOptions``
89 | - ``WIColorSpace``
90 + - ``WIColor``
Finished building documentation for 'WIImageIO' (0.10s)
Generated documentation archive at:
/Users/admin/builder/spi-builder-workspace/.docs/weixi779/wicompress/main
Building for debugging...
[0/3] Write swift-version--6988338F2F200930.txt
Build of product 'snippet-extract' complete! (0.25s)
Building for debugging...
[0/1] Write swift-version--6988338F2F200930.txt
Build of target: 'WIImageIO' complete! (0.26s)
Successfully merged into /Users/admin/builder/spi-builder-workspace/.docs-staging/weixi779/wicompress/main/index/index.json
Successfully merged into /Users/admin/builder/spi-builder-workspace/.docs-staging/weixi779/wicompress/main/linkable-paths.json
246
3 /Users/admin/builder/spi-builder-workspace/.docs/weixi779/wicompress/main
✅ Doc result (uploading) reported
========================================
SyncDocs
========================================
Doc archive source directory: $PWD/.docs/weixi779/wicompress/main
File count: 246
Doc size: 3.0MB
Preparing doc bundle ...
Using presigned URL upload - AWS credentials not required
Uploading -weixi779-wicompress-main-c86e899b.zip to presigned URL
Starting upload of 602372 bytes...
Upload completed successfully
Done.