Skip to content

Observed multiple instances of PNG chunk 'eXIf', for which multiples are not allowed #683

@Nathipha

Description

@Nathipha

Java 8, metadata-extractor 2.19.0, xmpcore 6.1.11
I'm trying to read the metadata of this png image (also attached it) with the following code:

String input = "C:\\misc\\EXIF\\testimgs\\Minions-png-1.png";

try {
    File img = new File(input);
    Metadata meta = ImageMetadataReader.readMetadata(img);
} catch(Exception e) {
    e.printStackTrace();
}

...but it's throwing an Exception:

com.drew.imaging.png.PngProcessingException: Observed multiple instances of PNG chunk 'eXIf', for which multiples are not allowed
	at com.drew.imaging.png.PngChunkReader.extract(PngChunkReader.java:115)
	at com.drew.imaging.png.PngMetadataReader.readMetadata(PngMetadataReader.java:103)
	at com.drew.imaging.ImageMetadataReader.readMetadata(ImageMetadataReader.java:157)
	at com.drew.imaging.ImageMetadataReader.readMetadata(ImageMetadataReader.java:124)
	at com.drew.imaging.ImageMetadataReader.readMetadata(ImageMetadataReader.java:204)
	at Main.main(Main.java:41)

This seems to be the same as in the second to last post in this issue thread (but the other poster hasn't created his own issue yet).

How do I go about fixing this?

Minions-png-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions