Various fixes

This commit is contained in:
Ilya Laktyushin
2023-07-07 13:29:45 +02:00
parent 9a875f27b2
commit 2a9344b7f5
6 changed files with 19 additions and 11 deletions

View File

@@ -267,7 +267,9 @@ private func makeEditorImageFrameComposition(context: CIContext, inputImage: CII
image = image.transformed(by: resetTransform)
var baseScale: CGFloat = 1.0
if let baseSize = entity.baseSize {
if let entityBaseScale = entity.baseScale {
baseScale = entityBaseScale
} else if let baseSize = entity.baseSize {
baseScale = baseSize.width / image.extent.width
if baseSize.width != baseSize.height {
baseScale *= min(baseSize.width, baseSize.height) / max(baseSize.width, baseSize.height)