Export frame,shape or image to Windows Bitmap format (.BMP)

This commit is contained in:
Jindra Petřík
2014-11-22 20:12:48 +01:00
parent 1ca112132b
commit 4627afa5df
8 changed files with 287 additions and 12 deletions

View File

@@ -82,6 +82,7 @@ import com.jpexs.decompiler.flash.exporters.settings.ShapeExportSettings;
import com.jpexs.decompiler.flash.exporters.settings.SoundExportSettings;
import com.jpexs.decompiler.flash.exporters.settings.TextExportSettings;
import com.jpexs.decompiler.flash.exporters.shape.CanvasShapeExporter;
import com.jpexs.decompiler.flash.helpers.BMPFile;
import com.jpexs.decompiler.flash.helpers.HighlightedText;
import com.jpexs.decompiler.flash.helpers.HighlightedTextWriter;
import com.jpexs.decompiler.flash.helpers.SWFDecompilerPlugin;
@@ -1511,6 +1512,19 @@ public final class SWF implements SWFContainerItem, Timelined {
}
}, handler).run();
break;
case BMP:
for (int i = 0; frameImages.hasNext(); i++) {
final int fi = i;
new RetryTask(new RunnableIOEx() {
@Override
public void run() throws IOException {
File f = new File(foutdir + File.separator + (fframes.get(fi) + 1) + ".bmp");
BMPFile.saveBitmap(frameImages.next(), f);
ret.add(f);
}
}, handler).run();
}
break;
case PNG:
for (int i = 0; frameImages.hasNext(); i++) {
final int fi = i;