Header display node (read only)

This commit is contained in:
Jindra Petřík
2014-07-20 10:07:51 +02:00
parent ab8cc63682
commit a14b1a392a
11 changed files with 320 additions and 51 deletions

View File

@@ -369,6 +369,29 @@ public final class SWF implements TreeItem, Timelined {
saveTo(os, compression);
}
public String getHeaderBytes() {
String ret = "";
if (compression == SWFCompression.LZMA) {
ret += 'Z';
} else if (compression == SWFCompression.ZLIB) {
ret += 'C';
} else {
if (gfx) {
ret += 'G';
} else {
ret += 'F';
}
}
if (gfx) {
ret += 'F';
ret += 'X';
} else {
ret += 'W';
ret += 'S';
}
return ret;
}
/**
* Saves this SWF into new file
*
@@ -1566,7 +1589,7 @@ public final class SWF implements TreeItem, Timelined {
new RetryTask(new RunnableIOEx() {
@Override
public void run() throws IOException {
File f = new File(foutdir + File.separator + (fframes.get(fi)+1) + ".png");
File f = new File(foutdir + File.separator + (fframes.get(fi) + 1) + ".png");
ImageIO.write(frameImages.next(), "PNG", f);
ret.add(f);
}