Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
muukii committed Nov 26, 2023
1 parent f4ed871 commit 4231864
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
20 changes: 10 additions & 10 deletions Dev/Brightroom.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
DEVELOPMENT_TEAM = JX92XL88RZ;
INFOPLIST_FILE = "$(SRCROOT)/Sources/Demo/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -2619,7 +2619,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
DEVELOPMENT_TEAM = JX92XL88RZ;
INFOPLIST_FILE = "$(SRCROOT)/Sources/Demo/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -2640,7 +2640,7 @@
CODE_SIGN_STYLE = Automatic;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_ASSET_PATHS = "\"Sources/SwiftUIDemo/Preview Content\"";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = JX92XL88RZ;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Sources/SwiftUIDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
Expand All @@ -2662,7 +2662,7 @@
CODE_SIGN_STYLE = Automatic;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "\"Sources/SwiftUIDemo/Preview Content\"";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = JX92XL88RZ;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Sources/SwiftUIDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
Expand All @@ -2682,7 +2682,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_STYLE = Automatic;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = GKNHX9R5U2;
DEVELOPMENT_TEAM = JX92XL88RZ;
INFOPLIST_FILE = "Tests/$(TARGET_NAME)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -2702,7 +2702,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_STYLE = Automatic;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = GKNHX9R5U2;
DEVELOPMENT_TEAM = JX92XL88RZ;
INFOPLIST_FILE = "Tests/$(TARGET_NAME)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -2721,7 +2721,7 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
DEVELOPMENT_TEAM = JX92XL88RZ;
INFOPLIST_FILE = "$(SRCROOT)/Bundle/LUTs/Import LUT/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -2742,7 +2742,7 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
DEVELOPMENT_TEAM = JX92XL88RZ;
INFOPLIST_FILE = "$(SRCROOT)/Bundle/LUTs/Import LUT/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -2763,7 +2763,7 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
DEVELOPMENT_TEAM = JX92XL88RZ;
INFOPLIST_FILE = Bundle/LUTs/ShareLUT/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -2784,7 +2784,7 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
DEVELOPMENT_TEAM = JX92XL88RZ;
INFOPLIST_FILE = Bundle/LUTs/ShareLUT/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
6 changes: 5 additions & 1 deletion Sources/BrightroomEngine/DataSource/ImageSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ public final class ImageSource: Equatable {
)!
},
makeCIImage: {
CIImage(image: image)!
if #available(iOS 17.0, *) {
CIImage(image: image, options: [.expandToHDR : true])!
} else {
CIImage(image: image, options: [:])!
}
}
)
}
Expand Down
1 change: 1 addition & 0 deletions Sources/BrightroomUI/Shared/Components/Crop/CropView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public final class CropView: UIView, UIScrollViewDelegate {
addSubview(scrollView)
addSubview(guideView)

imageView.preferredImageDynamicRange = .high
imageView.isUserInteractionEnabled = true
scrollView.addSubview(imageView)
scrollView.delegate = self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ open class MetalImageView: MTKView, CIImageDisplaying, MTKViewDelegate {
clearColor = .init(red: 0, green: 0, blue: 0, alpha: 0)
clearsContextBeforeDrawing = true

if #available(iOS 17.0, *) {
layer.wantsExtendedDynamicRangeContent = true
} else {
// Fallback on earlier versions
}

#if targetEnvironment(simulator)
#else
/// For supporting wide-color - extended sRGB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ final class _ImageView: UIImageView, CIImageDisplaying {
init() {
super.init(frame: .zero)
layer.drawsAsynchronously = true
preferredImageDynamicRange = .high
}

required init?(coder: NSCoder) {
Expand Down

0 comments on commit 4231864

Please sign in to comment.