Read metadata with ExifTool

chinna_82

I'm trying to read illustrator file metadata value by using Exiftool. I tried as per below.

File[] images = new File("filepath").listFiles();
ExifTool tool = new ExifTool(Feature.STAY_OPEN);
for(File f : images) {
    if (f.toString().contains(".ai"))
    {
        System.out.println("test "+tool.getImageMeta(f, Tag.DATE_TIME_ORIGINAL));
    }
}
tool.close(); 

Above code not printing any value. I even tried this.

public static final File[] IMAGES = new File("filepath").listFiles();
ExifTool tool = new ExifTool(Feature.STAY_OPEN);
for (File f : IMAGES) {
System.out.println("\n[" + f.getName() + "]");
System.out.println(tool.getImageMeta(f, Format.NUMERIC,
Tag.values()));
}

Which only prints {IMAGE_HEIGHT=2245, IMAGE_WIDTH=5393}. How do I call metadata values using Exiftool. Any advices and references links are highly appreciated.

jhubscher

For the given API, it either;

1-does not contain the tag you are looking for

2-the file itself might not have that tag filled

3-you might want to recreate your own using a more general tag command when calling exiftool.exe

Look in the source code and find the enum containing all the tags available to the API, that'll show you what you're restricted to. But yeah, you might want to consider making your own class similar to the one you're using. I'm in the midst of doing the same. That way you can store the tags in perhaps a set or HashMap instead of an enum and therefore be much less limited in tag choice. Then, all you have to do is write the commands for the tags you want to the process's OutputStream and then read the results from the InputStream.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Read metadata with ExifTool

From Dev

How to prevent recovering metadata when using ExifTool?

From Dev

Exiftool to create OSX visible XMP metadata in PNG images

From Dev

How can I embed metadata into a custom XMP field with exiftool?

From Dev

Write PDF metadata from the file name using Exiftool or PDFtk

From Dev

Is there a way to get Exiftool to recursively scan the metadata of files embedded within files?

From Dev

Add part of filename as PDF metadata using bash script and exiftool

From Dev

Read tags from JPG using Exiftool and NodeJS

From Dev

Weblogic read metadata file

From Dev

Bash Script that exports Apple Tags (Mavericks Tags) to IPTC "Keywords" metadata (using 'Tag' and 'ExifTool')

From Dev

ExifTool - How to remove all metadata from all files possible inside a folder and all its subfolders?

From Dev

read metadata of a Doctrine entity property

From Dev

Can not read _metadata for StateBackend Flink

From Dev

read video metadata in objective c

From Dev

React audio element read metadata

From Dev

Eclipse faceted project metadata file could not be read

From Dev

How to read PDF metadata from R

From Dev

Read/Get TypeRef table from assembly metadata

From Dev

Read Dynamics NAV Table Metadata with SQL

From Dev

How to read Python package metadata without installation?

From Dev

ColdFusion cffile action="read" how to get metadata?

From Dev

How can I read the metadata of a type at runtime?

From Dev

Read Custom Image Tag Metadata using PHP

From Dev

Read Dynamics NAV Table Metadata with SQL

From Dev

Eclipse faceted project metadata file could not be read

From Dev

iText -> Best approach to read XMP metadata?

From Dev

could not figure out how to read the metadata

From Dev

Gmail API read metadata only scope

From Dev

Shell script to read metadata of audio file

Related Related

  1. 1

    Read metadata with ExifTool

  2. 2

    How to prevent recovering metadata when using ExifTool?

  3. 3

    Exiftool to create OSX visible XMP metadata in PNG images

  4. 4

    How can I embed metadata into a custom XMP field with exiftool?

  5. 5

    Write PDF metadata from the file name using Exiftool or PDFtk

  6. 6

    Is there a way to get Exiftool to recursively scan the metadata of files embedded within files?

  7. 7

    Add part of filename as PDF metadata using bash script and exiftool

  8. 8

    Read tags from JPG using Exiftool and NodeJS

  9. 9

    Weblogic read metadata file

  10. 10

    Bash Script that exports Apple Tags (Mavericks Tags) to IPTC "Keywords" metadata (using 'Tag' and 'ExifTool')

  11. 11

    ExifTool - How to remove all metadata from all files possible inside a folder and all its subfolders?

  12. 12

    read metadata of a Doctrine entity property

  13. 13

    Can not read _metadata for StateBackend Flink

  14. 14

    read video metadata in objective c

  15. 15

    React audio element read metadata

  16. 16

    Eclipse faceted project metadata file could not be read

  17. 17

    How to read PDF metadata from R

  18. 18

    Read/Get TypeRef table from assembly metadata

  19. 19

    Read Dynamics NAV Table Metadata with SQL

  20. 20

    How to read Python package metadata without installation?

  21. 21

    ColdFusion cffile action="read" how to get metadata?

  22. 22

    How can I read the metadata of a type at runtime?

  23. 23

    Read Custom Image Tag Metadata using PHP

  24. 24

    Read Dynamics NAV Table Metadata with SQL

  25. 25

    Eclipse faceted project metadata file could not be read

  26. 26

    iText -> Best approach to read XMP metadata?

  27. 27

    could not figure out how to read the metadata

  28. 28

    Gmail API read metadata only scope

  29. 29

    Shell script to read metadata of audio file

HotTag

Archive