} catch (IOException e1) { Log.logException(Log.LEVEL_ERROR, MODULE, e1);
	public static File losslessCrop(String filename, Rectangle cropTo) {		File r = null;		if (!GalleryFileFilter.canManipulateJpeg(filename)) {			throw new UnsupportedOperationException("jpegtran doesn't support cropping anything but jpeg");		}		if (useJpegtran) {			File orig = null;			File dest = null;			try {				if (GalleryRemote.IS_MAC_OS_X) {					orig = new File(filename);					dest = deterministicTempFile("tmp"							, "." + GalleryFileFilter.getExtension(filename), tmpDir, filename + cropTo);					orig.renameTo(dest);					filename = dest.getPath();				}				r = jpegtranExec(filename, "-crop", cropTo.width + "x" + cropTo.height + "+" +						cropTo.x + "+" + cropTo.y, true);			} catch (IOException e1) {				Log.logException(Log.LEVEL_ERROR, MODULE, e1);			} finally {				if (orig != null && dest != null) {					dest.renameTo(orig);				}			}		}		if (!useJpegtran && r == null) {			throw new UnsupportedOperationException("jpegtran with CROP PATCH must be installed for this operation");		}		return r;	}