Skip to content

Commit ebf080b

Browse files
committed
HDR images + other improvements
1 parent d9dcdbe commit ebf080b

File tree

7 files changed

+147
-2
lines changed

7 files changed

+147
-2
lines changed

Jxl Coder.xcodeproj/project.pbxproj

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
3F14958E227DEE19A1D12A69 /* Pods_Jxl_Coder.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C1D15BFF370F6FA27EA6D7E /* Pods_Jxl_Coder.framework */; };
1011
D341F4C52A97FC29003A496C /* Jxl_CoderApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D341F4C42A97FC29003A496C /* Jxl_CoderApp.swift */; };
1112
D341F4C72A97FC29003A496C /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D341F4C62A97FC29003A496C /* ContentView.swift */; };
1213
D341F4C92A97FC2A003A496C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D341F4C82A97FC2A003A496C /* Assets.xcassets */; };
@@ -29,9 +30,12 @@
2930
D3D2BA092A9BD1B600EBB7A9 /* JXLSystemImage.mm in Sources */ = {isa = PBXBuildFile; fileRef = D3D2BA082A9BD1B600EBB7A9 /* JXLSystemImage.mm */; };
3031
D3D2BA102A9BDADA00EBB7A9 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D2BA0F2A9BDADA00EBB7A9 /* Accelerate.framework */; };
3132
D3D55DAD2AA4D0E800EA7CB0 /* JxlNukePlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3D55DAC2AA4D0E800EA7CB0 /* JxlNukePlugin.swift */; };
33+
D3D55DB12AA4DBBD00EA7CB0 /* JxlSDWebImageCoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3D55DB02AA4DBBD00EA7CB0 /* JxlSDWebImageCoder.swift */; };
3234
/* End PBXBuildFile section */
3335

3436
/* Begin PBXFileReference section */
37+
028C5ED4E4E827F5E76488BA /* Pods-Jxl Coder.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Jxl Coder.release.xcconfig"; path = "Target Support Files/Pods-Jxl Coder/Pods-Jxl Coder.release.xcconfig"; sourceTree = "<group>"; };
38+
0C1D15BFF370F6FA27EA6D7E /* Pods_Jxl_Coder.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Jxl_Coder.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3539
D341F4C12A97FC29003A496C /* Jxl Coder.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Jxl Coder.app"; sourceTree = BUILT_PRODUCTS_DIR; };
3640
D341F4C42A97FC29003A496C /* Jxl_CoderApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Jxl_CoderApp.swift; sourceTree = "<group>"; };
3741
D341F4C62A97FC29003A496C /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
@@ -59,6 +63,8 @@
5963
D3D2BA0A2A9BD1C200EBB7A9 /* JXLSystemImage.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = JXLSystemImage.hpp; sourceTree = "<group>"; };
6064
D3D2BA0F2A9BDADA00EBB7A9 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
6165
D3D55DAC2AA4D0E800EA7CB0 /* JxlNukePlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JxlNukePlugin.swift; path = JxlNukePlugin/JxlNukePlugin.swift; sourceTree = "<group>"; };
66+
D3D55DB02AA4DBBD00EA7CB0 /* JxlSDWebImageCoder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JxlSDWebImageCoder.swift; path = JxlSDWebImageCoder/JxlSDWebImageCoder.swift; sourceTree = "<group>"; };
67+
EA293D93FDD9F3C620CEA63F /* Pods-Jxl Coder.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Jxl Coder.debug.xcconfig"; path = "Target Support Files/Pods-Jxl Coder/Pods-Jxl Coder.debug.xcconfig"; sourceTree = "<group>"; };
6268
/* End PBXFileReference section */
6369

6470
/* Begin PBXFrameworksBuildPhase section */
@@ -76,20 +82,32 @@
7682
D3B84ACE2A9C580800DAFE87 /* NukeUI in Frameworks */,
7783
D3D2B9F82A9BAE1C00EBB7A9 /* libjxl.xcframework in Frameworks */,
7884
D3B84ACC2A9C580800DAFE87 /* Nuke in Frameworks */,
85+
3F14958E227DEE19A1D12A69 /* Pods_Jxl_Coder.framework in Frameworks */,
7986
);
8087
runOnlyForDeploymentPostprocessing = 0;
8188
};
8289
/* End PBXFrameworksBuildPhase section */
8390

