From 1615d61199bf23f22829d8d05c7253d815b15799 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Tue, 24 Dec 2013 18:50:59 +0200 Subject: [PATCH] tif 2 png --- .../meviz/encoder/FormatsRegistry.java | 2 + .../meviz/encoder/converters/Tif2Png.java | 40 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/main/java/eu/svjatoslav/meviz/encoder/converters/Tif2Png.java diff --git a/src/main/java/eu/svjatoslav/meviz/encoder/FormatsRegistry.java b/src/main/java/eu/svjatoslav/meviz/encoder/FormatsRegistry.java index 3c294f1..a78ff95 100755 --- a/src/main/java/eu/svjatoslav/meviz/encoder/FormatsRegistry.java +++ b/src/main/java/eu/svjatoslav/meviz/encoder/FormatsRegistry.java @@ -22,6 +22,7 @@ import eu.svjatoslav.meviz.encoder.converters.Mts2Mp4; import eu.svjatoslav.meviz.encoder.converters.Ogg2Mp3; import eu.svjatoslav.meviz.encoder.converters.Ogg2Wav; import eu.svjatoslav.meviz.encoder.converters.Png2Tiff; +import eu.svjatoslav.meviz.encoder.converters.Tif2Png; import eu.svjatoslav.meviz.encoder.converters.Tiff2Png; import eu.svjatoslav.meviz.encoder.converters.Wav2flac; import eu.svjatoslav.meviz.encoder.converters.Wav2mp3; @@ -42,6 +43,7 @@ public class FormatsRegistry { registerEncoder(new Jpeg2Png()); registerEncoder(new Png2Tiff()); registerEncoder(new Tiff2Png()); + registerEncoder(new Tif2Png()); // audio conversion registerEncoder(new Ogg2Wav()); diff --git a/src/main/java/eu/svjatoslav/meviz/encoder/converters/Tif2Png.java b/src/main/java/eu/svjatoslav/meviz/encoder/converters/Tif2Png.java new file mode 100644 index 0000000..9757479 --- /dev/null +++ b/src/main/java/eu/svjatoslav/meviz/encoder/converters/Tif2Png.java @@ -0,0 +1,40 @@ +/* + * Meviz - Various tools collection to work with multimedia. + * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public License + * as published by the Free Software Foundation. + */ + +package eu.svjatoslav.meviz.encoder.converters; + +import java.io.File; + +import eu.svjatoslav.meviz.encoder.EncodingOptions; + +public class Tif2Png implements Converter { + + @Override + public String getCommand(final File inputFile, final File targetFile, + final EncodingOptions options) { + return "convert \"" + inputFile.getAbsolutePath() + "\" \"" + + targetFile.getAbsolutePath() + "\""; + } + + @Override + public String getSourceFileExtension() { + return "png"; + } + + @Override + public String getTargetFileExtension() { + return "tif"; + } + + @Override + public boolean isTerminalMandatory() { + return false; + } + +} -- 2.20.1