Examples of IPTCRecord


Examples of org.apache.sanselan.formats.jpeg.iptc.IPTCRecord

    List records = photoshopApp13Data.getRecords();
    Collections.sort(records, IPTCRecord.COMPARATOR);
    for (int j = 0; j < records.size(); j++)
    {
      IPTCRecord element = (IPTCRecord) records.get(j);
      if (element.iptcType.type != IPTC_TYPE_RECORD_VERSION.type)
        add(element.getIptcTypeName(), element.getValue());
    }
  }
View Full Code Here

Examples of org.apache.sanselan.formats.jpeg.iptc.IPTCRecord

        List records = photoshopApp13Data.getRecords();
        Collections.sort(records, IPTCRecord.COMPARATOR);
        for (int j = 0; j < records.size(); j++)
        {
            IPTCRecord element = (IPTCRecord) records.get(j);
            if (element.iptcType.type != IPTC_TYPE_RECORD_VERSION.type)
                add(element.getIptcTypeName(), element.getValue());
        }
    }
View Full Code Here

Examples of org.apache.sanselan.formats.jpeg.iptc.IPTCRecord

        }
        List<IPTCRecord> newRecords = new ArrayList<>();

        for (IPTCRecord record : iptcRecords) {
      if (record.iptcType.type == IPTCConstants.IPTC_TYPE_ORIGINATING_PROGRAM.type) {
          newRecords.add(new IPTCRecord(IPTCConstants.IPTC_TYPE_ORIGINATING_PROGRAM,
            "Dexifier by Andreas Reichart <andreas.reichart@gmail.com>"));
      } else {
          newRecords.add(record);
      }
        }

        PhotoshopApp13Data pApp13Data = new PhotoshopApp13Data(newRecords, nonIptcBlocks);
        iRewriter.writeIPTC(imageByte, bOutputStream, pApp13Data);

    }

    if (!removeExif && removeIptc) {
        HashMap<String, Boolean> params = new HashMap<>();
        params.put(SanselanConstants.PARAM_KEY_READ_THUMBNAILS, false);
        JpegPhotoshopMetadata pMetaData = new JpegImageParser().getPhotoshopMetadata(new ByteSourceFile(f),
          params);
        assert (pMetaData != null);
        // List<?> emptyRecords = pMetaData.photoshopApp13Data.getRawBlocks();

        List<IPTCRecord> emptyRecords = new ArrayList<IPTCRecord>();
        List<IPTCRecord> newRecords = new ArrayList<IPTCRecord>();
        // List<IPTCRecord> emptyRecords = new ArrayList<IPTCRecord>();
        newRecords.add(new IPTCRecord(IPTCConstants.IPTC_TYPE_SPECIAL_INSTRUCTIONS,
          "Converted by DeExifier"));
        // generate an empty App13 DataBlock
        PhotoshopApp13Data newMetaData = new PhotoshopApp13Data(newRecords, emptyRecords);
        // iRewriter.removeIPTC(resizedImageByte, bOutputStream);
        // eRewriter.updateExifMetadataLossless(imageByte, bOutputStream,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.