private static File jpegtranExec(String filename, String arg1, String arg2) throws IOException {
private static File jpegtranExec(String filename, String arg1, String arg2, boolean crop) throws IOException {
	private static File jpegtranExec(String filename, String arg1, String arg2) throws IOException {		File r;		//StringBuffer cmdline = new StringBuffer(jpegtranPath);		ArrayList cmd = new ArrayList();		cmd.add(jpegtranPath);		//cmdline.append(" -copy all");		cmd.add("-copy");		cmd.add("all");		//cmd.add("-debug");		//cmdline.append(command);		//cmd.add(command);		cmd.add(arg1);		cmd.add(arg2);		r = deterministicTempFile("rot"				, "." + GalleryFileFilter.getExtension(filename), tmpDir, filename + arg1 + arg2);		toDelete.add(r);		//cmdline.append(" -outfile \"").append(r.getPath()).append("\"");		//cmdline.append(" -outfile ").append(r.getPath());		cmd.add("-outfile");		cmd.add(r.getPath());		//cmdline.append(" \"").append(filename).append("\"");		cmd.add(filename);		//int exitValue = exec(cmdline.toString());		int exitValue = exec((String[]) cmd.toArray(new String[0]));		if ((exitValue != 0 && !jpegtranIgnoreErrorCode) || ! r.exists()) {			if (exitValue != -1 || ! r.exists()) {				// don't kill jpegtran if it's just an InterruptedException				Log.log(Log.LEVEL_CRITICAL, MODULE, "jpegtran doesn't seem to be working. Disabling");				stopUsingJpegtran();			}			r = null;		}		return r;	}