use of org.fagu.fmv.im.IMOperation in project fmv by f-agu.
the class IMReducer method reduceMedia.
/**
* @see org.fagu.fmv.mymedia.reduce.Reducer#reduceMedia(java.io.File, String, Logger)
*/
@Override
public Reduced reduceMedia(File srcFile, String consolePrefixMessage, Logger logger) throws IOException {
File destFile = getTempFile(srcFile, format);
IMOperation op = new IMOperation();
op.image(srcFile, "[0]").autoOrient().quality(quality).image(destFile);
Soft convertSoft = Convert.search();
convertSoft.withParameters(op.toList()).logCommandLine(line -> logger.log("Exec: " + line)).execute();
return new Reduced(destFile, false);
}
Aggregations