Commit d2a8180d authored by ludwig's avatar ludwig

Bugfix for flash conversion

git-svn-id: https://www2.in.tum.de/repos/ttt/trunk@104 0463f305-d864-43cb-8a47-61cf597d4139
parent b8dadf9d
......@@ -1347,8 +1347,9 @@ public class PostProcessorPanel extends GradientPanel {
newVideo.create(recording.getExistingFileBySuffix("bjpg").getPath());
}
} catch (Exception e) {
e.printStackTrace();
TTT.showMessage("CamVid creation failed: " + e);
e.printStackTrace();
}
......@@ -1363,8 +1364,8 @@ public class PostProcessorPanel extends GradientPanel {
PodcastCreator.createPodcast(recording, batch);
}
} catch (Exception e) {
TTT.showMessage("MP4 creation failed: " + e);
e.printStackTrace();
e.printStackTrace();
TTT.showMessage("MP4 creation failed: " + e);
}
}
......@@ -1377,8 +1378,8 @@ public class PostProcessorPanel extends GradientPanel {
recording.createFlash(batch);
}
} catch (Exception e) {
TTT.showMessage("Flash creation failed: " + e);
e.printStackTrace();
e.printStackTrace();
TTT.showMessage("Flash creation failed: " + e);
}
}
......@@ -1389,8 +1390,8 @@ public class PostProcessorPanel extends GradientPanel {
LameEncoder.convertAudioFile(recording.getExistingFileBySuffix(new String[] {"wav","mp2"}), recording.getFileBySuffix("mp3"), batch);
}
} catch (Exception e) {
TTT.showMessage("MP3 creation failed: " + e);
e.printStackTrace();
e.printStackTrace();
TTT.showMessage("MP3 creation failed: " + e);
}
}
......
......@@ -32,6 +32,7 @@ import java.net.URL;
import java.util.Vector;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import ttt.ProtocolPreferences;
......@@ -307,8 +308,19 @@ public class FlashActionHelper {
// ziewer - modified to load resources from jar
Shape loadImage(String fileName) throws IOException {
URL url = this.getClass().getResource(fileName);
Image img = ImageIO.read(url);
String iconPath = TTT.class.getResource("Constants.class").toString()
.replaceFirst("ttt/Constants.class", "resources/");
ImageIcon icon = new ImageIcon(new URL((iconPath + fileName)));
// URL url = this.getClass().getResource(fileName);
Image img = icon.getImage();//ImageIO.read(url);
// create a shape that uses the image as a fill
// (images cannot be placed directly. They can only be used as shape fills)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment