public class ExifPackage extends ExifDictionaryBasePackage
Represents an EXIF metadata package (Exchangeable Image File Format).
Learn more
This code sample demonstrates how to update common EXIF properties.
try (Metadata metadata = new Metadata(Constants.InputJpeg)) { IExif root = (IExif) metadata.getRootPackage(); // Set the EXIF package if it's missing if (root.getExifPackage() == null) { root.setExifPackage(new ExifPackage()); } root.getExifPackage().setCopyright("Copyright (C) 2011-2022 GroupDocs. All Rights Reserved."); root.getExifPackage().setImageDescription("test image"); root.getExifPackage().setSoftware("GroupDocs.Metadata"); // ... root.getExifPackage().getExifIfdPackage().setBodySerialNumber("test"); root.getExifPackage().getExifIfdPackage().setCameraOwnerName("GroupDocs"); root.getExifPackage().getExifIfdPackage().setUserComment("test comment"); // ... metadata.save(Constants.OutputJpeg); }
Constructor and Description |
---|
ExifPackage()
Initializes a new instance of the
ExifPackage class. |
Modifier and Type | Method and Description |
---|---|
String |
getArtist()
Gets the name of the camera owner, photographer or image creator.
|
String |
getCopyright()
Gets the copyright notice.
|
String |
getDateTime()
Gets the date and time of image creation.
|
ExifIfdPackage |
getExifIfdPackage()
Gets the EXIF IFD data.
|
ExifGpsPackage |
getGpsPackage()
Gets the GPS data.
|
String |
getImageDescription()
Gets a character string giving the title of the image.
|
int |
getImageLength()
Gets the number of rows of image data.
|
int |
getImageWidth()
Gets the number of columns of image data, equal to the number of pixels per row.
|
String |
getMake()
Gets the manufacturer of the recording equipment.
|
String |
getModel()
Gets the model name or model number of the equipment.
|
String |
getSoftware()
Gets the name and version of the software or firmware of the camera or image input device used to generate the image.
|
byte[] |
getThumbnail()
Gets the image thumbnail represented as an array of bytes.
|
void |
setArtist(String value)
Sets the name of the camera owner, photographer or image creator.
|
void |
setCopyright(String value)
Sets the copyright notice.
|
void |
setDateTime(String value)
Sets the date and time of image creation.
|
void |
setImageDescription(String value)
Sets a character string giving the title of the image.
|
void |
setImageLength(int value)
Sets the number of rows of image data.
|
void |
setImageWidth(int value)
Sets the number of columns of image data, equal to the number of pixels per row.
|
void |
setMake(String value)
Sets the manufacturer of the recording equipment.
|
void |
setModel(String value)
Sets the model name or model number of the equipment.
|
void |
setSoftware(String value)
Sets the name and version of the software or firmware of the camera or image input device used to generate the image.
|
clear, getByTiffTagID, remove, set, toList
addProperties, contains, findProperties, get_Item, getCount, getKeys, getKnowPropertyDescriptors, getMetadataType, getPropertyDescriptors, iterator, removeProperties, sanitize, setProperties, updateProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ExifPackage()
Initializes a new instance of the ExifPackage
class.
public final ExifGpsPackage getGpsPackage()
Gets the GPS data.
public final ExifIfdPackage getExifIfdPackage()
Gets the EXIF IFD data.
public final byte[] getThumbnail()
Gets the image thumbnail represented as an array of bytes.
public final String getArtist()
Gets the name of the camera owner, photographer or image creator.
public final void setArtist(String value)
Sets the name of the camera owner, photographer or image creator.
value
- The name of the camera owner, photographer or image creator.public final String getCopyright()
Gets the copyright notice.
public final void setCopyright(String value)
Sets the copyright notice.
value
- The copyright notice.public final String getDateTime()
Gets the date and time of image creation. In the EXIF standard, it is the date and time the file was changed.
public final void setDateTime(String value)
Sets the date and time of image creation. In the EXIF standard, it is the date and time the file was changed.
value
- The date and time of image creation.public final String getImageDescription()
Gets a character string giving the title of the image. It may be a comment such as "1988 company picnic" or the like.
public final void setImageDescription(String value)
Sets a character string giving the title of the image. It may be a comment such as "1988 company picnic" or the like.
value
- The image description.public final int getImageLength()
Gets the number of rows of image data.
public final void setImageLength(int value)
Sets the number of rows of image data.
value
- The number of rows of image data.public final int getImageWidth()
Gets the number of columns of image data, equal to the number of pixels per row.
public final void setImageWidth(int value)
Sets the number of columns of image data, equal to the number of pixels per row.
value
- The number of columns of image data, equal to the number of pixels per row.public final String getMake()
Gets the manufacturer of the recording equipment. This is the manufacturer of the DSC, scanner, video digitizer or other equipment that generated the image.
public final void setMake(String value)
Sets the manufacturer of the recording equipment. This is the manufacturer of the DSC, scanner, video digitizer or other equipment that generated the image.
value
- The manufacturer of the recording equipment.public final String getModel()
Gets the model name or model number of the equipment. This is the model name or number of the DSC, scanner, video digitizer or other equipment that generated the image.
public final void setModel(String value)
Sets the model name or model number of the equipment. This is the model name or number of the DSC, scanner, video digitizer or other equipment that generated the image.
value
- The model name or model number of the equipment.public final String getSoftware()
Gets the name and version of the software or firmware of the camera or image input device used to generate the image.
public final void setSoftware(String value)
Sets the name and version of the software or firmware of the camera or image input device used to generate the image.
value
- The name and version of the software or firmware of the camera or image input device used to generate the image.