简体   繁体   中英

How to know the dimension of swf file without Flash?

I've a swf file and i want to embed this file into HTML page but i don't know the exact dimension of swf . Windows XP file properties doesn't show the dimension and I don't have Adobe Flash software. Then how can i know the Dimension.

There is a collection of utilities for working with SWF files called SWFTOOLS . You can grab the Windows binary from the Download page .

One of the tools in this package is swfdump , which can tell you the dimension of an SWF file. It also can produce the proper HTML code for embedding (output from my Linux box):

# swfdump -X flash.swf
-X 724
# swfdump -Y flash.swf
-Y 147
# swfdump -E flash.swf
<object type="application/x-shockwave-flash"
 data="flash.swf" width="724" height="147">
<param name="movie" value="flash.swf"/>
<param name="play" value="true"/>
<param name="quality" value="high"/>
</object>

Open it from your hard drive using Flash player -double click it- and then use JR Screen Ruler to look at its dimensions. If it happens to open in full screen mode just press ESC ;)

SWF files have a header right at the start where the frame size in twips is stored as a RECT structure. When the image is played back at 100% scaling, there are 20 twips to a pixel.

See this document for details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM