ExifPackage class
Leave feedback
On this page
Represents an EXIF metadata package (Exchangeable Image File Format).
Learn more
- Working with EXIF metadata (https://docs.groupdocs.com/display/metadatanet/Working+with+EXIF+metadata)
The ExifPackage type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the ExifPackage class. |
| Method | Description |
|---|---|
| add_properties | Adds known metadata properties satisfying the specified predicate. The operation is recursive so it affects all nested packages as well. (inherited from MetadataPackage) |
| add_properties_func | (inherited from MetadataPackage) |
| clear | Removes all TIFF tags stored in the package. (inherited from ExifDictionaryBasePackage) |
| contains | Returns True if the package contains a metadata property with the specified name; otherwise, False. (inherited from MetadataPackage) |
| contains_file | (inherited from MetadataPackage) |
| contains_string | (inherited from MetadataPackage) |
| find_properties | Finds metadata properties that satisfy the specified predicate, searching recursively through all nested packages. (inherited from MetadataPackage) |
| find_properties_func | (inherited from MetadataPackage) |
| get | (inherited from ExifDictionaryBasePackage) |
| get_enumerator | Returns an enumerator that iterates through the collection. (inherited from MetadataPackage) |
| get_file | (inherited from MetadataPackage) |
| get_string | (inherited from MetadataPackage) |
| get_tiff_tag_id | (inherited from ExifDictionaryBasePackage) |
| remove | Removes the property with the specified id. (inherited from ExifDictionaryBasePackage) |
| remove_properties | Removes metadata properties satisfying the specified predicate. (inherited from MetadataPackage) |
| remove_properties_func | (inherited from MetadataPackage) |
| remove_tiff_tag_id | (inherited from ExifDictionaryBasePackage) |
| sanitize | Removes writable metadata properties from the package, recursively affecting all nested packages. (inherited from MetadataPackage) |
| set | Adds or replaces the specified tag. (inherited from ExifDictionaryBasePackage) |
| set_properties | Sets known metadata properties satisfying the specified predicate. (inherited from MetadataPackage) |
| set_properties_func | (inherited from MetadataPackage) |
| set_tiff_tag | (inherited from ExifDictionaryBasePackage) |
| to_list | Creates a list from the package. (inherited from ExifDictionaryBasePackage) |
| update_properties | Updates known metadata properties that satisfy the specified predicate, recursively affecting all nested packages. (inherited from MetadataPackage) |
| update_properties_func | (inherited from MetadataPackage) |
| Property | Description |
|---|---|
| artist | The name of the camera owner, photographer, or image creator. |
| copyright | The copyright notice. |
| date_time | The date and time of image creation. In the EXIF standard, it is the date and time the file was changed. |
| exif_ifd_package | The EXIF IFD data. |
| gps_package | The GPS data. |
| image_description | The image description, a character string giving the title of the image. It may be a comment such as “1988 company picnic” or similar. |
| image_length | The number of rows of image data. |
| image_width | The number of columns of image data, equal to the number of pixels per row. |
| make | The manufacturer of the recording equipment that generated the image. |
| model | The model name or model number of the equipment. |
| orientation | The orientation. |
| software | The name and version of the software or firmware of the camera or image input device used to generate the image. |
| thumbnail | The image thumbnail represented as an array of bytes. |
| count | The number of metadata properties. (inherited from MetadataPackage) |
| keys | The collection of metadata property names. (inherited from MetadataPackage) |
| know_property_descriptors | The collection of descriptors that contain information about properties accessible through the GroupDocs.Metadata search engine. (inherited from MetadataPackage) |
| metadata_type | The metadata type of the package. (inherited from MetadataPackage) |
| property_descriptors | The collection of descriptors that contain information about properties accessible through the GroupDocs.Metadata search engine. (inherited from MetadataPackage) |
from groupdocs.metadata import Metadata
from groupdocs.metadata.standards.exif import ExifPackage
def update_exif_properties():
with Metadata("input.jpg") as metadata:
root = metadata.get_root_package()
# Create an EXIF package if the image doesn't have one yet
if getattr(root, "exif_package", None) is None:
root.exif_package = ExifPackage()
# Assign top-level EXIF properties
root.exif_package.copyright = "Copyright (C) 2026 GroupDocs. All Rights Reserved."
root.exif_package.image_description = "test image"
root.exif_package.software = "GroupDocs.Metadata"
# Assign properties on the EXIF IFD sub-package
root.exif_package.exif_ifd_package.body_serial_number = "test"
root.exif_package.exif_ifd_package.camera_owner_name = "GroupDocs"
root.exif_package.exif_ifd_package.user_comment = "test comment"
# Persist the changes
metadata.save("output.jpg")
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.