Flash (swf) size display is too small Flash (swf) size display is too small
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Flash (swf) size display is too small

Started by kehbop, December 03, 2005, 01:40:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kehbop

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.
// 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!

kegobeer

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.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

kehbop

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?

kehbop

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. "

kegobeer

Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

kehbop

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?  ???

kegobeer

You have to edit the video size in the image properties, like I said at the beginning of this thread.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

kehbop

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?

kehbop

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!

Joachim Müller

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).

wolle

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