Changeset 13061 in josm for trunk/src/com/drew/imaging


Ignore:
Timestamp:
2017-10-30T22:46:09+01:00 (5 years ago)
Author:
Don-vip
Message:

fix #15505 - update to metadata-extractor 2.10.1

Location:
trunk/src/com/drew/imaging
Files:
3 added
3 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/com/drew/imaging/ImageProcessingException.java

    r10862 r13061  
    11/*
    2  * Copyright 2002-2016 Drew Noakes
     2 * Copyright 2002-2017 Drew Noakes
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
  • trunk/src/com/drew/imaging/PhotographicConversions.java

    r10862 r13061  
    11/*
    2  * Copyright 2002-2016 Drew Noakes
     2 * Copyright 2002-2017 Drew Noakes
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
  • trunk/src/com/drew/imaging/jpeg/JpegMetadataReader.java

    r10862 r13061  
    11/*
    2  * Copyright 2002-2016 Drew Noakes
     2 * Copyright 2002-2017 Drew Noakes
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
     
    4141//import com.drew.metadata.jfxx.JfxxReader;
    4242import com.drew.metadata.jpeg.JpegCommentReader;
     43import com.drew.metadata.jpeg.JpegDhtReader;
     44import com.drew.metadata.jpeg.JpegDnlReader;
    4345import com.drew.metadata.jpeg.JpegReader;
    4446//import com.drew.metadata.photoshop.DuckyReader;
     
    6365            //new PhotoshopReader(),
    6466            //new DuckyReader(),
    65             new IptcReader()//,
    66             //new AdobeJpegReader()
     67            new IptcReader(),
     68            //new AdobeJpegReader(),
     69            new JpegDhtReader(),
     70            new JpegDnlReader()
    6771    );
    6872
  • trunk/src/com/drew/imaging/jpeg/JpegProcessingException.java

    r10862 r13061  
    11/*
    2  * Copyright 2002-2016 Drew Noakes
     2 * Copyright 2002-2017 Drew Noakes
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
  • trunk/src/com/drew/imaging/jpeg/JpegSegmentData.java

    r10862 r13061  
    11/*
    2  * Copyright 2002-2016 Drew Noakes
     2 * Copyright 2002-2017 Drew Noakes
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
     
    5252     * @param segmentBytes the byte array holding data for the segment being added
    5353     */
     54    @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"})
    5455    public void addSegment(byte segmentType, @NotNull byte[] segmentBytes)
    5556    {
     
    206207     * @param occurrence  the zero-based index of the segment occurrence to remove.
    207208     */
     209    @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"})
    208210    public void removeSegmentOccurrence(@NotNull JpegSegmentType segmentType, int occurrence)
    209211    {
     
    218220     * @param occurrence  the zero-based index of the segment occurrence to remove.
    219221     */
     222    @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"})
    220223    public void removeSegmentOccurrence(byte segmentType, int occurrence)
    221224    {
  • trunk/src/com/drew/imaging/jpeg/JpegSegmentMetadataReader.java

    r8243 r13061  
    1313     */
    1414    @NotNull
    15     public Iterable<JpegSegmentType> getSegmentTypes();
     15    Iterable<JpegSegmentType> getSegmentTypes();
    1616
    1717    /**
     
    2323     * @param segmentType The {@link JpegSegmentType} being read.
    2424     */
    25     public void readJpegSegments(@NotNull final Iterable<byte[]> segments, @NotNull final Metadata metadata, @NotNull final JpegSegmentType segmentType);
     25    void readJpegSegments(@NotNull final Iterable<byte[]> segments, @NotNull final Metadata metadata, @NotNull final JpegSegmentType segmentType);
    2626}
  • trunk/src/com/drew/imaging/jpeg/JpegSegmentReader.java

    r10862 r13061  
    11/*
    2  * Copyright 2002-2016 Drew Noakes
     2 * Copyright 2002-2017 Drew Noakes
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
  • trunk/src/com/drew/imaging/jpeg/JpegSegmentType.java

    r10862 r13061  
    11/*
    2  * Copyright 2002-2016 Drew Noakes
     2 * Copyright 2002-2017 Drew Noakes
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
     
    9393    DQT((byte)0xDB, false),
    9494
     95    /** Define Number of Lines segment identifier. */
     96    DNL((byte)0xDC, false),
     97
     98    /** Define Restart Interval segment identifier. */
     99    DRI((byte)0xDD, false),
     100
     101    /** Define Hierarchical Progression segment identifier. */
     102    DHP((byte)0xDE, false),
     103
     104    /** EXPand reference component(s) segment identifier. */
     105    EXP((byte)0xDF, false),
     106
    95107    /** Define Huffman Table segment identifier. */
    96108    DHT((byte)0xC4, false),
    97109
    98     /** Start-of-Frame (0) segment identifier. */
     110    /** Define Arithmetic Coding conditioning segment identifier. */
     111    DAC((byte)0xCC, false),
     112
     113    /** Start-of-Frame (0) segment identifier for Baseline DCT. */
    99114    SOF0((byte)0xC0, true),
    100115
    101     /** Start-of-Frame (1) segment identifier. */
     116    /** Start-of-Frame (1) segment identifier for Extended sequential DCT. */
    102117    SOF1((byte)0xC1, true),
    103118
    104     /** Start-of-Frame (2) segment identifier. */
     119    /** Start-of-Frame (2) segment identifier for Progressive DCT. */
    105120    SOF2((byte)0xC2, true),
    106121
    107     /** Start-of-Frame (3) segment identifier. */
     122    /** Start-of-Frame (3) segment identifier for Lossless (sequential). */
    108123    SOF3((byte)0xC3, true),
    109124
     
    111126//    SOF4((byte)0xC4, true),
    112127
    113     /** Start-of-Frame (5) segment identifier. */
     128    /** Start-of-Frame (5) segment identifier for Differential sequential DCT. */
    114129    SOF5((byte)0xC5, true),
    115130
    116     /** Start-of-Frame (6) segment identifier. */
     131    /** Start-of-Frame (6) segment identifier for Differential progressive DCT. */
    117132    SOF6((byte)0xC6, true),
    118133
    119     /** Start-of-Frame (7) segment identifier. */
     134    /** Start-of-Frame (7) segment identifier for Differential lossless (sequential). */
    120135    SOF7((byte)0xC7, true),
    121136
    122     /** Start-of-Frame (8) segment identifier. */
    123     SOF8((byte)0xC8, true),
     137    /** Reserved for JPEG extensions. */
     138    JPG((byte)0xC8, true),
    124139
    125     /** Start-of-Frame (9) segment identifier. */
     140    /** Start-of-Frame (9) segment identifier for Extended sequential DCT. */
    126141    SOF9((byte)0xC9, true),
    127142
    128     /** Start-of-Frame (10) segment identifier. */
     143    /** Start-of-Frame (10) segment identifier for Progressive DCT. */
    129144    SOF10((byte)0xCA, true),
    130145
    131     /** Start-of-Frame (11) segment identifier. */
     146    /** Start-of-Frame (11) segment identifier for Lossless (sequential). */
    132147    SOF11((byte)0xCB, true),
    133148
     
    135150//    SOF12((byte)0xCC, true),
    136151
    137     /** Start-of-Frame (13) segment identifier. */
     152    /** Start-of-Frame (13) segment identifier for Differential sequential DCT. */
    138153    SOF13((byte)0xCD, true),
    139154
    140     /** Start-of-Frame (14) segment identifier. */
     155    /** Start-of-Frame (14) segment identifier for Differential progressive DCT. */
    141156    SOF14((byte)0xCE, true),
    142157
    143     /** Start-of-Frame (15) segment identifier. */
     158    /** Start-of-Frame (15) segment identifier for Differential lossless (sequential). */
    144159    SOF15((byte)0xCF, true),
    145160
    146     /** JPEG comment segment identifier. */
     161    /** JPEG comment segment identifier for comments. */
    147162    COM((byte)0xFE, true);
    148163
  • trunk/src/com/drew/imaging/tiff/TiffDataFormat.java

    r10862 r13061  
    11/*
    2  * Copyright 2002-2016 Drew Noakes
     2 * Copyright 2002-2017 Drew Noakes
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
  • trunk/src/com/drew/imaging/tiff/TiffHandler.java

    r10862 r13061  
    11/*
    2  * Copyright 2002-2016 Drew Noakes
     2 * Copyright 2002-2017 Drew Noakes
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
     
    2525import com.drew.lang.annotations.NotNull;
    2626import com.drew.lang.annotations.Nullable;
     27import com.drew.metadata.StringValue;
    2728
    2829import java.io.IOException;
     
    5253    void endingIFD();
    5354
    54     void completed(@NotNull final RandomAccessReader reader, final int tiffHeaderOffset);
    55 
    5655    @Nullable
    5756    Long tryCustomProcessFormat(int tagId, int formatCode, long componentCount);
     
    6867
    6968    void setByteArray(int tagId, @NotNull byte[] bytes);
    70     void setString(int tagId, @NotNull String string);
     69    void setString(int tagId, @NotNull StringValue string);
    7170    void setRational(int tagId, @NotNull Rational rational);
    7271    void setRationalArray(int tagId, @NotNull Rational[] array);
  • trunk/src/com/drew/imaging/tiff/TiffProcessingException.java

    r10862 r13061  
    11/*
    2  * Copyright 2002-2016 Drew Noakes
     2 * Copyright 2002-2017 Drew Noakes
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
  • trunk/src/com/drew/imaging/tiff/TiffReader.java

    r10862 r13061  
    11/*
    2  * Copyright 2002-2016 Drew Noakes
     2 * Copyright 2002-2017 Drew Noakes
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
     
    7777        Set<Integer> processedIfdOffsets = new HashSet<Integer>();
    7878        processIfd(handler, reader, processedIfdOffsets, firstIfdOffset, tiffHeaderOffset);
    79 
    80         handler.completed(reader, tiffHeaderOffset);
    8179    }
    8280
     
    265263                break;
    266264            case TiffDataFormat.CODE_STRING:
    267                 handler.setString(tagId, reader.getNullTerminatedString(tagValueOffset, componentCount));
     265                handler.setString(tagId, reader.getNullTerminatedStringValue(tagValueOffset, componentCount, null));
    268266                break;
    269267            case TiffDataFormat.CODE_RATIONAL_S:
Note: See TracChangeset for help on using the changeset viewer.