exporting selected images

swt library loading
UI depends on system
This commit is contained in:
Jindra Pet��k
2013-01-18 20:34:51 +01:00
parent 590595cb05
commit 89af16248f
6 changed files with 182 additions and 28 deletions
+13 -9
View File
@@ -393,7 +393,7 @@ public class SWF {
}
}
private String getImageFormat(byte data[]) {
private static String getImageFormat(byte data[]) {
if (hasErrorHeader(data)) {
return "jpg";
}
@@ -426,14 +426,7 @@ public class SWF {
return false;
}
public void exportImages(String outdir) throws IOException {
JPEGTablesTag jtt = null;
for (Tag t : tags) {
if (t instanceof JPEGTablesTag) {
jtt = (JPEGTablesTag) t;
}
}
public static void exportImages(String outdir, List<Tag> tags, JPEGTablesTag jtt) throws IOException {
for (Tag t : tags) {
if ((t instanceof DefineBitsJPEG2Tag) || (t instanceof DefineBitsJPEG3Tag) || (t instanceof DefineBitsJPEG4Tag)) {
byte imageData[] = null;
@@ -496,4 +489,15 @@ public class SWF {
}
}
}
public void exportImages(String outdir) throws IOException {
JPEGTablesTag jtt = null;
for (Tag t : tags) {
if (t instanceof JPEGTablesTag) {
jtt = (JPEGTablesTag) t;
}
}
exportImages(outdir, tags, jtt);
}
}