Closed KasemJaffer closed 5 years ago
Hello,
Thanks for the library it helped a lot. Can you support saving HEIC images on iOS? Currently it's throwing unsupported_file exception.
unsupported_file
Here is how you identify the file is of HEIC format.
var values: UInt8 = 0 data.copyBytes(to: &values, count: 1) switch values { case 0x49, 0x4D: // image/tiff case 0x00: if (data.count >= 12) { //....ftypheic ....ftypheix ....ftyphevc ....ftyphevx let testString = String(data: data.subdata(in: 4..<12), encoding: .nonLossyASCII) if (testString == "ftypheic" || testString == "ftypheix" || testString == "ftyphevc" || testString == "ftyphevx") { // image/heic // TODO: Implement saving HEIC properly } }
I tried to implement it myself but with no success. Would very much appreciate it if you find a way to save HEIC as is.
Thank you!
Just found a way and pushed a pull request. https://github.com/ko2ic/image_downloader/pull/31
The image widget of flutter does not support heic, so it was saved as jpeg. android is not compatible.
Hello,
Thanks for the library it helped a lot. Can you support saving HEIC images on iOS? Currently it's throwing
unsupported_file
exception.Here is how you identify the file is of HEIC format.
I tried to implement it myself but with no success. Would very much appreciate it if you find a way to save HEIC as is.
Thank you!