8491
/* Begin PBXGroup section */
92+
417B4E0BE661D26683F15435 /* Pods */ = {
93+
isa = PBXGroup;
94+
children = (
95+
EA293D93FDD9F3C620CEA63F /* Pods-Jxl Coder.debug.xcconfig */,
96+
028C5ED4E4E827F5E76488BA /* Pods-Jxl Coder.release.xcconfig */,
97+
);
98+
path = Pods;
99+
sourceTree = "<group>";
100+
};
85101
D341F4B82A97FC29003A496C = {
86102
isa = PBXGroup;
87103
children = (
104+
D3D55DB02AA4DBBD00EA7CB0 /* JxlSDWebImageCoder.swift */,
88105
D3D55DAC2AA4D0E800EA7CB0 /* JxlNukePlugin.swift */,
89106
D341F4D22A97FC5A003A496C /* Sources */,
90107
D341F4C32A97FC29003A496C /* Jxl Coder */,
91108
D341F4C22A97FC29003A496C /* Products */,
92109
D3D2BA0E2A9BDADA00EBB7A9 /* Frameworks */,
110+
417B4E0BE661D26683F15435 /* Pods */,
93111
);
94112
sourceTree = "<group>";
95113
};
@@ -199,6 +217,7 @@
199217
isa = PBXGroup;
200218
children = (
201219
D3D2BA0F2A9BDADA00EBB7A9 /* Accelerate.framework */,
220+
0C1D15BFF370F6FA27EA6D7E /* Pods_Jxl_Coder.framework */,
202221
);
203222
name = Frameworks;
204223
sourceTree = "<group>";
@@ -210,9 +229,11 @@
210229
isa = PBXNativeTarget;
211230
buildConfigurationList = D341F4CF2A97FC2A003A496C /* Build configuration list for PBXNativeTarget "Jxl Coder" */;
212231
buildPhases = (
232+
CF73E12849CFB0063FE0F9AD /* [CP] Check Pods Manifest.lock */,
213233
D341F4BD2A97FC29003A496C /* Sources */,
214234
D341F4BE2A97FC29003A496C /* Frameworks */,
215235
D341F4BF2A97FC29003A496C /* Resources */,
236+
449D404A6736639C36881248 /* [CP] Embed Pods Frameworks */,
216237
);
217238
buildRules = (
218239
);
@@ -280,13 +301,56 @@
280301
};
281302
/* End PBXResourcesBuildPhase section */
282303

