开发者

PHP: How to get shockwave .dcr file width and the height?

As we know the function getimagesize() works very good for images and swf files.

But it doesn't support shockwave file (.dcr).

SO, h开发者_StackOverflow中文版ow can I get the width and the height of such file..


I am not Lingo/Director expert, but AFAIK you won't be able to do this from PHP.

.DCR file format is not open so you won't find file format specification for you to make your own parser and extract that info on your own.

However, there should be way to do this using director movie on client side.

Eg. You load external dcr file inside your own director movie (then you will be able to read width/height etc of loaded file). Your own director movie then updates some database with info on that specific loaded file so you can show width/height later on.

I've found this artice dating back to 2006 where this guy suggests the same thing: http://director-online.com/forums/read.php?1,20621,20621,quote=1

Good luck mate! :)


If you have a windows server, you could install IrfanView (free) and use it from the command line (yes, it's free and has a command line) to convert the swf to dcr. (Surely there is a similar tool for Linux).

Convert images on the command line with IfranView

To call OS command line from php, use shell_exec().

Then you could read the swf image size with php normally.

Hope this helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