public PlanarImage getRenderedImage(final PlanarImage imageSource) { return getRenderedImage(imageSource, null); }
@Override public void process() throws Exception { PlanarImage source = (PlanarImage) params.get(Param.INPUT_IMG); PlanarImage result = source; ImageElement imageElement = (ImageElement) params.get(P_IMAGE_ELEMENT); if (imageElement != null) { result = imageElement.getRenderedImage(source, params); } params.put(Param.OUTPUT_IMG, result); }
@Override public void run() { PlanarImage img = null; // Get the final that contain the thumbnail when the uncompress mode is activated File file = diskObject.getFile(); if (file != null && file.getName().endsWith(".wcv")) { //$NON-NLS-1$ File thumbFile = new File(ImageFiler.changeExtension(file.getPath(), ".jpg")); //$NON-NLS-1$ if (thumbFile.canRead()) { img = ImageProcessor.readImage(thumbFile); } } if (img == null) { img = diskObject.getRenderedImage(diskObject.getImage(null)); } if (img == null) { return; } final BufferedImage tIcon = ImageConversion .toBufferedImage((PlanarImage) ImageProcessor.buildThumbnail(img, ThumbnailRenderer.ICON_DIM, true)); // Prevent to many files open on Linux (Ubuntu => 1024) and close image stream diskObject.removeImageFromCache(); GuiExecutor.instance().execute(() -> { if (tIcon != null) { cachedThumbnails.put(diskObject.getMediaURI(), new ThumbnailIcon(tIcon)); } thumbnailList.getThumbnailListModel().notifyAsUpdated(index); }); }
params.put(ActionW.LEVEL.cmd(), min + (max -min) / 2.0 ); img8 = imgElement.getRenderedImage(img, params);
PlanarImage imgPl = image.getImage(opManager); if (imgPl != null) { PlanarImage img = image.getRenderedImage(imgPl); final PlanarImage thumb = createThumbnail(img); if (thumb != null) {