GroupDocsGists
10/19/2017 - 11:38 AM

UpdateExifPropertiesJpegImage.vb

' For complete examples and data files, please go to https://github.com/groupdocsmetadata/GroupDocs_Metadata_NET
' initialize JpegFormat
Dim jpegFormat As New JpegFormat(Common.MapSourceFilePath(filePath))

' get EXIF data
Dim exif As JpegExifInfo = DirectCast(jpegFormat.GetExifInfo(), JpegExifInfo)
If exif Is Nothing Then
    ' initialize EXIF data if null
    exif = New JpegExifInfo()
End If

' set artist
exif.Artist = "Usman"
' set make
exif.Make = "ABC"
' set model
exif.Model = "S120"
' set the name of the camera's owner
exif.CameraOwnerName = "Owner"
' set description
exif.ImageDescription = "sample description"

' update EXIF data
jpegFormat.SetExifInfo(exif)

' commit changes
jpegFormat.Save(Common.MapDestinationFilePath(filePath))