image - Android - Reading EXIF information from file using ExifReader very slow -
i have image processing app needs remember photos processed. solution came store given string ("abc-"), exif make tag. so, in order filter photos, app needs read exif make attribute see if contains string ("abc-"). have tested following code , execution took around 15 seconds on friend's phone android 5.1.1 cyanogenmod , 1000 photos, poor time.
public boolean isalreadyprocessed(file imagefile) { android.media.exifinterface exifinterface = new exifinterface(imagefile.getabsolutepath()); string attribute = exifinterface.getattribute(exifinterface.tag_make); return attribute.contains("abc-"); }
other solution thought store processed images filenames sqlite database. faster option, has problem if user copys photos new device, app wouldn't remember photos processed, need backup database cloud , restore on new device.
so, there more efficient way read exif image metadata? if not, there better way accomplish second way mentioned (to store images names in database)?
thank you
Comments
Post a Comment