0
UIImageJPEGRepresentation
으로 데이터를 변환하고 압축 값을 알 수 없으므로 바이트 수를 찾지 못합니다. 이것을 할 수있는 다른 방법이 있습니까?iOS Image Picker에서 가져온 JPEG의 실제 크기를 찾는 방법은 무엇입니까?
UIImageJPEGRepresentation
으로 데이터를 변환하고 압축 값을 알 수 없으므로 바이트 수를 찾지 못합니다. 이것을 할 수있는 다른 방법이 있습니까?iOS Image Picker에서 가져온 JPEG의 실제 크기를 찾는 방법은 무엇입니까?
let assetPath = info[UIImagePickerControllerReferenceURL] as! NSURL
let asset = PHAsset.fetchAssets(withALAssetURLs: [assetPath as URL], options: nil).lastObject
PHImageManager().requestImageData(for: asset!, options: nil) { (data, value, orientation, info) in
// data?.count will give total bytes
print(data?.count)
}