forked from j62/ctbrec
1
0
Fork 0

Fix Locale related bug in CreateContactSheet

This commit is contained in:
0xb00bface 2020-09-30 16:52:47 +02:00
parent c88ab395e7
commit 385a4c53c3
1 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,7 @@ import java.io.IOException;
import java.nio.file.Files;
import java.text.MessageFormat;
import java.util.Arrays;
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -47,13 +48,15 @@ public class CreateContactSheet extends AbstractPlaceholderAwarePostProcessor {
long lengthInSeconds = rec.getLength().getSeconds();
double thumbnailInterval = lengthInSeconds / (double)numberOfThumbs;
String filterArg = MessageFormat.format("fps=1/{0},scale={4}:-1,tile={1}x{2}:color={6}:margin={3}:padding={3},scale={5}:-1",
MessageFormat mf = new MessageFormat("fps=1/{0},scale={4}:-1,tile={1}x{2}:color={6}:margin={3}:padding={3},scale={5}:-1", Locale.ENGLISH);
String filterArg = mf.format(new Object[] {
thumbnailInterval,
cols, rows,
padding,
Integer.toString(thumbWidth),
Integer.toString(totalWidth),
color);
color},
new StringBuffer(), null).toString();
File executionDir = rec.getPostProcessedFile().isDirectory() ? rec.getPostProcessedFile() : rec.getPostProcessedFile().getParentFile();
File output = new File(executionDir, filename);