Skip to content

Commit 41e3369

Browse files
committed
fix: makeup fixed
1 parent 1bbcc61 commit 41e3369

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

iOS/APIExample/APIExample/Examples/Advanced/VideoProcess/VideoProcess.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ extension VideoProcessMain {
636636
}
637637

638638
private func updateMakeup() {
639-
guard let json = try? JSONSerialization.data(withJSONObject: makeupParams, options: .prettyPrinted),
639+
guard let json = try? JSONSerialization.data(withJSONObject: makeupParams, options: []),
640640
let jsonString = String(data: json, encoding: .utf8) else {
641641
print("updateMakeup fail")
642642
return

macOS/APIExample/Examples/Advanced/VideoProcess/VideoProcess.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,10 +726,10 @@ extension VideoProcess {
726726
if type == "slider" {
727727
let value = makeupList[i]["value"] as? [Float] ?? []
728728
let sliderView = NSSlider()
729-
sliderView.doubleValue = Double(makeupParams[key] as? Float ?? 0)
730729
label.stringValue = String(format: "%@[%.3f]", label.stringValue, sliderView.doubleValue)
731730
sliderView.minValue = Double(value.first ?? 0)
732731
sliderView.maxValue = Double(value.last ?? 1)
732+
sliderView.doubleValue = Double(makeupParams[key] as? Double ?? 0)
733733
sliderView.target = self
734734
sliderView.action = #selector(makeupSliderAction(_:))
735735
valueView = sliderView
@@ -797,7 +797,7 @@ extension VideoProcess {
797797
}
798798

799799
private func updateMakeup() {
800-
guard let json = try? JSONSerialization.data(withJSONObject: makeupParams, options: .prettyPrinted),
800+
guard let json = try? JSONSerialization.data(withJSONObject: makeupParams, options: []),
801801
let jsonString = String(data: json, encoding: .utf8) else {
802802
print("updateMakeup fail")
803803
return

0 commit comments

Comments
 (0)