Skip to content

Commit d7b2d45

Browse files
authored
Merge pull request NGhebreial#19 from quetool/patch-1
Fix for iOS (Swift)
2 parents 1333fbc + ce8aa88 commit d7b2d45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ios/Classes/SwiftFlutterExifRotationPlugin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class SwiftFlutterExifRotationPlugin: NSObject, FlutterPlugin {
2525
let paths = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] as NSString).appendingPathComponent("apple.jpg")
2626
// let image = UIImage(named: "apple.jpg")
2727
print(paths)
28-
let imageData = UIImageJPEGRepresentation(updatedImage, 0.8); fileManager.createFile(atPath: paths as String, contents: imageData, attributes: nil)
28+
let imageData = updatedImage.jpegData(compressionQuality: 0.8); fileManager.createFile(atPath: paths as String, contents: imageData, attributes: nil)
2929

3030
result (paths);
3131

0 commit comments

Comments
 (0)