Question

Comme nous le savons la getimagesize () fonction fonctionne très bien pour les images et les fichiers swf.

Mais il ne supporte pas le fichier Shockwave (.dcr).

Alors, comment puis-je obtenir la largeur et la hauteur de ce fichier ..

Était-ce utile?

La solution

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! :)

Autres conseils

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top