@Override public List<ImageInformation> getImageInformation(Project project) { final ImageInformation base = ImageInformation.newBuilder() .setExportName(exportName) .setImageFile(imageFile) .setAlgorithm(algorithm) .setMethod(algorithm.getMethod(method)) .setExportPath(exportRoot) .setNinePatch(isNinePatch) .setFormat(format) .build(); final List<ImageInformation> images = new ArrayList<ImageInformation>(); for (Resolution resolution : targetResolutions) { images.add( ImageInformation.newBuilder(base) .setTargetResolution(resolution) .setFactor(getRealScaleFactor(resolution)) .build()); } return images; }
@Override public List<ImageInformation> getImageInformation( Project project, String selectedFile, List<ImageInformation> imageInformation, Resolution sourceResolution) { final ImageInformation base = ImageInformation.newBuilder(imageInformation.get(0)) .setAlgorithm(algorithm) .setMethod(algorithm.getMethod(method)) .setExportPath(exportRoot) .setFormat(format) .build(); final List<ImageInformation> images = new ArrayList<ImageInformation>(); for (Resolution resolution : targetResolutions) { images.add( ImageInformation.newBuilder(base) .setTargetResolution(resolution) .setFactor(getRealScaleFactor(resolution)) .build()); } return images; }