I want to write some comment , that can be visible with image editor like irfanview. I have tried to write comment on exif data , but its not showing on comment section. I think the way image editors allow us to comment on the image , are not saved into the exif data. Any idea how to do it. Here is my code.. try { exif = new ExifInterface(filePath);
exif.setAttribute(ExifInterface.TAG_GPS_LATITUDE, geoInfoLAt);
exif.setAttribute(ExifInterface.TAG_GPS_LONGITUDE, geoInfoLon);
exif.setAttribute("GPS Information", "Geo Information Lat-" + geoInfoLAt + " Long-" + geoInfoLon);
exif.setAttribute("comment", "Geo Information: Lat-" + geoInfoLAt + " Long-" + geoInfoLon);
exif.setAttribute("UserComment", "Geo Information: Lat-" + geoInfoLAt + " Long-" + geoInfoLon);
exif.saveAttributes();
Uri baseUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
ContentValues test_values = new ContentValues();
test_values.put(MediaStore.Images.Media.DESCRIPTION, " Lat-" + geoInfoLAt + " Long-" + geoInfoLon);
int res = getContentResolver().update(baseUri, test_values, MediaStore.Images.Media.DATA + "=?", new String[]{filePath}); // works fine!
} catch (IOException e) {
e.printStackTrace();
Logger.showMessage("PictureActivity", e.getLocalizedMessage());
}
.. here UserComment is working and on exif tag it is showing , but i want to write information that can be visible with image editor software like irfanview.
