use of com.aviary.android.feather.library.media.ExifInterfaceWrapper in project mobile-android by photo.
the class FeatherActivity method saveExif.
protected void saveExif(String path) {
logger.log("saveExif: " + path);
if (null == path) {
return;
}
LocalDataService data = mFilterManager.getService(LocalDataService.class);
ExifInterfaceWrapper newexif = null;
if (null != data) {
try {
newexif = new ExifInterfaceWrapper(path);
} catch (IOException e) {
logger.error(e.getMessage());
e.printStackTrace();
return;
}
;
Bundle bundle = data.getOriginalExifBundle();
if (null != bundle) {
try {
newexif.copyFrom(bundle);
newexif.setAttribute(ExifInterfaceWrapper.TAG_ORIENTATION, "0");
newexif.setAttribute(ExifInterfaceWrapper.TAG_SOFTWARE, "Aviary for Android " + SDK_VERSION);
// implements this to include your own tags
onSaveCustomTags(newexif);
newexif.saveAttributes();
} catch (Throwable t) {
t.printStackTrace();
logger.error(t.getMessage());
}
}
}
}
use of com.aviary.android.feather.library.media.ExifInterfaceWrapper in project mobile-android by photo.
the class ExifTask method call.
@Override
public Bundle call(EffectContext context, String path) {
if (path == null) {
return null;
}
Bundle result = new Bundle();
try {
ExifInterfaceWrapper exif = new ExifInterfaceWrapper(path);
exif.copyTo(result);
} catch (Throwable t) {
t.printStackTrace();
}
return result;
}
Aggregations