/** * Get a thumbnail. * * <p>If not available the image is created. */ public synchronized Image getImage(PM_Picture picture, boolean toImport) { File fileOriginal = picture.getFileOriginal(); File fileThumbnail = PM_Utils.getFileThumbnail(fileOriginal); // The thumbnail file is available. if (fileThumbnail.isFile()) { return readImageThumbnail(fileThumbnail); } // The thumb nail file is NOT available. if (toImport) { // return readThumbAsIcon(picture, fileOriginal, fileThumbnail); } return readThumb(picture, fileThumbnail); };