Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
muukii committed Mar 29, 2024
1 parent 29815ac commit 80e5b94
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dev/Sources/SharedForDemo/Mocks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ enum Mocks {
static func imageSuperSmall() -> UIImage {
UIImage(named: "super-small")!
}


static func imageOrientationLeft() -> UIImage {
UIImage(named: "orientation_left.HEIC")!
}

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

Button("PixelEditor left") {
fullScreenView = .init {
DemoPixelEditor(
editingStack: {
EditingStack.init(
imageProvider: .init(image: Mocks.imageOrientationLeft())
)
},
options: .init(croppingAspectRatio: nil)
)
}
}

})

Section("Lab") {
Expand Down
2 changes: 2 additions & 0 deletions Sources/BrightroomEngine/Core/EditingStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ open class EditingStack: Hashable, StoreComponentType {
let image = loadedState.editingSourceCGImage
let imageSize = image.size



let scaledCrop = crop.scaledWithPixelPerfect(
maxPixelSize: max(imageSize.width, imageSize.height)
)
Expand Down

0 comments on commit 80e5b94

Please sign in to comment.