Ignore:
Timestamp:
2015-04-21T00:42:50+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #11359 - update to metadata-extractor 2.8.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/com/drew/metadata/jpeg/JpegCommentReader.java

    r8132 r8243  
    4848    }
    4949
    50     public void extract(@NotNull byte[] segmentBytes, @NotNull Metadata metadata, @NotNull JpegSegmentType segmentType)
     50    public void readJpegSegments(@NotNull Iterable<byte[]> segments, @NotNull Metadata metadata, @NotNull JpegSegmentType segmentType)
    5151    {
    52         JpegCommentDirectory directory = metadata.getOrCreateDirectory(JpegCommentDirectory.class);
     52        for (byte[] segmentBytes : segments) {
     53            JpegCommentDirectory directory = new JpegCommentDirectory();
     54            metadata.addDirectory(directory);
    5355
    54         // The entire contents of the directory are the comment
    55         directory.setString(JpegCommentDirectory.TAG_COMMENT, new String(segmentBytes));
     56            // The entire contents of the directory are the comment
     57            directory.setString(JpegCommentDirectory.TAG_COMMENT, new String(segmentBytes));
     58        }
    5659    }
    5760}
Note: See TracChangeset for help on using the changeset viewer.