brendan-duncan / archive

Dart library to encode and decode various archive and compression formats, such as Zip, Tar, GZip, ZLib, and BZip2.
MIT License
403 stars 140 forks source link

JPG lost GPS Info after encoder #273

Closed cgztzero closed 1 year ago

cgztzero commented 1 year ago

Hello every, I find a problem that I can not solve it. I have a folder, all files in this folder are JPG. I encode this folder to a .zip file, there are my codes:

List list = dataDir.listSync(); int length = list.length; for (int index = 0; index < length; index++) { final element = list[index]; await encoder.addFile(File(element.path),null,ZipFileEncoder.STORE); onZipping!(element.path, false, ((index+1) 1.0 / length) 100); } encoder.close();

But I unzip .zip file ,I find all JPG files lost GPS info. before zip 2 after zip 1

My device is an UAV controller, It's an Android 11 OS Is there someone could help me, thanks a lot.

cgztzero commented 1 year ago

I solved the problem. I need request the accessMediaLocation first.