/** * Not all documents have all the images concatenated in the data stream * although MS claims so. The best approach is to scan all character runs. * * @return a list of Picture objects found in current document */ public List<Picture> getAllPictures() { ArrayList<Picture> pictures = new ArrayList<>(); Range range = _document.getOverallRange(); for (int i = 0; i < range.numCharacterRuns(); i++) { CharacterRun run = range.getCharacterRun(i); if (run==null) { continue; } Picture picture = extractPicture(run, false); if (picture != null) { pictures.add(picture); } } searchForPictures(_dgg.getEscherRecords(), pictures); return pictures; }
/** * Not all documents have all the images concatenated in the data stream * although MS claims so. The best approach is to scan all character runs. * * @return a list of Picture objects found in current document */ public List<Picture> getAllPictures() { ArrayList<Picture> pictures = new ArrayList<Picture>(); Range range = _document.getOverallRange(); for (int i = 0; i < range.numCharacterRuns(); i++) { CharacterRun run = range.getCharacterRun(i); if (run==null) { continue; } Picture picture = extractPicture(run, false); if (picture != null) { pictures.add(picture); } } searchForPictures(_dgg.getEscherRecords(), pictures); return pictures; }
Picture picture = newFormat.getPicturesTable().extractPicture( characterRun, true );
Picture picture = newFormat.getPicturesTable().extractPicture( characterRun, true );