Detecting width and height of a Flash content object

Author Message

Knut Urdalen

Wednesday 12 December 2007 1:14:02 am

I just used a few hours debugging why a recent published Flash content object didn't show up. It turned out that it was because the width and height attributes was set to zero!

Why is that? I normally use getimagesize() (http://no.php.net/manual/en/function.getimagesize.php) to detect width and height of swf-files, and I've never seen problems with it. I didn't know where to start debugging it in the ez publish libraries so I'm asking you guys. There's some information about detecting width and height of swf-files in the PHP manual comments:
http://no.php.net/manual/en/function.getimagesize.php#55503
http://no.php.net/manual/en/function.getimagesize.php#48680
http://no.php.net/manual/en/function.getimagesize.php#44640

Setting the width and height to zero indirectly is bad, even if ez publish is not able to detect it. Editors will expect that their created content will show up. If ez publish is not able to detect the size when uploading I think it should display a warning: "eZ Publish was unable to detect the size of this media content, please define a width and height explicitly".

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.