304+
/* Begin PBXShellScriptBuildPhase section */
305+
449D404A6736639C36881248 /* [CP] Embed Pods Frameworks */ = {
306+
isa = PBXShellScriptBuildPhase;
307+
buildActionMask = 2147483647;
308+
files = (
309+
);
310+
inputFileListPaths = (
311+
"${PODS_ROOT}/Target Support Files/Pods-Jxl Coder/Pods-Jxl Coder-frameworks-${CONFIGURATION}-input-files.xcfilelist",
312+
);
313+
name = "[CP] Embed Pods Frameworks";
314+
outputFileListPaths = (
315+
"${PODS_ROOT}/Target Support Files/Pods-Jxl Coder/Pods-Jxl Coder-frameworks-${CONFIGURATION}-output-files.xcfilelist",
316+
);
317+
runOnlyForDeploymentPostprocessing = 0;
318+
shellPath = /bin/sh;
319+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Jxl Coder/Pods-Jxl Coder-frameworks.sh\"\n";
320+
showEnvVarsInLog = 0;
321+
};
322+
CF73E12849CFB0063FE0F9AD /* [CP] Check Pods Manifest.lock */ = {
323+
isa = PBXShellScriptBuildPhase;
324+
buildActionMask = 2147483647;
325+
files = (
326+
);
327+
inputFileListPaths = (
328+
);
329+
inputPaths = (
330+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
331+
"${PODS_ROOT}/Manifest.lock",
332+
);
333+
name = "[CP] Check Pods Manifest.lock";
334+
outputFileListPaths = (
335+
);
336+
outputPaths = (
337+
"$(DERIVED_FILE_DIR)/Pods-Jxl Coder-checkManifestLockResult.txt",
338+
);
339+
runOnlyForDeploymentPostprocessing = 0;
340+
shellPath = /bin/sh;
341+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
342+
showEnvVarsInLog = 0;
343+
};
344+
/* End PBXShellScriptBuildPhase section */
345+
283346
/* Begin PBXSourcesBuildPhase section */
284347
D341F4BD2A97FC29003A496C /* Sources */ = {
285348
isa = PBXSourcesBuildPhase;
286349
buildActionMask = 2147483647;
287350
files = (
288351
D3D2B9F52A9BAD6A00EBB7A9 /* JXLCPlusCoder.mm in Sources */,
289352
D3D2BA092A9BD1B600EBB7A9 /* JXLSystemImage.mm in Sources */,
353+
D3D55DB12AA4DBBD00EA7CB0 /* JxlSDWebImageCoder.swift in Sources */,
290354
D3D2B9FD2A9BAEF300EBB7A9 /* jxl_worker.cpp in Sources */,
291355
D3D2BA002A9BB4AF00EBB7A9 /* JXLCoder.swift in Sources */,
292356
D3D2BA022A9BB50F00EBB7A9 /* JXLSupport.swift in Sources */,
@@ -415,6 +479,7 @@
415479
};
416480
D341F4D02A97FC2A003A496C /* Debug */ = {
417481
isa = XCBuildConfiguration;
482+
baseConfigurationReference = EA293D93FDD9F3C620CEA63F /* Pods-Jxl Coder.debug.xcconfig */;
418483
buildSettings = {
419484
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
420485
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
@@ -446,6 +511,7 @@
446511
};
447512
D341F4D12A97FC2A003A496C /* Release */ = {
448513
isa = XCBuildConfiguration;
514+
baseConfigurationReference = 028C5ED4E4E827F5E76488BA /* Pods-Jxl Coder.release.xcconfig */;
449515
buildSettings = {
450516
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
451517
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;

Jxl Coder.xcworkspace/contents.xcworkspacedata

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Jxl Coder.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

JxlSDWebImageCoder/JxlSDWebImageCoder.swift

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,17 @@ import Foundation
1010
import JxlCoder
1111
#endif
1212
import SDWebImage
13+
#if !os(macOS)
1314
import UIKit
15+
import UIKit
16+
/// Alias for `UIImage`.
17+
public typealias JxlPlatformImage = UIImage
18+
#else
19+
import AppKit.NSImage
20+
/// Alias for `NSImage`.
21+
public typealias JxlPlatformImage = NSImage
22+
#endif
23+
1424

1525
public class JxlSDWebImageCoder: NSObject, SDImageCoder {
1626
public override init() {
@@ -23,7 +33,7 @@ public class JxlSDWebImageCoder: NSObject, SDImageCoder {
2333
return (try? JXLCoder.isJXL(data: data)) ?? false
2434
}
2535

26-
public func decodedImage(with data: Data?, options: [SDImageCoderOption : Any]? = nil) -> UIImage? {
36+
public func decodedImage(with data: Data?, options: [SDImageCoderOption : Any]? = nil) -> JxlPlatformImage? {
2737
guard let data else {
2838
return nil
2939
}
@@ -34,7 +44,7 @@ public class JxlSDWebImageCoder: NSObject, SDImageCoder {
3444
true
3545
}
3646

37-
public func encodedData(with image: UIImage?, format: SDImageFormat, options: [SDImageCoderOption : Any]? = nil) -> Data? {
47+
public func encodedData(with image: JxlPlatformImage?, format: SDImageFormat, options: [SDImageCoderOption : Any]? = nil) -> Data? {
3848
guard let image else {
3949
return nil
4050
}

Podfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Uncomment the next line to define a global platform for your project
2+
# platform :ios, '9.0'
3+
4+
target 'Jxl Coder' do
5+
# Comment the next line if you don't want to use dynamic frameworks
6+
use_frameworks!
7+
8+
# Pods for Jxl Coder
9+
pod 'SDWebImage'
10+
end

Podfile.lock

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
PODS:
2+
- SDWebImage (5.18.0):
3+
- SDWebImage/Core (= 5.18.0)
4+
- SDWebImage/Core (5.18.0)
5+
6+
DEPENDENCIES:
7+
- SDWebImage
8+
9+
SPEC REPOS:
10+
trunk:
11+
- SDWebImage
12+
13+
SPEC CHECKSUMS:
14+
SDWebImage: 182830bcddc30cde95fbc60dfe4badc3553d94ba
15+
16+
PODFILE CHECKSUM: 9aebb10bf60cb436a5fd5ab5764794ed8623b980
17+
18+
COCOAPODS: 1.12.1

0 commit comments

Comments
 (0)