Changeset 15217 in josm for trunk/src/com/drew/metadata/iptc


Ignore:
Timestamp:
2019-07-07T01:56:46+02:00 (7 years ago)
Author:
Don-vip
Message:

see #17848 - update to metadata-extractor 2.12.0

Location:
trunk/src/com/drew/metadata/iptc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/com/drew/metadata/iptc/IptcDescriptor.java

    r13061 r15217  
    11/*
    2  * Copyright 2002-2017 Drew Noakes
     2 * Copyright 2002-2019 Drew Noakes and contributors
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
  • trunk/src/com/drew/metadata/iptc/IptcDirectory.java

    r13061 r15217  
    11/*
    2  * Copyright 2002-2017 Drew Noakes
     2 * Copyright 2002-2019 Drew Noakes and contributors
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
  • trunk/src/com/drew/metadata/iptc/IptcReader.java

    r13061 r15217  
    11/*
    2  * Copyright 2002-2017 Drew Noakes
     2 * Copyright 2002-2019 Drew Noakes and contributors
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
     
    118118            }
    119119
    120             // we need at least five bytes left to read a tag
    121             if (offset + 5 > length) {
     120            // we need at least four bytes left to read a tag
     121            if (offset + 4 > length) {
    122122                directory.addError("Too few bytes remain for a valid IPTC tag");
    123123                return;
     
    130130                directoryType = reader.getUInt8();
    131131                tagType = reader.getUInt8();
    132                 // TODO support Extended DataSet Tag (see 1.5(c), p14, IPTC-IIMV4.2.pdf)
    133132                tagByteCount = reader.getUInt16();
     133                if (tagByteCount > 32767) {
     134                    // Extended DataSet Tag (see 1.5(c), p14, IPTC-IIMV4.2.pdf)
     135                    tagByteCount = ((tagByteCount & 0x7FFF) << 16) | reader.getUInt16();
     136                    offset += 2;
     137                }
    134138                offset += 4;
    135139            } catch (IOException e) {
  • trunk/src/com/drew/metadata/iptc/Iso2022Converter.java

    r13061 r15217  
    11/*
    2  * Copyright 2002-2017 Drew Noakes
     2 * Copyright 2002-2019 Drew Noakes and contributors
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
Note: See TracChangeset for help on using the changeset viewer.