Update Metadata From HEIC File In Java

Metadata Editor for Java applications – Change metadata fields from all popular documents, images and multimedia file formats using metadata editor API for Java.

Download Free Trial

About GroupDocs.Metadata for Java API

GroupDocs.Metadata for Java is an advanced metadata fields manipulation solution to easily read, add, modify, delete, search, compare, replace and export metadata information from images and document formats without using any external software. Edit metadata details from Word documents, Excel spreadsheets, PowerPoint presentations, Outlook emails, OneNote, Visio, Project, PDF, AutoCAD, ZIp, Audio and Video file formats along with the support for working with many other metadata processing features.

Steps for Updating Metadata to HEIC in Java

GroupDocs.Metadata for Java makes it easy for Java developers to edit metadata details to HEIC files from within their applications by implementing a few easy steps.

  • Load the HEIC file to be updated
  • Specify a predicate that will be used to filter desired metadata properties.
  • Pass the predicate and the new value to the UpdateProperties method.
  • Save the changes.

System Requirements

GroupDocs.Metadata for Java APIs are supported on all major platforms and operating systems. Before executing the code below, please make sure that you have the following prerequisites installed on your system.

  • Operating Systems: Microsoft Windows, Linux, MacOS
  • Development Environments: NetBeans, IntelliJ IDEA, Eclipse
  • Java Runtime Environments: J2SE 6.0 and above
  • Get the latest version of GroupDocs.Metadata for Java from Maven

public class UpdatingMetadata
  public static void run() 
    Date threeDaysAgo = new Date(System.currentTimeMillis() - TimeUnit.DAYS.toMillis(3));
    try (Metadata metadata = new Metadata("input.heic"))
        // Update the file creation date/time if the existing value is older than 3 days
        int affected = metadata.updateProperties(new ContainsTagSpecification(Tags.getTime().getCreated()).and(
                new OfTypeSpecification(MetadataPropertyType.DateTime)).and(
                new UpdatingMetadata().new DateBeforeSpecification(threeDaysAgo)), new PropertyValue(new Date()));

        System.out.println(String.format("Affected properties: %s", affected));


  // Define your own specifications to filter metadata properties
  public class DateBeforeSpecification extends Specification
    public DateBeforeSpecification(Date date)

    public final Date getValue()
      return auto_Value;

    private void setValue(Date value)
      auto_Value = value;

    private Date auto_Value;

    public boolean isSatisfiedBy(MetadataProperty candidate)
      Date date = candidate.getValue().toClass(Date.class);
      if (date != null)
        return date.before(getValue());
      return false;

Live Demos of Editing Metadata

Update metadata information to HEIC file right now by visiting GroupDocs.Metadata Live Demos website. The live demo has the following benefits.

No need to download API

No need to write any code

Just upload the source file

Get download link to save the file

Changing Metadata Of Other File Formats

Multi format documents and images metadata editing API for Java. Retrieve metadata of some of the popular file formats as stated below.

Update ZIP Metadata

(Zipped File)

Update XLTX Metadata

(Excel Template)

Update XLTM Metadata

(Excel Macro-Enabled Template)

Update XLT Metadata

(Excel 97 - 2003 Template)

Update XLSX Metadata

(Open XML Workbook)

Update XLSM Metadata

(Macro-enabled Spreadsheet)

Update XLSB Metadata

(Excel Binary Workbook)

Update XLS Metadata

(Microsoft Excel Spreadsheet (Legacy))

Update WMF Metadata

(Windows Metafile)

Update WEBP Metadata

(Raster Web Image Format)

Update WAV Metadata

(WAVE Audio File)

Update VSX Metadata

(Visio Stencil XML File)

Update VSS Metadata

(Visio Stencil File)

Update VSDX Metadata

(Visio Drawing)

Update VSD Metadata

(Visio Drawing File)

Update VDX Metadata

(The 7th Guest Video File)

Update TTF Metadata

(TrueType Font)

Update TTC Metadata

(TrueType Font Collection)

Update TIFF Metadata

(Tagged Image File Format)

Update PSD Metadata

(Photoshop Document)

Update PPTX Metadata

(Open XML presentation Format)

Update PPTM Metadata

(Macro-enabled Presentation File)

Update PPT Metadata

(Microsoft PowerPoint 97-2003)

Update PPSX Metadata

(PowerPoint Slide Show)

Update PPSM Metadata

(Macro-enabled Slide Show)

Update PPS Metadata

(PowerPoint Slide Show)

Update POTX Metadata

(Microsoft PowerPoint Template Presentation)

Update POTM Metadata

(Microsoft PowerPoint Template File)

Update POT Metadata

(Microsoft PowerPoint Template Files)

Update PNG Metadata

(Portable Network Graphic)

Update PDF Metadata

(Portable Document Format)

Update OTF Metadata

(OpenType Font)

Update ODT Metadata

(OpenDocument Text File Format)

Update ODS Metadata

(OpenDocument Spreadsheet)

Update MSG Metadata

(Outlook Message Item File)

Update MPT Metadata

(Microsoft Project Template)

Update MPP Metadata

(Microsoft Project File)

Update MP3 Metadata

(MP3 Audio File)

Update MOV Metadata

(Apple QuickTime Movie)

Update JPF Metadata

(JPEG 2000 Image)

Update JPEG Metadata

(Joint Photographic Expert Group Image)

Update JP2 Metadata

(JPEG 2000 Core Image)

Update HEIF Metadata

(High Efficiency Image Format)

Update GIF Metadata

(Graphical Interchange Format)

Update FLV Metadata

(Flash Video File)

Update EPUB Metadata

(Open eBook File)

Update EML Metadata

(E-Mail Message)

Update EMF Metadata

(Enhanced Metafile Format)

Update DXF Metadata

(Autodesk Drawing Exchange Format)

Update DWG Metadata

(AutoCAD Drawing File)

Update DOTX Metadata

(Microsoft Word Template File )

Update DOTM Metadata

(Microsoft Word 2007+ Template File)

Update DOT Metadata

(Microsoft Word Template Files)

Update DOCX Metadata

(Office 2007+ Word Document)

Update DOCM Metadata

(Microsoft Word 2007 Marco File)

Update DOC Metadata

(Microsoft Word Binary Format)

Update DJVU Metadata

(Graphics File Format)

Update DICOM Metadata

(Digital Imaging and Communications in Medicine)

Update DCM Metadata

(DICOM Image)

Update BMP Metadata

(Bitmap Image File)

Update AVI Metadata

(Audio Video Interleave File)

Update ASF Metadata

(Advanced Systems Format File)

Update MKV Metadata

(Matroska Video File)

Update ONE Metadata

(OneNote Document)

Update DJVU Metadata

(Graphics File Format)

Back to top