ソースを参照

Merge branch 'master' of https://git.yishihui.com/iOS/BFFramework

* 'master' of https://git.yishihui.com/iOS/BFFramework:
  修改提示文字大小
  图片+视频 素材时,切换模式后图片素材丢失问题处理
  模式切换未生效问题
  图片素材有黑边问题
  6X 时选中错误问题
huzhiqiang 3 年 前
コミット
7bd410e0e1

+ 2 - 2
BFFramework/Classes/BFModules/BFCategorys/BFUIImage+Ext.swift

@@ -172,8 +172,8 @@ public extension UIImage {
 
         // 绘制改变大小的图片
         var rect = CGRect.zero
-        rect.size.width = width
-        rect.size.height = height
+        rect.size.width = ceil(width)
+        rect.size.height = ceil(height)
         rect.origin.x = xPos
         rect.origin.y = yPos
 

+ 2 - 7
BFFramework/Classes/PQGPUImage/akfilters/PQImageFilter.swift

@@ -43,16 +43,11 @@ open class PQImageFilter: PQBaseFilter {
 
         // 如果是预览时 对原图进行缩放处理
         if !isExport {
-            var maxLength = max(showUISize.width, showUISize.height)
-
-            maxLength = maxLength + 10
+            let maxLength = max(showUISize.width, showUISize.height)
             newImage = newImage?.nx_scaleWithMaxLength(maxLength: CGFloat(maxLength * UIScreen.main.scale))
 
             BFLog(message: "newImage is \(newImage?.size.width ?? 0) \(newImage?.size.height ?? 0)")
-
-            if newImage!.size.width > 1000 || newImage!.size.height > 1000 {
-                BFLog(message: "sssssssss")
-            }
+ 
         }
 
         // 保证是16的公倍数

+ 2 - 2
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -1412,7 +1412,7 @@ extension PQStuckPointEditerController {
             var tempMaxSpeed: Float = 1
             var tempMinSpeed: Float = 1
             //速度有为0 会出现在切换模式时,目前是共用一个参数值,会清掉老值 TODO
-            if((maxSpeed == 0.0 || minSpeed == 0.0) && selectedDataCount != selectedImageDataCount){
+            if((maxSpeed == 0.0 && minSpeed == 0.0) && selectedDataCount != selectedImageDataCount && model == .createStickersModelSpeed){
                 BFLog(message: "速度参数有错误 要重新计算!!!")
                 dealWithDataSuccess()
                 return
@@ -1602,7 +1602,7 @@ extension PQStuckPointEditerController {
             finallyUserAudioTime = Float(finallyStuckPoints.last ?? 0) + (Float(CMTimeGetSeconds(asset.duration)) - Float(lastSecondPoint))
         }
 
-        playeTimeRange = CMTimeRange(start: CMTime(value: CMTimeValue(Float(finallyStuckPoints.first ?? 0) * Float(BASE_FILTER_TIMESCALE)), timescale: BASE_FILTER_TIMESCALE), end: CMTime(value: CMTimeValue((Float(finallyStuckPoints.last ?? 0)) * Float(BASE_FILTER_TIMESCALE)), timescale: BASE_FILTER_TIMESCALE))
+        playeTimeRange = CMTimeRange(start: CMTime(value: CMTimeValue(Float64(finallyStuckPoints.first ?? 0) * Float64(BASE_FILTER_TIMESCALE)), timescale: BASE_FILTER_TIMESCALE), end: CMTime(value: CMTimeValue((Float64(finallyStuckPoints.last ?? 0)) * Float64(BASE_FILTER_TIMESCALE)), timescale: BASE_FILTER_TIMESCALE))
 
         for (index, usePoint) in finallyStuckPoints.enumerated() {
             BFLog(message: "测试人员最后使用的卡点信息 \(index) : \(usePoint)")

+ 1 - 1
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointPublicController.swift

@@ -229,7 +229,7 @@ class PQStuckPointPublicController: PQBaseViewController {
     lazy var progressTipsLab: UILabel = {
         let progressTipsLab = UILabel()
         progressTipsLab.textAlignment = .center
-        progressTipsLab.font = UIFont.systemFont(ofSize: 16, weight: .medium)
+        progressTipsLab.font = UIFont.systemFont(ofSize: 14, weight: .medium)
         progressTipsLab.numberOfLines = 2
         progressTipsLab.textColor = UIColor.white
         let attributedText = NSMutableAttributedString(string: "0%\n视频正在处理中,请勿离开")

+ 1 - 1
BFFramework/Classes/Stuckpoint/View/PQSpeedSettingView.swift

@@ -141,7 +141,7 @@ class PQSpeedSettingView: UIView {
        
         if viewType == 3{
             if(index > 4 && datas.count < 7 && enableInsert){
-                if(index >= datas.count){
+                if(index >= datas.count - 1){
                     let model = PQSpeedTitleModel()
                     model.title = "\(index + 1)x"
                     model.maxSpeed = Float(index + 1)

+ 4 - 3
BFFramework/Classes/Stuckpoint/ViewModel/PQGPUImagePlayerView.swift

@@ -550,17 +550,18 @@ public class PQGPUImagePlayerView: UIView {
     /// - Parameter currTime: 当前播放时间
     func changeFilter(currTime: Float64) {
         let  starts:CFTimeInterval = CFAbsoluteTimeGetCurrent()
-         
         BFLog(message: " 要查找的 currTime is \(currTime)")
         //1,删除已经显示过的 filter
         self.cacheFilters.removeAll(where: {(filter) -> Bool in
 
-            (Int(currTime * 1000) > Int((filter.stickerInfo?.timelineOut ?? 0.0) * 1000))
+            (currTime > (filter.stickerInfo?.timelineOut ?? 0.0))
+
         })
  
         // 2,找出一个要显示的 fitler
         let showIndex = cacheFilters.firstIndex(where: { (filter) -> Bool in
-            (Int(currTime * 1000) >= Int((filter.stickerInfo?.timelineIn ?? 0.0) * 1000) && Int(currTime * 1000) <= Int((filter.stickerInfo?.timelineOut ?? 0.0) * 1000))
+            (currTime >= (filter.stickerInfo?.timelineIn ?? 0.0) && currTime <= (filter.stickerInfo?.timelineOut ?? 0.0))
+
         })
   
         if(showIndex == nil){