Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
muukii committed Jun 10, 2024
1 parent 1f77ca9 commit 04422b5
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 5 deletions.
26 changes: 26 additions & 0 deletions Dev/Brightroom.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
4B36195126105E3900877B21 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B600B29216B7C9E001E1456 /* Assets.xcassets */; };
4B36195626107ADB00877B21 /* path-data in Resources */ = {isa = PBXBuildFile; fileRef = 4B36195526107ADB00877B21 /* path-data */; };
4B3957C92C16D9ED000BD249 /* DemoFilterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3957C82C16D9ED000BD249 /* DemoFilterView.swift */; };
4B3957D12C16DAC3000BD249 /* sun-hdr-rec2020.avif in Resources */ = {isa = PBXBuildFile; fileRef = 4B3957CB2C16DABA000BD249 /* sun-hdr-rec2020.avif */; };
4B3957D22C16DAC3000BD249 /* sun-hdr-p3.avif in Resources */ = {isa = PBXBuildFile; fileRef = 4B3957CA2C16DABA000BD249 /* sun-hdr-p3.avif */; };
4B3957D32C16DAC3000BD249 /* sun-hdr-srgb.avif in Resources */ = {isa = PBXBuildFile; fileRef = 4B3957CC2C16DABA000BD249 /* sun-hdr-srgb.avif */; };
4B3957D42C16DAC4000BD249 /* sun-hdr-rec2020.avif in Resources */ = {isa = PBXBuildFile; fileRef = 4B3957CB2C16DABA000BD249 /* sun-hdr-rec2020.avif */; };
4B3957D52C16DAC4000BD249 /* sun-hdr-p3.avif in Resources */ = {isa = PBXBuildFile; fileRef = 4B3957CA2C16DABA000BD249 /* sun-hdr-p3.avif */; };
4B3957D62C16DAC4000BD249 /* sun-hdr-srgb.avif in Resources */ = {isa = PBXBuildFile; fileRef = 4B3957CC2C16DABA000BD249 /* sun-hdr-srgb.avif */; };
4B4103582611EAA80061A218 /* ImitationTinderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4103572611EAA80061A218 /* ImitationTinderViewController.swift */; };
4B4103602611EAB20061A218 /* DemoImitationsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B41035F2611EAB20061A218 /* DemoImitationsViewController.swift */; };
4B46E71B2B762E20003179C2 /* MondrianLayout in Frameworks */ = {isa = PBXBuildFile; productRef = 4B46E71A2B762E20003179C2 /* MondrianLayout */; };
Expand Down Expand Up @@ -600,6 +606,9 @@
4B36194B26105BEB00877B21 /* RendererTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RendererTests.swift; sourceTree = "<group>"; };
4B36195526107ADB00877B21 /* path-data */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; path = "path-data"; sourceTree = "<group>"; };
4B3957C82C16D9ED000BD249 /* DemoFilterView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DemoFilterView.swift; sourceTree = "<group>"; };
4B3957CA2C16DABA000BD249 /* sun-hdr-p3.avif */ = {isa = PBXFileReference; lastKnownFileType = file; path = "sun-hdr-p3.avif"; sourceTree = "<group>"; };
4B3957CB2C16DABA000BD249 /* sun-hdr-rec2020.avif */ = {isa = PBXFileReference; lastKnownFileType = file; path = "sun-hdr-rec2020.avif"; sourceTree = "<group>"; };
4B3957CC2C16DABA000BD249 /* sun-hdr-srgb.avif */ = {isa = PBXFileReference; lastKnownFileType = file; path = "sun-hdr-srgb.avif"; sourceTree = "<group>"; };
4B4103572611EAA80061A218 /* ImitationTinderViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImitationTinderViewController.swift; sourceTree = "<group>"; };
4B41035F2611EAB20061A218 /* DemoImitationsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoImitationsViewController.swift; sourceTree = "<group>"; };
4B524FE229B8F6A600C1A416 /* Brightroom */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Brightroom; path = ..; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1143,6 +1152,16 @@
path = Library;
sourceTree = "<group>";
};
4B3957CD2C16DABA000BD249 /* hdr-images */ = {
isa = PBXGroup;
children = (
4B3957CA2C16DABA000BD249 /* sun-hdr-p3.avif */,
4B3957CB2C16DABA000BD249 /* sun-hdr-rec2020.avif */,
4B3957CC2C16DABA000BD249 /* sun-hdr-srgb.avif */,
);
path = "hdr-images";
sourceTree = "<group>";
};
4B4103562611EA8C0061A218 /* Imitations */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1332,6 +1351,7 @@
4BE9B3D1260BA72D000A3D09 /* Bundle */ = {
isa = PBXGroup;
children = (
4B3957CD2C16DABA000BD249 /* hdr-images */,
4B2A10F9266B7AF800B0C885 /* image-test-suite */,
4BE9B3D0260BA720000A3D09 /* Images */,
4B1E95292176F52100E9DFB8 /* LUTs */,
Expand Down Expand Up @@ -1923,6 +1943,9 @@
4BA41C86260CE817005E6FA7 /* orientation_down.HEIC in Resources */,
4BA41C85260CE817005E6FA7 /* orientation_left.HEIC in Resources */,
4BA41C84260CE817005E6FA7 /* orientation_left_mirrored.HEIC in Resources */,
4B3957D42C16DAC4000BD249 /* sun-hdr-rec2020.avif in Resources */,
4B3957D52C16DAC4000BD249 /* sun-hdr-p3.avif in Resources */,
4B3957D62C16DAC4000BD249 /* sun-hdr-srgb.avif in Resources */,
4BA41C82260CE817005E6FA7 /* orientation_up_mirrored.HEIC in Resources */,
4BB7B9CC277A452A0014B62A /* LUT_64_Gloss.png in Resources */,
4B600B2A216B7C9E001E1456 /* Assets.xcassets in Resources */,
Expand Down Expand Up @@ -1951,6 +1974,9 @@
4BA41C92260CE817005E6FA7 /* orientation_right.HEIC in Resources */,
4BA41C93260CE817005E6FA7 /* orientation_up.HEIC in Resources */,
4BA41C94260CE817005E6FA7 /* orientation_down_mirrored.HEIC in Resources */,
4B3957D12C16DAC3000BD249 /* sun-hdr-rec2020.avif in Resources */,
4B3957D22C16DAC3000BD249 /* sun-hdr-p3.avif in Resources */,
4B3957D32C16DAC3000BD249 /* sun-hdr-srgb.avif in Resources */,
4BA41C8D260CE817005E6FA7 /* orientation_up_mirrored.HEIC in Resources */,
4BB7B9CD277A452A0014B62A /* LUT_64_Gloss.png in Resources */,
4BA41C8F260CE817005E6FA7 /* orientation_left_mirrored.HEIC in Resources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"location" : "https://github.com/FluidGroup/TextureSwiftSupport",
"state" : {
"branch" : "main",
"revision" : "5bae50cab3798dccb8b98c3ffbc70320ae66b45a"
"revision" : "3042c19dc5d67005222b7b422494805bcf2d7f18"
}
},
{
Expand Down
4 changes: 4 additions & 0 deletions Dev/Sources/SharedForDemo/Mocks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ enum Mocks {
UIImage(named: "orientation_left.HEIC")!
}

static func hdrImage() -> UIImage {
UIImage(named: "sun-hdr-p3")!
}

static func makeEditingStack(image: UIImage) -> EditingStack {
.init(
imageProvider: .init(image: image)
Expand Down
10 changes: 10 additions & 0 deletions Dev/Sources/SwiftUIDemo/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ struct ContentView: View {
})
}

Section("HDR") {
Button("Local") {
fullScreenView = .init {
DemoCropView(
editingStack: { Mocks.makeEditingStack(image: Mocks.hdrImage()) }
)
}
}
}

Section("Restoration Horizontal") {
Button("Crop") {
fullScreenView = .init {
Expand Down
6 changes: 2 additions & 4 deletions Sources/BrightroomUI/Shared/Components/Crop/CropView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,8 @@ public final class CropView: UIView, UIScrollViewDelegate {
addSubview(guideBackdropView)
addSubview(guideView)

imageView.preferredImageDynamicRange = .high
imageView.isUserInteractionEnabled = true
scrollView.addSubview(imageView)

imagePlatterView.isUserInteractionEnabled = true
scrollView.addSubview(imagePlatterView)
scrollView.delegate = self

guideView.willChange = { [weak self] in
Expand Down

0 comments on commit 04422b5

Please sign in to comment.