Advanced search  

News:

cpg1.5.30 maintenance release - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix several minor issues. All fixes are not security critical, so if your gallery is running fine with cpg1.5.28 you don't need to upgrade. If you are running an older version than cpg1.5.28, you must update to this latest version as soon as possible because of the security impact!
[more]

Pages: [1]   Go Down

Author Topic: Flash (swf) size display is too small  (Read 9449 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, 02: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, 02: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, 03: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, 03: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, 04: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, 01: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, 03: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, 04: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, 05: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: 47844
  • aka "GauGau"
    • gaugau.de
Re: Flash (swf) size display is too small
« Reply #9 on: December 05, 2005, 09: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, 02: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.087 seconds with 21 queries.