|
@@ -62,10 +62,15 @@ open class PQImageFilter: PQBaseFilter {
|
|
|
|
|
|
autoreleasepool {
|
|
|
if newImage == nil {
|
|
|
- let filePath = documensDirectory + (mSticker?.locationPath ?? "")
|
|
|
- if FileManager.default.fileExists(atPath: filePath) {
|
|
|
+
|
|
|
+ var imageFilePath = mSticker?.locationPath ?? ""
|
|
|
+ if (!imageFilePath.contains("var/mobile/Media")) {
|
|
|
+ imageFilePath = documensDirectory + imageFilePath
|
|
|
+ }
|
|
|
+ BFLog(message: "imageFilePath is \(imageFilePath)")
|
|
|
+ if FileManager.default.fileExists(atPath: imageFilePath) {
|
|
|
|
|
|
- let fileData: Data = try! Data(contentsOf: URL(fileURLWithPath: filePath))
|
|
|
+ let fileData: Data = try! Data(contentsOf: URL(fileURLWithPath: imageFilePath))
|
|
|
if fileData.count != 0, fileData.isWebPFormat {
|
|
|
newImage = WebPProcessor.default.process(item: ImageProcessItem.data(fileData), options: KingfisherParsedOptionsInfo([.onlyLoadFirstFrame, .scaleFactor(1)]))
|
|
|
}
|