ExifPackage
Contents
[
Hide
]
ExifPackage class
Represents an EXIF metadata package (Exchangeable Image File Format).
public class ExifPackage : ExifDictionaryBasePackage
Constructors
Name | Description |
---|---|
ExifPackage() | Initializes a new instance of the ExifPackage class. |
Properties
Name | Description |
---|---|
Artist { get; set; } | Gets or sets the name of the camera owner, photographer or image creator. |
Copyright { get; set; } | Gets or sets the copyright notice. |
Count { get; } | Gets the number of metadata properties. |
DateTime { get; set; } | Gets or sets the date and time of image creation. In the EXIF standard, it is the date and time the file was changed. |
ExifIfdPackage { get; } | Gets the EXIF IFD data. |
GpsPackage { get; } | Gets the GPS data. |
ImageDescription { get; set; } | Gets or sets a character string giving the title of the image. It may be a comment such as “1988 company picnic” or the like. |
ImageLength { get; set; } | Gets or sets the number of rows of image data. |
ImageWidth { get; set; } | Gets or sets the number of columns of image data, equal to the number of pixels per row. |
Item { get; } | Gets the TIFF tag with the specified id. (2 indexers) |
Keys { get; } | Gets a collection of the metadata property names. |
Make { get; set; } | Gets or sets the manufacturer of the recording equipment. This is the manufacturer of the DSC, scanner, video digitizer or other equipment that generated the image. |
MetadataType { get; } | Gets the metadata type. |
Model { get; set; } | Gets or 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. |
Orientation { get; set; } | Gets or sets the orientation. |
PropertyDescriptors { get; } | Gets a collection of descriptors that contain information about properties accessible through the GroupDocs.Metadata search engine. |
Software { get; set; } | Gets or sets the name and version of the software or firmware of the camera or image input device used to generate the image. |
Thumbnail { get; } | Gets the image thumbnail represented as an array of bytes. |
Methods
Name | Description |
---|---|
virtual AddProperties(Func<MetadataProperty, bool>, PropertyValue) | Adds known metadata properties satisfying the specified predicate. The operation is recursive so it affects all nested packages as well. |
Clear() | Removes all TIFF tags stored in the package. |
Contains(string) | Determines whether the package contains a metadata property with the specified name. |
virtual FindProperties(Func<MetadataProperty, bool>) | Finds the metadata properties satisfying the specified predicate. The search is recursive so it affects all nested packages as well. |
GetEnumerator() | Returns an enumerator that iterates through the collection. |
Remove(TiffTagID) | Removes the property with the specified id. |
virtual RemoveProperties(Func<MetadataProperty, bool>) | Removes metadata properties satisfying the specified predicate. |
virtual Sanitize() | Removes writable metadata properties from the package. The operation is recursive so it affects all nested packages as well. |
Set(TiffTag) | Adds or replaces the specified tag. |
virtual SetProperties(Func<MetadataProperty, bool>, PropertyValue) | Sets known metadata properties satisfying the specified predicate. The operation is recursive so it affects all nested packages as well. This method is a combination of AddProperties and UpdateProperties . If an existing property satisfies the predicate its value is updated. If there is a known property missing in the package that satisfies the predicate it is added to the package. |
ToList() | Creates a list from the package. |
virtual UpdateProperties(Func<MetadataProperty, bool>, PropertyValue) | Updates known metadata properties satisfying the specified predicate. The operation is recursive so it affects all nested packages as well. |
Remarks
Learn more
Examples
This code sample demonstrates how to update common EXIF properties.
using (Metadata metadata = new Metadata(Constants.InputJpeg))
{
IExif root = metadata.GetRootPackage() as IExif;
if (root != null)
{
// Set the EXIF package if it's missing
if (root.ExifPackage == null)
{
root.ExifPackage = new ExifPackage();
}
root.ExifPackage.Copyright = "Copyright (C) 2011-2024 GroupDocs. All Rights Reserved.";
root.ExifPackage.ImageDescription = "test image";
root.ExifPackage.Software = "GroupDocs.Metadata";
// ...
root.ExifPackage.ExifIfdPackage.BodySerialNumber = "test";
root.ExifPackage.ExifIfdPackage.CameraOwnerName = "GroupDocs";
root.ExifPackage.ExifIfdPackage.UserComment = "test comment";
// ...
metadata.Save(Constants.OutputJpeg);
}
}
See Also
- class ExifDictionaryBasePackage
- namespace GroupDocs.Metadata.Standards.Exif
- assembly GroupDocs.Metadata