From fab31bcb53b9fb076e3982cfd3516e8dec5e9f1a Mon Sep 17 00:00:00 2001 From: shish Date: Sat, 14 Jun 2008 11:18:41 +0000 Subject: [PATCH] rely on PHP rather than using my own function (hmmm...) git-svn-id: file:///home/shish/svn/shimmie2/trunk@896 7f39781d-f577-437e-ae19-be835c7a54ca --- contrib/handle_flash/main.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/contrib/handle_flash/main.php b/contrib/handle_flash/main.php index cfb44b74..07c28228 100644 --- a/contrib/handle_flash/main.php +++ b/contrib/handle_flash/main.php @@ -57,12 +57,18 @@ class FlashFileHandler extends Extension { $image->tag_array = tag_explode($metadata['tags']); $image->source = $metadata['source']; - $rect = $this->swf_get_bounds($filename); - if(is_null($rect)) { - return $null; - } - $image->width = $rect[1]; - $image->height = $rect[3]; + // redundant, since getimagesize() works on SWF o_O +// $rect = $this->swf_get_bounds($filename); +// if(is_null($rect)) { +// return $null; +// } +// $image->width = $rect[1]; +// $image->height = $rect[3]; + + if(!($info = getimagesize($filename))) return null; + + $image->width = $info[0]; + $image->height = $info[1]; return $image; }