forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: kehbop on December 03, 2005, 01:40:54 am

Title: Flash (swf) size display is too small
Post by: kehbop on December 03, 2005, 01:40:54 am
Let me just say that I don't know PHP.

We need to fix the problem of a flash movie displaying too small. The reason why this happens is that it is displayed (on displayimage.php) as a percentage so that it only fills size of the table. I want it to be the correct size!

The problem lies somewhere within upload.php.
Code: [Select]
// Check to see if the filename is consistent with that of a picture.
            if (is_image($picture_alias)) {

                // If it is, get the picture information
                $imginfo = getimagesize($path_to_image);

                // If getimagesize does not recognize the file as a picture, delete the picture.
                if ($imginfo === 'FALSE') {
                    @unlink($path_to_image);

                    // The file upload has failed -- the image is not an image or it is corrupt.
                    $file_failure_array[] = array( 'failure_ordinal'=>$failure_ordinal, 'file_name'=> $file_name, 'error_code'=>$lang_upload_php['not_image']);

Here it checks to see if the uploaded file is a picture. At this point, two things may be happening that causes the problem.
1) It might be that swf is not recognized as a picture. Therefore it bypasses the step where it gets the $getimage and the swf remains at some sort of default percentage configuaration.
2) Or the $imginfo = getimagesize($path_to_image); is not the correct code to get an swf's size. In this case someone would have to find the code to retreive the swf size and write it out.

I know a lot of people have had this problem. I'm hoping that someone can help us. Thanks!
Title: Re: Flash (swf) size display is too small
Post by: kegobeer on December 03, 2005, 01:43:11 am
Have you tried entering the video size in the image's properties page?  SWF is not and cannot be determined without third party apps, so Coppermine cannot determine the size.  You have to enter that after you upload the file.
Title: Re: Flash (swf) size display is too small
Post by: kehbop on December 03, 2005, 02:01:34 am
The problem is that users will be uploading their movies. I have no way of knowing what the original swf size was.

Could you point me to some of those 3rd party apps?

and are you absolutely sure you cannot get swf size from php?
Title: Re: Flash (swf) size display is too small
Post by: kehbop on December 03, 2005, 02:05:23 am
According to this, getimagesize should be able to get swf...

http://us3.php.net/getimagesize

"The getimagesize() function will determine the size of any GIF, JPG, PNG, SWF, SWC, PSD, TIFF, BMP, IFF, JP2, JPX, JB2, JPC, XBM, or WBMP image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML <IMG> tag. "
Title: Re: Flash (swf) size display is too small
Post by: kegobeer on December 03, 2005, 03:40:31 am
Perhaps you should dig a little deeper...

http://www.faqts.com/knowledge_base/view.phtml/aid/29599
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&q=php+getimagesize+swf

Simply put, PHP cannot read every type of SWF correctly.
Title: Re: Flash (swf) size display is too small
Post by: kehbop on December 04, 2005, 12:51:48 am
In that case...I could simply increase the size of the table that the flash movie is placed in. I just need to know which table to make bigger.

Help?  ???
Title: Re: Flash (swf) size display is too small
Post by: kegobeer on December 04, 2005, 02:56:45 am
You have to edit the video size in the image properties, like I said at the beginning of this thread.
Title: Re: Flash (swf) size display is too small
Post by: kehbop on December 04, 2005, 03:32:40 am
well right now the movie file is at 0 x 0. However, when it is displayed, it is not so small. This means that the movie is expanding to fit the size of the table. So couldn't I set the table to a certain width so that my movies would be that size?
Title: Re: Flash (swf) size display is too small
Post by: kehbop on December 04, 2005, 04:27:58 am
I just realized that if I change the size to a larger size (ie 450 x 450), it will keep it's proportions!

This means if someone could add a feature to automatically change image size of an swf to a defined size, then it will work better!
Title: Re: Flash (swf) size display is too small
Post by: Joachim Müller on December 05, 2005, 08:34:36 am
do as previously suggested: edit the dimensions in the file properties dialog. Nobody can come up with another solution, as this is by design (not the design of coppermine, but the design of the way php and browsers handle embedded flash objects).
Title: Re: Flash (swf) size display is too small
Post by: wolle on February 04, 2006, 01:00:46 pm
I think it would be okay, if the falsh or the movie could be opened in a new window and so it fits itself to its size.

Wolle