public interface IExif
Defines base operations intended to work with EXIF metadata.
Learn more
This code sample demonstrates how to extract basic EXIF metadata properties.
try (Metadata metadata = new Metadata(Constants.TiffWithExif)) { IExif root = (IExif) metadata.getRootPackage(); if (root.getExifPackage() != null) { System.out.println(root.getExifPackage().getArtist()); System.out.println(root.getExifPackage().getCopyright()); System.out.println(root.getExifPackage().getImageDescription()); System.out.println(root.getExifPackage().getMake()); System.out.println(root.getExifPackage().getModel()); System.out.println(root.getExifPackage().getSoftware()); System.out.println(root.getExifPackage().getImageWidth()); System.out.println(root.getExifPackage().getImageLength()); // ... System.out.println(root.getExifPackage().getExifIfdPackage().getBodySerialNumber()); System.out.println(root.getExifPackage().getExifIfdPackage().getCameraOwnerName()); System.out.println(root.getExifPackage().getExifIfdPackage().getUserComment()); // ... System.out.println(root.getExifPackage().getGpsPackage().getAltitude()); System.out.println(root.getExifPackage().getGpsPackage().getLatitudeRef()); System.out.println(root.getExifPackage().getGpsPackage().getLongitudeRef()); // ... } }
Modifier and Type | Method and Description |
---|---|
ExifPackage |
getExifPackage()
Gets the EXIF metadata package associated with the file.
|
void |
setExifPackage(ExifPackage value)
Sets the EXIF metadata package associated with the file.
|
ExifPackage getExifPackage()
Gets the EXIF metadata package associated with the file.
void setExifPackage(ExifPackage value)
Sets the EXIF metadata package associated with the file.
value
- The EXIF metadata package associated with the file.