windows 没有Flash如何知道swf文件的尺寸?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/851337/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 12:27:32  来源:igfitidea点击:

How to know the dimension of swf file without Flash?

htmlwindowsflash

提问by Jitendra Vyas

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.

我有一个 swf 文件,我想将此文件嵌入 HTML 页面,但我不知道 swf 的确切尺寸。Windows XP 文件属性不显示尺寸,而且我没有 Adob​​e Flash 软件。那我怎么知道维度。

回答by viam0Zah

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

有一组用于处理 SWF 文件的实用程序,称为SWFTOOLS。您可以从下载页面获取 Windows 二进制文件。

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,它可以告诉您 SWF 文件的尺寸。它还可以生成用于嵌入的正确 HTML 代码(来自我的 Linux 机器的输出):

# 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>

回答by victor hugo

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

使用 Flash 播放器从您的硬盘驱动器打开它 - 双击它 - 然后使用JR Screen Ruler查看其尺寸。如果它碰巧以全屏模式打开,只需按 ESC ;)

回答by paxdiablo

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.

SWF 文件在开头有一个标题,其中以缇为单位的帧大小存储为 RECT 结构。当图像以 100% 缩放比例播放时,一个像素有 20 缇。

See this documentfor details.

有关详细信息,请参阅此文档