This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
As far as I am aware this can't be done in Java - SWF is after all not an image, its something loaded and run by Flash Player. You'll need to do something like export it in ActionScript to a standard format and load that into Java, or use the Robot class to capture the whole screen and convert that.
If it's just a single image then Paul's suggestion of using the Robot class is probably easiest.
The JMF and Quicktime for Java libraries can play some Flash files; maybe their API allows to extract individual images.
Joined: Oct 15, 2008
Could you please keep more high light on your information.
I am going through "java.awt.Robot", there an API "createScreenCapture(Rectangle screenRect)" seems like i need to open that swf then it will take an image and convert it.
My scenario is - my SWF file is in local directory. with out opening that file i need to convert it to other format.
I seems to be an tough task...but i needs to work on it
Is there is any other way to achieve this.
I mean using any plugin or 3rd party jar.
I am using nConvert to convert SVG files to JPEG but it doesn't support for SWF.