Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Flash (swf) size display is too small  (Read 14648 times)

0 Members and 1 Guest are viewing this topic.

kehbop

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Flash (swf) size display is too small
« 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!
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Flash (swf) size display is too small
« Reply #1 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.
Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Flash (swf) size display is too small
« Reply #2 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?
Logged

kehbop

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Flash (swf) size display is too small
« Reply #3 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. "
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Flash (swf) size display is too small
« Reply #4 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.
Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Flash (swf) size display is too small
« Reply #5 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?  ???
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Flash (swf) size display is too small
« Reply #6 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.
Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Flash (swf) size display is too small
« Reply #7 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?
Logged

kehbop

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Flash (swf) size display is too small
« Reply #8 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!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Flash (swf) size display is too small
« Reply #9 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).
Logged

wolle

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Flash (swf) size display is too small
« Reply #10 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
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 19 queries.